]> git.baikalelectronics.ru Git - kernel.git/commit
fix dangling zombie when new parent ignores children
authorRoland McGrath <roland@redhat.com>
Wed, 9 Apr 2008 06:12:30 +0000 (23:12 -0700)
committerRoland McGrath <roland@redhat.com>
Thu, 17 Jul 2008 01:02:34 +0000 (18:02 -0700)
commit6e9bd8a944b001439a0740b3aa652b711e76d4f8
tree27c6a77edbce3da0860b5bd05cf3a7a842140c2c
parent95a1405d36bc92304b2c14be9525a29e64e17eb2
fix dangling zombie when new parent ignores children

This fixes an arcane bug that we think was a regression introduced
by commit ef9869b90a480dce4ce5a9f6f44ba70261164f05.  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: Roland McGrath <roland@redhat.com>
kernel/exit.c