Skip to content
  • danielsdeleo's avatar
    Always send KILL to process group · a4c67900
    danielsdeleo authored
    There is not a good way to reliably detect whether all grandchildren
    have exited after sending a TERM to the process group; if the child has
    correctly exited, grandchildren (which may be unresponsive) will have
    been adopted by init (ppid == 1) so the parent cannot wait() on them. To
    ensure no stuck grandchildren are left, send a KILL to the process group
    after allowing the processes time to clean up.
    a4c67900