diff options
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/win32/win32.c b/win32/win32.c index 7b42df096f..0fc4186fff 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -4153,8 +4153,10 @@ waitpid(rb_pid_t pid, int *stat_loc, int options) /* wait... */ if (rb_w32_wait_events_blocking(&child->hProcess, 1, timeout) != WAIT_OBJECT_0) { /* still active */ - pid = 0; - break; + if (options & WNOHANG) { + pid = 0; + break; + } } } } |