Re: [PATCH] emit logging when a process receives a fatal signal

Miquel van Smoorenburg
2006-11-18T10:40:05Z

In article <20061118023832.GG13827@flower.upol.cz>,
Oleg Verych <olecom@flower.upol.cz> wrote:
>On Sat, Nov 18, 2006 at 03:04:13AM +0100, Folkert van Heusden wrote:
>> > > > I found that sometimes processes disappear on some heavily used system
>> > > > of mine without any logging. So I've written a patch against 2.6.18.2
>> > > > which emits logging when a process emits a fatal signal.
>> > > Why not to patch default signal handlers in glibc, to have not only
>> > > stderr, but syslog, or /dev/kmsg copy of fatal messages?
>> > Afaik when a proces gets shot because of a segfault, also the libraries
>> > it used are shot so to say. iirc some of the more fatal signals are
>> > handled directly by the kernel.
>
>Kernel sends signals, no doubt.
>
>Then, who you think prints that "Killed" or "Segmentation fault"
>messages in *stderr*?
>[Hint: libc's default signal handler (man 2 signal).]

There is no such thing as a "libc default signal handler".
[Hint: waitpid (man 2 waitpid).]

Mike.