This is the mail archive of the
mailing list for the GCC project.
Re: gcc behavior on memory exhaustion
* Pedro Alves:
>> The siginfo_t information should indicate that the signal originated
>> from the kernel.
> OOC, where? While a parent process can use "waitid" to get
> a siginfo_t with information about the child exit, that siginfo_t
> is not the same siginfo_t a signal handler would get as
> argument if you could catch/intercept SIGKILL, which you can't
> on Linux. I.e., checking for e.g., si_code == SI_KERNEL in
> the siginfo filled in by waitid won't work, because that
> siginfo_t has si_code values for SIGCHLD [CLD_EXITED/CLD_KILLED/etc.],
> not for the signal that actually killed the process.
Oh, right. Maybe the UID field has a special value. But it's
probably zero, so you can't tell whether the system administrator or
the kernel has killed the process.
> Meanwhile, maybe just having the driver check for SIGKILL and
> enumerate likely causes would be better than the status quo.