summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index b8563aa..1a37b61 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -4296,9 +4296,10 @@ 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) {
/* still active */
- if (options & WNOHANG) {
+ if ((options & WNOHANG) || errno == EINTR) {
pid = 0;
break;
}