[PATCH 07/11] Re-add zombie leader on exit, gdb/linux

Simon Marchi simark@simark.ca
Mon Mar 7 20:31:46 GMT 2022


On 2022-03-07 15:27, Pedro Alves wrote:
> Hmm, can you clarify?  We're doing this for both WIFEXITED and WIFSIGNALED.  The
> WIFSTOPPED case doesn't get here, it's handled in the if/then branch.  I do think
> we need to do this for exits due to WIFSIGNALED just the same.  Do you think
> otherwise?

Ah I missed the WIFSTOPPED check above.  The case I was thinking was "what if we
get a WIFSTOPPED for a deleted zombie leader, that would probably be some problem
in the kernel, we don't want to add it back".  And I didn't think about WSIGNALED.

So effectively, I was proposing to have:

else if (WIFSIGNALED (status) || WIFEXITED (status)

instead of an "else".  But given that WIFSIGNALED and WIFEXITED are the only
plausible alternatives to WIFSTOPPED, it's not really necessary.

Simon


More information about the Gdb-patches mailing list