From: Robert Hancock <hancockr@shaw.ca>
To: Shrikrishna Khare <shri.khare@gmail.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Multithreading and signals on linux
Date: Tue, 29 Aug 2006 19:45:15 -0600 [thread overview]
Message-ID: <44F4EDAB.3000903@shaw.ca> (raw)
In-Reply-To: <1156901077.044202.142840@h48g2000cwc.googlegroups.com>
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/
parent reply other threads:[~2006-08-30 1:46 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1156901077.044202.142840@h48g2000cwc.googlegroups.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44F4EDAB.3000903@shaw.ca \
--to=hancockr@shaw.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=shri.khare@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox