diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-09 06:10:47 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-09 06:10:47 +0000 |
commit | fcb79d5324e2fc3f5943d5d61f44c4d0640965e1 (patch) | |
tree | 0986ce1661df50a9650c99ad1e7dd3efec7f052b /win32 | |
parent | f23adf745943174cdd4ecd88789c69acec69ad77 (diff) | |
download | ruby-fcb79d5324e2fc3f5943d5d61f44c4d0640965e1.tar.gz |
* win32/win32.c (waitpid): return immediately if interrupted.
reported by <takkanm AT gmail.com> [ruby-dev:49176] [Bug #11340]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c index b8563aad2c..1a37b61d3a 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; } |