Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


Search this Thread
Old 04-26-2011, 04:25 AM   #1
vl chowdary
LQ Newbie
Registered: Mar 2011
Posts: 5

Rep: Reputation: 0
How to replace the default handler with user defined handler in Linux kernel ?

Hi mates, I am working on "Creation of Postmortem data logger on Linux platform.". It is nothing but coredump utility creation manually on the basis of user needs.I got the call flow mechanism of core dump file creation in RHEL version: It follows as:

File Function called
1.source/ arch/i386/kernel/signal.c -----> do_signal( )
2.source/kernel/signal.c ----------> get_signal_to_deliver( )
3.source/fs/exec.c -------------> do_coredump( )
4.source/fs/binfmt_elf.c -------------> elf_core_dump( )

Now,as per project requirements, i need to modify the default signal handler definitions with my own user defined signal handler that handles various exceptions (SIGSEGV, SIGFPE, SIGABRT etc) causing coredump. Further, i need to build the kernel for keeping the changes in kernel with my handler replacing default handler.

Can anybody please share the proceedings to do those operations ?

Advance thanks to all repliers

Thanks vlc

Last edited by archtoad6; 04-26-2011 at 06:06 AM. Reason: moved to Kernel
Old 04-26-2011, 03:23 PM   #2
Senior Member
Registered: Apr 2009
Posts: 1,059

Rep: Reputation: 88
Can you specify which default handler you want to replace?
Old 04-27-2011, 02:25 AM   #3
vl chowdary
LQ Newbie
Registered: Mar 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Need replacement with these signal handlers..

I want to replace the default handlers for SIGSEGV,SIGFPE,SIGABRT etc which generate the coredump.
Old 04-27-2011, 02:31 AM   #4
Senior Member
Registered: Dec 2008
Posts: 4,633
Blog Entries: 29

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Read the man page of sigaction.

Also hit out Google with the keywords: defining signal handlers

Last edited by TheIndependentAquarius; 04-27-2011 at 02:35 AM.
Old 04-27-2011, 03:09 PM   #5
Senior Member
Registered: Apr 2009
Posts: 1,059

Rep: Reputation: 88
These handlers aren't in kernel, are in user space. Anisha answer should cover this.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SIGSEGV handler (segmentation fauld handler) myp Programming 8 03-08-2011 03:17 PM
Kernel panic: killing interrupt handler! In interrupt handler - not syncing. divyashree Programming 26 05-15-2010 02:27 PM
<0>Kernel panic: Aiee, killing interrupt handler! In interrupt handler - not syncing mrb Linux - Newbie 2 01-09-2005 10:47 AM

All times are GMT -5. The time now is 06:50 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration