diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-19 18:08:28 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-19 18:08:28 +0000 |
commit | 7ce9f9c25a3d2c95ffc4625ae168eaa00bc1ff95 (patch) | |
tree | fb7e88c9219f7fc871fe56b9245efcd877db1ad9 /win32 | |
parent | 656c3b5422e53c7fc7fc68ebecd815f8f9ea8631 (diff) | |
download | ruby-7ce9f9c25a3d2c95ffc4625ae168eaa00bc1ff95.tar.gz |
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
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c index 0fc4186fff..0290b89825 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -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; |