PTHREAD_SIGMASK(3) BSD Programmer's Manual PTHREAD_SIGMASK(3)NAMEpthread_sigmask - manipulate current signal mask
SYNOPSIS
#include <pthread.h>
#include <signal.h>
int
pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);
DESCRIPTION
The pthread_sigmask() function examines and/or changes the calling
thread's signal mask (those signals that are blocked from delivery).
Signals delivered to the thread are blocked if they are members of the
thread-specific signal mask set.
If set is not null, the action of pthread_sigmask() depends on the value
of the parameter how. The calling thread's signal mask is changed as a
function of the specified set and the thread's current signal mask. The
function is specified by how using one of the following values from
<signal.h>:
SIG_BLOCK The new mask is the union of the current mask and the speci-
fied set.
SIG_UNBLOCK The new mask is the intersection of the current mask and the
complement of the specified set.
SIG_SETMASK The current mask is replaced by the specified set.
If oset is not null, it is set to the previous value of the signal mask.
When set is null, the value of how is insignificant and the mask remains
unset, providing a way to examine the signal mask without modification.
The system quietly disallows SIGKILL or SIGSTOP to be blocked.
RETURN VALUES
A 0 value indicated that the call succeeded. A non-zero return value in-
dicates that an error occurred and the value returned indicates the rea-
son.
ERRORS
The pthread_sigmask() call will fail and the current threads signal mask
will be unchanged if the following error occurs:
[EINVAL] how has a value other than those listed here.
SEE ALSOpthread_kill(2), sigsetmask(2), sigsetops(3)STANDARDS
The pthread_sigmask function call is expected to conform to IEEE
Std1003.1c (``POSIX'').
BSDI BSD/OS June 3, 1996 1