Commit a017b515 authored by Jason Rumney's avatar Jason Rumney
Browse files

(delete_child): Don't terminate threads of zombies.

parent 4b59f2d8
......@@ -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);
CloseHandle (cp->thrd);
cp->thrd = NULL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment