mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/pty/pty.c (pty_check): needs WNOHANG to poll, return $?, and
call raise_from_check() with pid_t. [ruby-dev:40141] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ccf67667b8
commit
b148948982
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Jan 25 17:47:02 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/pty/pty.c (pty_check): needs WNOHANG to poll, return $?, and
|
||||||
|
call raise_from_check() with pid_t. [ruby-dev:40141]
|
||||||
|
|
||||||
Mon Jan 25 17:36:11 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Mon Jan 25 17:36:11 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* version.c (RUBY_LIB, RUBY_*_LIB): moved from configures.
|
* version.c (RUBY_LIB, RUBY_*_LIB): moved from configures.
|
||||||
|
|
|
@ -605,11 +605,11 @@ pty_check(int argc, VALUE *argv, VALUE self)
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
rb_scan_args(argc, argv, "11", &pid, &exc);
|
rb_scan_args(argc, argv, "11", &pid, &exc);
|
||||||
cpid = rb_waitpid(NUM2PIDT(pid), &status, WUNTRACED);
|
cpid = rb_waitpid(NUM2PIDT(pid), &status, WNOHANG|WUNTRACED);
|
||||||
if (cpid == -1) return Qnil;
|
if (cpid == -1) return Qnil;
|
||||||
|
|
||||||
if (!RTEST(exc)) return status;
|
if (!RTEST(exc)) return rb_last_status_get();
|
||||||
raise_from_check(pid, status);
|
raise_from_check(cpid, status);
|
||||||
return Qnil; /* not reached */
|
return Qnil; /* not reached */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue