Re: Signals and threads



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