Skip to content
  • Brad King's avatar
    KWSys: Restore SIGSTOP/SIGKILL to end process tree · 2988287a
    Brad King authored
    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.
    2988287a