]> git.eshelyaron.com Git - emacs.git/commitdiff
(delete_child): Don't terminate threads of zombies.
authorJason Rumney <jasonr@gnu.org>
Sun, 2 Sep 2007 17:01:02 +0000 (17:01 +0000)
committerJason Rumney <jasonr@gnu.org>
Sun, 2 Sep 2007 17:01:02 +0000 (17:01 +0000)
src/w32proc.c

index adf5152f2676268c83d021111dd5396d445472bd..c21d589c525581b205ab53f9bf77932dd30197ce 100644 (file)
@@ -216,12 +216,18 @@ delete_child (child_process *cp)
          /* let the thread exit cleanly if possible */
          cp->status = STATUS_READ_ERROR;
          SetEvent (cp->char_consumed);
+#if 0
+          /* We used to forceably terminate the thread here, but it
+             is normally unnecessary, and in abnormal cases, the worst that
+             will happen is we have an extra idle thread hanging around
+             waiting for the zombie process.  */
          if (WaitForSingleObject (cp->thrd, 1000) != WAIT_OBJECT_0)
            {
              DebPrint (("delete_child.WaitForSingleObject (thread) failed "
                         "with %lu for fd %ld\n", GetLastError (), cp->fd));
              TerminateThread (cp->thrd, 0);
            }
+#endif
        }
       CloseHandle (cp->thrd);
       cp->thrd = NULL;