# HG changeset patch # User Jason Rumney # Date 1188752462 0 # Node ID bede1aa77f62d800cbcaebfe0215436f65826f3b # Parent f19fc38690cc7d7a29696fa9c0507305909a992c (delete_child): Don't terminate threads of zombies. diff -r f19fc38690cc -r bede1aa77f62 src/w32proc.c --- a/src/w32proc.c Sun Sep 02 17:00:06 2007 +0000 +++ b/src/w32proc.c Sun Sep 02 17:01:02 2007 +0000 @@ -216,12 +216,18 @@ /* 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;