Subj : Re: sigwait() is not catching SIGUSR1 signal To : comp.programming.threads,comp.unix.programmer From : neelakantan Date : Sat Mar 12 2005 07:24 am > Your program looks OK... Although you should be checking the return > status of sigwait(). Right now, if it were to fail, you'd go into an > infinite hot loop. > > I wonder if you could be running LinuxThreads? That might explain why it > works when you use the kill(1) but not when the program uses kill(2). > LinuxThreads was able to manage only a loose approximation of the POSIX > process model; and one of the weakest areas was signal handling. In > particular, there was no such thing as a "process pending signal mask"; > a blocked signal would "stick" to the thread it hit first. When you > kill(1) the "process", externally, it may hit the main thread (which is > blocked in sigwait() and takes the signal as you expect), while the > kill(2) from within a different thread delivers the signal to itself, > finds it blocked, and pends against that thread... never reaching the > main thread's sigwait(). NGPT, however, shouldn't have this problem, and > I thought that was the default on Red Hat 9... Hi, If linuxThreads behaves so, Is it not violating the semantics that is mentioned in the man page of sigwait()?. I despiratly need a way out from this problem? Any suggestions will be highly appreciated. Thanks and regards, Neelakantan. .