|HP-UX Reference > S
sigprocmask(2)HP-UX 11i Version 3: February 2007
sigprocmask — examine and change blocked signals
The sigprocmask() function allows the calling thread to examine and/or change its signal mask.
If the argument set is not a null pointer, it points to a set of signals to be used to change the currently blocked set.
The argument how indicates the way in which the set is changed and consists of one of the following values:
If the argument oset is not a null pointer, the previous mask is stored in the location pointed to by oset. If set is a null pointer, the value of the argument how is not significant and the thread's signal mask is unchanged; thus the call can be used to inquire about currently blocked signals.
If there are any pending unblocked signals after the call to sigprocmask(), at least one of those signals will be delivered before the call to sigprocmask() returns.
It is not possible to block those signals which cannot be ignored. This is enforced by the system without causing an error to be indicated.
If any of the SIGFPE, SIGILL, or SIGSEGV signals are generated while they are blocked, the result is undefined, unless the signal was generated by a call to kill() or raise().
If sigprocmask() fails, the thread's signal mask is not changed.
Upon successful completion, sigprocmask() returns 0. Otherwise -1 is returned, errno is set to indicate the error, and the thread's signal mask will be unchanged.
The sigprocmask() function will fail if:
Since each thread maintains its own blocked signal mask, sigprocmask() modifies only the calling thread's blocked signal mask.
For more information regarding signals and threads, refer to signal(5).
First released in Issue 3.
Entry included for alignment with the POSIX.1-1988 standard.