From 4116609aca73c07ba72a065f55479375948ace28 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 18 Oct 2005 04:20:46 +0000 Subject: * sigproc.cc (child_info::sync): Fix typo which caused hProcess to never be cleared. Only clear hProcess when not forking. --- winsup/cygwin/sigproc.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/sigproc.cc') diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 3a5132600..fc8ea9147 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -836,7 +836,7 @@ child_info::sync (pid_t pid, HANDLE& hProcess, DWORD howlong) } w4[n++] = hProcess; - sigproc_printf ("waiting for subproc_ready(%p) and child process(%p)", w4[0], w4[1]); + sigproc_printf ("n %d, waiting for subproc_ready(%p) and child process(%p)", n, w4[0], w4[1]); DWORD x = WaitForMultipleObjects (n, w4, FALSE, howlong); x -= WAIT_OBJECT_0; if (x >= n) @@ -846,9 +846,9 @@ child_info::sync (pid_t pid, HANDLE& hProcess, DWORD howlong) } else { - if (n == nsubproc_ready) + if (type != _PROC_FORK && x == nsubproc_ready) { - CloseHandle (hProcess); + ForceCloseHandle (hProcess); hProcess = NULL; } sigproc_printf ("process %d synchronized, WFMO returned %d", pid, x); -- cgit v1.2.3