• Roland McGrath's avatar
    fix dangling zombie when new parent ignores children · 666f164f
    Roland McGrath authored
    This fixes an arcane bug that we think was a regression introduced
    by commit b2b2cbc4.  When a parent
    ignores SIGCHLD (or uses SA_NOCLDWAIT), its children would self-reap
    but they don't if it's using ptrace on them.  When the parent thread
    later exits and ceases to ptrace a child but leaves other live
    threads in the parent's thread group, any zombie children are left
    dangling.  The fix makes them self-reap then, as they would have
    done earlier if ptrace had not been in use.
    Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
    666f164f
exit.c 45.7 KB