Ah, so, by saying "do_signal_parent() must not return DEATH_REAP (this means thatIndeed. But, once again, that is why do_notify_parent() expects the deaddo_signal_parent() must not return DEATH_REAP (this means thatCould you please clarify this a bit: according to the comments
leader->exit_signal becomes -1), but this can happen and this is bug.
in signal.c:
---
* We are exiting and our parent doesn't care. POSIX.1
* defines special semantics for setting SIGCHLD to SIG_IGN
* or setting the SA_NOCLDWAIT flag: we should be reaped
* automatically and not left for our parent's wait4 call.
---
That's how I understand it: if DEATH_REAP is returned, the
parent ignores SIGCHILD, and in this case I am not allowing
it to read the detach code with wait(). What is the bug?
tsk! Please note that if it returns DEATH_REAP it sets ->exit_signal = -1.
And this is _only_ allowed if the leader is already dead and we are going
to reap it.