Re: Catch SIGSEGV from Linux kernel
- From: David Schwartz <davids@xxxxxxxxxxxxx>
- Date: Wed, 20 Feb 2008 19:33:46 -0800 (PST)
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
.
- Follow-Ups:
- Re: Catch SIGSEGV from Linux kernel
- From: F.Julien
- Re: Catch SIGSEGV from Linux kernel
- References:
- Catch SIGSEGV from Linux kernel
- From: F.Julien
- Catch SIGSEGV from Linux kernel
- Prev by Date: Catch SIGSEGV from Linux kernel
- Next by Date: Journalling in VM?
- Previous by thread: Catch SIGSEGV from Linux kernel
- Next by thread: Re: Catch SIGSEGV from Linux kernel
- Index(es):
Relevant Pages
|