pthread_sigmask - examine and change blocked signals
int pthread_sigmask(int operation, const sigset_t *set, sigset_t *old_set);
The pthread_sigmask() function manipulates the set of signals which are
blocked from delivery to the calling thread.
A non-NULL set specifies the set of signals to use in modifying the
currently active set. The incoming signals may be added to, deleted from
or completely replace the active set, as specified by the operation
parameter which may have the following values:
SIG_BLOCK Add specified signals to those in current mask.
SIG_UNBLOCK Remove the specified signals from the current mask.
SIG_SETMASK Replace the current mask with set.
If old_set is not NULL, the current set of blocked signals (before
modification) is returned in the space to which it points. In this way,
with a NULL set the user can determine the current signal mask.
Routines described in sigsetops() are used to create and examine the set
and old_set signal masks.
It is not possible to block SIGKILL or SIGSTOP. This restriction is
silently imposed by the system.
On success, pthread_sigmask() returns zero; otherwise, an error number is
[EINVAL] The value specified by operation is not equal to one of
the defined values.
sigaction(2), sigprocmask(2), sigsetops(3), pthread_kill(3P), signal(5).
In IRIX, sigprocmask() it is equivalent to pthread_sigmask().
PPPPaaaaggggeeee 1111 [ Back ]