summaryrefslogtreecommitdiff
path: root/src/w32proc.c
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2007-09-02 17:01:02 +0000
committerJason Rumney <jasonr@gnu.org>2007-09-02 17:01:02 +0000
commita017b5157470ddde480d17812ad78ff6247b643d (patch)
tree22ce450e3d34b7aee5751f55d2125219a6cd8023 /src/w32proc.c
parent4b59f2d8609f171a9a875e9f1003fbb50a1d3202 (diff)
downloademacs-a017b5157470ddde480d17812ad78ff6247b643d.tar.gz
(delete_child): Don't terminate threads of zombies.
Diffstat (limited to 'src/w32proc.c')
-rw-r--r--src/w32proc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/w32proc.c b/src/w32proc.c
index adf5152f267..c21d589c525 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -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;