Subj : Re: NPTL and sigwait() problem under linux To : comp.programming.threads From : Daniele Date : Thu Aug 18 2005 08:09 pm Loic Domaigne wrote: >> I didn't even try, but *yes it works* ... :-PPP >> >> But that code is part of a bigger program, and in that case it doesn't. >> There must be something wrong somewhere else, of course. > > > Can you tell us what doesn't work exactly? It doesn't respond to CTRL-C from the console, nor to kill -TERM . It just terminates, as would do the default handler... Anyway, I've solved the problem. Once I realized the bug wasn't in the signal handler thread, I've started looking in the code before and after signal_init(). I discovered there was a thread created before signal_init() (hidden in another call, so it wasn't so easy to find), and it wasn't blocking any signal. Of course, having two or more thread that don't block the signal, different systems and implementations may deliver it to different threads... Thanks for the help, Daniele P.S. Now I install handlers for SIGSEGV and SIGFPE after signal_init(), in the main thread, and they are working fine. .