From c82d87444b1be0538f213b99f9dd90b7f3680130 Mon Sep 17 00:00:00 2001 From: usa Date: Fri, 30 Sep 2016 17:03:48 +0000 Subject: * win32/win32.c (poll_child_status): rb_w32_wait_events_blocking() sets errno internally, then should not set it here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- win32/win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'win32/win32.c') 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; } -- cgit v1.2.3