public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Multithreading and signals on linux
       [not found] <1156901077.044202.142840@h48g2000cwc.googlegroups.com>
@ 2006-08-30  1:45 ` Robert Hancock
  0 siblings, 0 replies; only message in thread
From: Robert Hancock @ 2006-08-30  1:45 UTC (permalink / raw)
  To: Shrikrishna Khare, linux-kernel

Shrikrishna Khare wrote:
> Hi,
> 
>     Am using pthread_kill to send SIGUSR1 from thread t1 to thread t2.
> However, I am unable to have "different" signal handlers for threads t1
> and t2 for same signal SIGUSR1.
>     I have ensured that I set the signal handler for t1 and t2
> separately in different functions. Could anyone please tell me if I am
> missing on something?

The signal will be handled in the thread specified, however signal 
handlers are global to the process. You cannot have different signal 
handlers for different threads in the same process. This is the way 
POSIX pthreads are specified to work.

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-08-30  1:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1156901077.044202.142840@h48g2000cwc.googlegroups.com>
2006-08-30  1:45 ` Multithreading and signals on linux Robert Hancock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox