diff options
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c index fc2c99edf1..eb1818affa 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -4297,7 +4297,9 @@ waitpid(rb_pid_t pid, int *stat_loc, int options) while (!(pid = poll_child_status(child, stat_loc))) { /* wait... */ - 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) { pid = 0; |