This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.

Indeed.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]