PreviousNext

The POSIX sigwait( ) Service

The DCE Threads implementation of the POSIX sigwait( ) service allows any thread to block until one of a specified set of signals is delivered. A thread waits for any of the asynchronous signals, except for SIGKILL and SIGSTOP.

A thread cannot wait for a synchronous signal. This is because synchronous signals are the result of an error during the execution of a thread; if the thread is waiting for a signal, then it is not executing. Therefore, a synchronous signal cannot occur for a particular thread while it is waiting, and so the thread waits forever. POSIX stipulates that the thread must block the signals (using the UNIX system service sigprocmask( )) it waits for before calling sigwait( ).