mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
* ext/pty/pty.c (pty_check): should return nil until the child
terminates or stops. [ruby-dev:44600] [Bug #2642] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3a0e582e1f
commit
039f12b5bb
3 changed files with 38 additions and 1 deletions
|
@ -658,7 +658,7 @@ pty_check(int argc, VALUE *argv, VALUE self)
|
|||
|
||||
rb_scan_args(argc, argv, "11", &pid, &exc);
|
||||
cpid = rb_waitpid(NUM2PIDT(pid), &status, WNOHANG|WUNTRACED);
|
||||
if (cpid == -1) return Qnil;
|
||||
if (cpid == -1 || cpid == 0) return Qnil;
|
||||
|
||||
if (!RTEST(exc)) return rb_last_status_get();
|
||||
raise_from_check(cpid, status);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue