diff options
author | Christopher Faylor <me@cgf.cx> | 2005-10-18 04:20:46 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-10-18 04:20:46 +0000 |
commit | 4116609aca73c07ba72a065f55479375948ace28 (patch) | |
tree | af6ebf6626638e058e991455ea98d8de69e37628 | |
parent | 267e201dae394e2d5deaa00fc2d4904a311210d8 (diff) | |
download | newlib-4116609aca73c07ba72a065f55479375948ace28.zip newlib-4116609aca73c07ba72a065f55479375948ace28.tar.gz newlib-4116609aca73c07ba72a065f55479375948ace28.tar.bz2 |
* sigproc.cc (child_info::sync): Fix typo which caused hProcess to never be
cleared. Only clear hProcess when not forking.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/sigproc.cc | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index fa7cb3e..62201b7 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -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> Change process_lock to lock_process throughout. diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 3a51326..fc8ea91 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); |