View the Most Wanted LQ Wiki articles.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


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

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

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
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,545

Rep: Reputation: 160Reputation: 160
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.


signal handler

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
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

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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration