Review your favorite Linux distribution.
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, 08: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, 10:03 AM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,575

Rep: Reputation: 181Reputation: 181
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 05:15 AM
user-define signal handler & coredump for signal 11(SIGSEGV) Alexlun Linux - Software 2 05-24-2009 07:37 AM
How to reinstall a signal handler after exec ( Strange behaviour in signal handling ) lali.p Programming 0 09-20-2008 01:11 PM
signal handler routine vdx Programming 7 09-24-2007 01:43 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:31 PM.

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