Subj : Re: NPTL and sigwait() problem under linux To : comp.programming.threads From : loic-dev Date : Wed Aug 17 2005 02:33 am Salut Daniele, > > Stopping right here (being lazy): [snip] > > So try pthread_sigmask instead. > > > You've stopped reading too early, I've already tried :-/ John is right, you should use pthread_sigmask() in multi-threaded process (as a matter of fact, on Linux sigprocmask() works exactly as pthread_sigmask() for MT process. But that's not a portable behavior, if portability is a concern). > Maybe it's a problem with my own system, I'm using libc6 (glibc) version > 2.3.2, with linux kernel 2.6.11.7 and 2.6.5, using nptl. > Running the program with LinuxThreads, typing > > # LD_ASSUME_KERNEL=2.4.21 ./myprogram > > works perfectly (but, of course, LinuxThreads is not fully standard > compliant). I can't see any problem with your code. I've tried it on my NPTL system (FC3), it behaves as expected (e.g. react upon Ctrl-C). I am suspecting an issue with your NPTL. Could you try if the slighty changed version of your program reacts accordingly upon Ctrl-C for instance? Could you send us the trace: bash$ strace -f test_prg Thanks, Loic. /* same as your snippet */ .... int main(void) { signal_init(); while (!terminate); signal_finish(); return 0; } .