]> sourceware.org Git - newlib-cygwin.git/commitdiff
* sigproc.cc (child_info::sync): Fix typo which caused hProcess to never be
authorChristopher Faylor <me@cgf.cx>
Tue, 18 Oct 2005 04:20:46 +0000 (04:20 +0000)
committerChristopher Faylor <me@cgf.cx>
Tue, 18 Oct 2005 04:20:46 +0000 (04:20 +0000)
cleared.  Only clear hProcess when not forking.

winsup/cygwin/ChangeLog
winsup/cygwin/sigproc.cc

index fa7cb3ef174a93714a12eb858c23d2842f0cd695..62201b7a2ecadeabd4c49a1887cc125dd7a6e75b 100644 (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>
 
        Change process_lock to lock_process throughout.
index 3a51326004518c55bae57f72dc328f7a20d9b895..fc8ea9147cd9e90926286bb795b58c6ba2cc0160 100644 (file)
@@ -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);
This page took 0.037097 seconds and 5 git commands to generate.