Re: Catch SIGSEGV from Linux kernel
- From: "F.Julien" <stopspam@xxxxxxxxxxxx>
- Date: Thu, 21 Feb 2008 08:07:12 +0100
David Schwartz wrote:
On Feb 20, 2:30 pm, "F.Julien" <stops...@xxxxxxxxxxxx> wrote:
I'd like to catch all processes that end because of a segmentation fault. My
goal is to print a kernel log when a process exit in that case.
I did look into the kernel code and the only solution I found is to patch the
function "send_signal" (file kernel/signal.c).
I did also search on google an existing kernel patch but I only found a very
old patch for 2.2 kernel.
I'm surprised that nobody wants to monitor this (especially sysadmin). Maybe I
missed something and a solution is already available.
So, is it possible to catch process that SIGSEGV with the 2.6.X kernel ? I can
patch the kernel but I feel that a simplest solution already exist...
Any thought would me appreciated.
Please DO NOT DO THIS unless the application has not arranged to catch
and handle the signal! Deliberately creating and catching a SIGSEGV is
a perfectly legitimate (and sometimes extremely useful) programming
technique.
DS
I didn't mean to block SIGSEGV from kernel. I just want to print a kern log to keep a track of processes that have crashed. Maybe 'send_signal' is the wrong place because like you said, processes can catch the signal and don't exit.
But I keep thinking that a log like this might be useful. I'm pretty to sure to already see that on another unix (a BSD but I don't remember which one).
--
Julian.
.
- References:
- Catch SIGSEGV from Linux kernel
- From: F.Julien
- Re: Catch SIGSEGV from Linux kernel
- From: David Schwartz
- Catch SIGSEGV from Linux kernel
- Prev by Date: Re: Catch SIGSEGV from Linux kernel
- Next by Date: Swap or I/O Improvement in Fedora 8?
- Previous by thread: Re: Catch SIGSEGV from Linux kernel
- Next by thread: Re: Catch SIGSEGV from Linux kernel
- Index(es):
Relevant Pages
|