LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 05-22-2009, 09:50 AM   #1
Alexlun
LQ Newbie
 
Registered: Apr 2008
Posts: 19

Rep: Reputation: 0
user-define signal handler & coredump for signal 11(SIGSEGV)


Hello,
As we know, the defaule behavor will be generate a coredump for a process/thread received a signal 11, However, if I change the behavior for it by development a new signal handler, I didn't get the core file. So my question is:
1)I'd like to design a signal handler, and in this handler, I printf some userful info for the thread reveived the signal 11, but the most important of this, I'd like to generate the coredump just as the default behavior. So how i could do it?

Thank you in advance.
 
Old 05-24-2009, 07:05 AM   #2
Alexlun
LQ Newbie
 
Registered: Apr 2008
Posts: 19

Original Poster
Rep: Reputation: 0
Hello,all:
Could you give me some hints?
That's very kind of you.
thanks.
 
Old 05-24-2009, 07:37 AM   #3
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 670

Rep: Reputation: 134Reputation: 134
Quote:
Originally Posted by Alexlun View Post
Hello,all:
Could you give me some hints?
That's very kind of you.
thanks.
When you done with your custom signal handler, do something, that will trigger
additional segfault, for example
Code:
*(int *)0 = 1
But I dodn't sure that core dump after segfault interception will do help you.
What do you need this core dump for ?
 
  


Reply


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
How to reinstall a signal handler after exec ( Strange behaviour in signal handling ) lali.p Programming 0 09-20-2008 01:11 PM
signal 11 (sigsegv) when trying to print paulisstoned Linux - Newbie 1 04-22-2008 10:52 AM
Help regarding SIGSEGV signal catching and handling it. janardhan@eilabs.com Linux - Software 1 02-27-2008 06:06 AM
k3b crashes with signal 11 sigsegv cf050 Linux - Software 0 11-19-2004 10:39 AM
signal handling (SIGSEGV) in threads Sinner6 Programming 1 11-09-2004 05:52 PM


All times are GMT -5. The time now is 06:09 AM.

Main Menu
Advertisement
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