ruby-changes:39122
From: usa <ko1@a...>
Date: Thu, 9 Jul 2015 15:39:00 +0900 (JST)
Subject: [ruby-changes:39122] usa:r51203 (trunk): * win32/win32.c (waitpid): fixed return value of previous commit. thanks, nobu!
usa 2015-07-09 15:38:16 +0900 (Thu, 09 Jul 2015) New Revision: 51203 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51203 Log: * win32/win32.c (waitpid): fixed return value of previous commit. thanks, nobu! Modified files: trunk/win32/win32.c Index: win32/win32.c =================================================================== --- win32/win32.c (revision 51202) +++ win32/win32.c (revision 51203) @@ -4296,10 +4296,11 @@ waitpid(rb_pid_t pid, int *stat_loc, int https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L4296 while (!(pid = poll_child_status(child, stat_loc))) { /* wait... */ - errno = 0; - 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) || errno == EINTR) { + if (options & WNOHANG) { pid = 0; break; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/