win32.c: wait until exit
* win32/win32.c (waitpid): should not return 0 but wait until exit unless WNOHANG is given. waiting huge process may return while active, for some reason. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a5b0cace63
commit
4c25e2fb8b
@ -1,3 +1,9 @@
|
|||||||
|
Thu Jun 20 02:44:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* win32/win32.c (waitpid): should not return 0 but wait until exit
|
||||||
|
unless WNOHANG is given. waiting huge process may return while
|
||||||
|
active, for some reason.
|
||||||
|
|
||||||
Thu Jun 20 01:34:15 2013 Tanaka Akira <akr@fsij.org>
|
Thu Jun 20 01:34:15 2013 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* bignum.c (bdigit_roomof): Use SIZEOF_BDIGITS.
|
* bignum.c (bdigit_roomof): Use SIZEOF_BDIGITS.
|
||||||
|
@ -4153,8 +4153,10 @@ waitpid(rb_pid_t pid, int *stat_loc, int options)
|
|||||||
/* wait... */
|
/* wait... */
|
||||||
if (rb_w32_wait_events_blocking(&child->hProcess, 1, timeout) != WAIT_OBJECT_0) {
|
if (rb_w32_wait_events_blocking(&child->hProcess, 1, timeout) != WAIT_OBJECT_0) {
|
||||||
/* still active */
|
/* still active */
|
||||||
pid = 0;
|
if (options & WNOHANG) {
|
||||||
break;
|
pid = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user