LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 04-26-2011, 03: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: 2.6.18.128-el5. 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 05:06 AM. Reason: moved to Kernel
 
Old 04-26-2011, 02:23 PM   #2
nini09
Member
 
Registered: Apr 2009
Posts: 977

Rep: Reputation: 67
Can you specify which default handler you want to replace?
 
Old 04-27-2011, 01: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, 01:31 AM   #4
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,619
Blog Entries: 29

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

Also hit out Google with the keywords: defining signal handlers

Last edited by TheIndependentAquarius; 04-27-2011 at 01:35 AM.
 
Old 04-27-2011, 02:09 PM   #5
nini09
Member
 
Registered: Apr 2009
Posts: 977

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


Reply

Tags
linux


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 02:17 PM
Kernel panic: killing interrupt handler! In interrupt handler - not syncing. divyashree Programming 26 05-15-2010 01:27 PM
<0>Kernel panic: Aiee, killing interrupt handler! In interrupt handler - not syncing mrb Linux - Newbie 2 01-09-2005 09:47 AM


All times are GMT -5. The time now is 08:13 AM.

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