1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

win32.c: no error after retry

* win32/win32.c (waitpid): return 0 on error after retried.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-06-19 18:08:28 +00:00
parent 656c3b5422
commit 7ce9f9c25a

View file

@ -4144,6 +4144,7 @@ waitpid(rb_pid_t pid, int *stat_loc, int options)
}
else {
struct ChildRecord* child = FindChildSlot(pid);
int retried = 0;
if (!child) {
errno = ECHILD;
return -1;
@ -4157,8 +4158,10 @@ waitpid(rb_pid_t pid, int *stat_loc, int options)
pid = 0;
break;
}
++retried;
}
}
if (pid == -1 && retried) pid = 0;
}
return pid;