* win32/win32.c (waitpid): fixed return value of previous commit. thanks, nobu!
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fcb79d5324
commit
b3544b2551
@ -4296,10 +4296,11 @@ waitpid(rb_pid_t pid, int *stat_loc, int options)
|
||||
|
||||
while (!(pid = poll_child_status(child, stat_loc))) {
|
||||
/* wait... */
|
||||
errno = 0;
|
||||
if (rb_w32_wait_events_blocking(&child->hProcess, 1, timeout) != WAIT_OBJECT_0) {
|
||||
int ret = rb_w32_wait_events_blocking(&child->hProcess, 1, timeout);
|
||||
if (ret == WAIT_OBJECT_0 + 1) return -1; /* maybe EINTR */
|
||||
if (ret != WAIT_OBJECT_0) {
|
||||
/* still active */
|
||||
if ((options & WNOHANG) || errno == EINTR) {
|
||||
if (options & WNOHANG) {
|
||||
pid = 0;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user