Re: Signals and threads
- From: "Nils O. Selåsdal" <NOS@xxxxxxx>
- Date: Tue, 28 Nov 2006 08:30:38 +0100
shibu-kundara wrote:
Hi.
Thanks for the response let me clear the question,
I have two thread registered two different signal handler
SigHndlrFuncA,SigHndlrFuncB
Both is registerd with SIGUSR1.
When i send SIGUSR1 signal to threadA why SigHndlrFuncB is getting
called instead of SigHndlrFuncA???
That's how pthreads work. You send a signal to a process.
One of the threads that does not block that signal, will run
the handler. You cannot predict which thread it will be if
more than one thread has the signal unblocked.
Earlier non-standard pthread implementation on linux worked
differently btw.
.
- References:
- Signals and threads
- From: shibu-kundara
- Re: Signals and threads
- From: loic-dev
- Re: Signals and threads
- From: shibu-kundara
- Re: Signals and threads
- From: "Nils O. Selåsdal"
- Re: Signals and threads
- From: shibu-kundara
- Signals and threads
- Prev by Date: Re: Signals and threads
- Next by Date: How to determin bit depth of a Gtk::Image?
- Previous by thread: Re: Signals and threads
- Next by thread: Re: Signals and threads
- Index(es):