* sigproc.cc (child_info::sync): Fix typo which caused hProcess to never be

cleared.  Only clear hProcess when not forking.
This commit is contained in:
Christopher Faylor 2005-10-18 04:20:46 +00:00
parent 267e201dae
commit 4116609aca
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2005-10-18 Christopher Faylor <cgf@timesys.com>
* sigproc.cc (child_info::sync): Fix typo which caused hProcess to
never be cleared. Only clear hProcess when not forking.
2005-10-17 Christopher Faylor <cgf@timesys.com> 2005-10-17 Christopher Faylor <cgf@timesys.com>
Change process_lock to lock_process throughout. Change process_lock to lock_process throughout.

View File

@ -836,7 +836,7 @@ child_info::sync (pid_t pid, HANDLE& hProcess, DWORD howlong)
} }
w4[n++] = hProcess; 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); DWORD x = WaitForMultipleObjects (n, w4, FALSE, howlong);
x -= WAIT_OBJECT_0; x -= WAIT_OBJECT_0;
if (x >= n) if (x >= n)
@ -846,9 +846,9 @@ child_info::sync (pid_t pid, HANDLE& hProcess, DWORD howlong)
} }
else else
{ {
if (n == nsubproc_ready) if (type != _PROC_FORK && x == nsubproc_ready)
{ {
CloseHandle (hProcess); ForceCloseHandle (hProcess);
hProcess = NULL; hProcess = NULL;
} }
sigproc_printf ("process %d synchronized, WFMO returned %d", pid, x); sigproc_printf ("process %d synchronized, WFMO returned %d", pid, x);