LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 08: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, 06: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, 06:37 AM   #3
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:32 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
Open Source Consulting | Domain Registration