diff --git a/ChangeLog b/ChangeLog index 518647b450..728efe5c6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Oct 1 02:02:02 2016 NAKAMURA Usaku + + * win32/win32.c (poll_child_status): rb_w32_wait_events_blocking() sets + errno internally, then should not set it here. + Fri Sep 30 19:06:21 2016 Anton Davydov * lib/uri/http.rb: Documentation and code style imrovements. diff --git a/win32/win32.c b/win32/win32.c index f2a7711d2f..a0efcbcbd8 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -4345,7 +4345,6 @@ poll_child_status(struct ChildRecord *child, int *stat_loc) if (!GetExitCodeProcess(child->hProcess, &exitcode)) { /* If an error occurred, return immediately. */ - error_exit: err = GetLastError(); switch (err) { case ERROR_INVALID_PARAMETER: @@ -4358,6 +4357,7 @@ poll_child_status(struct ChildRecord *child, int *stat_loc) errno = map_errno(err); break; } + error_exit: CloseChildHandle(child); return -1; }