aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2007-09-02 17:01:02 +0000
committerJason Rumney2007-09-02 17:01:02 +0000
commita017b5157470ddde480d17812ad78ff6247b643d (patch)
tree22ce450e3d34b7aee5751f55d2125219a6cd8023 /src
parent4b59f2d8609f171a9a875e9f1003fbb50a1d3202 (diff)
downloademacs-a017b5157470ddde480d17812ad78ff6247b643d.tar.gz
emacs-a017b5157470ddde480d17812ad78ff6247b643d.zip
(delete_child): Don't terminate threads of zombies.
Diffstat (limited to 'src')
-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)
216 /* let the thread exit cleanly if possible */ 216 /* let the thread exit cleanly if possible */
217 cp->status = STATUS_READ_ERROR; 217 cp->status = STATUS_READ_ERROR;
218 SetEvent (cp->char_consumed); 218 SetEvent (cp->char_consumed);
219#if 0
220 /* We used to forceably terminate the thread here, but it
221 is normally unnecessary, and in abnormal cases, the worst that
222 will happen is we have an extra idle thread hanging around
223 waiting for the zombie process. */
219 if (WaitForSingleObject (cp->thrd, 1000) != WAIT_OBJECT_0) 224 if (WaitForSingleObject (cp->thrd, 1000) != WAIT_OBJECT_0)
220 { 225 {
221 DebPrint (("delete_child.WaitForSingleObject (thread) failed " 226 DebPrint (("delete_child.WaitForSingleObject (thread) failed "
222 "with %lu for fd %ld\n", GetLastError (), cp->fd)); 227 "with %lu for fd %ld\n", GetLastError (), cp->fd));
223 TerminateThread (cp->thrd, 0); 228 TerminateThread (cp->thrd, 0);
224 } 229 }
230#endif
225 } 231 }
226 CloseHandle (cp->thrd); 232 CloseHandle (cp->thrd);
227 cp->thrd = NULL; 233 cp->thrd = NULL;