Skip to content
Snippets Groups Projects
Commit 2988287a authored by Brad King's avatar Brad King
Browse files

KWSys: Restore SIGSTOP/SIGKILL to end process tree

On UNIX systems we kill a tree of processes by performing a DFS walk of
the tree.  We send SIGSTOP to each process encountered, recursively
handle its children, and then send SIGKILL.

We once used the above approach in the past, but it was removed by the
commit "Do not send both SIGSTOP and SIGKILL when killing a process".
The commit was meant to work-around an OS X 10.3 bug in which the child
would not always honor SIGKILL after SIGSTOP.  At the time we wrongly
assumed that the process tree remains intact after SIGKILL and before
the child is reaped.  In fact the grandchildren may be re-parented to
ppid=1 even before the child is reaped, which causes the DFS walk to
miss them.
parent ed15ffc9
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment