LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-22-2010, 07:44 AM   #1
feiyinzilgd
LQ Newbie
 
Registered: Jul 2010
Posts: 4

Rep: Reputation: 0
Question do threads in the process share the signal handler?


Hi
I am studying the Advanced Programming in the Unix Environment these days. When I come to the chapter of Threads and signals, I find it difficult for me to understand the statement that the signal disposition is shared by all threads in the process.

Dose it mean that threads in the same process share the signal handler or just the attributes that set by sigaction ?



I will appreciate your helping me.
 
Old 08-22-2010, 09:03 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Signals is multithreaded program are generally complicated. And yes, they're shared. And you don't know in which one it will be handled. What you can do is to block signals from being handled in some (or all except one) of your threads.
 
  


Reply

Tags
signal handler



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
do threads in the process share the signal handler? feiyinzilgd Linux - Software 5 08-23-2010 04:15 AM
user-define signal handler & coredump for signal 11(SIGSEGV) Alexlun Linux - Software 2 05-24-2009 06:37 AM
How to reinstall a signal handler after exec ( Strange behaviour in signal handling ) lali.p Programming 0 09-20-2008 12:11 PM
signal handler routine vdx Programming 7 09-24-2007 12:43 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:49 PM.

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