Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sigprocmask(2) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

pause(2)

sigaction(2)

sigpending(2)

sigsuspend(2)

sigsetops(3C)

signal(5)

sigprocmask(2)

NAME

sigprocmask − examine and change pending signals

SYNOPSIS

#include <signal.h>

int sigprocmask (how, set, oset)
int how;
sigset_t ∗set, ∗oset;

DESCRIPTION

The POSIX sigprocmask function is used to examine or change (or both) the calling process’s signal mask.  If the value of the argument set is not NULL, it points to a set of signals to be used to change the currently blocked set.  The value of the argument how indicates the manner in which the set is changed, and consists of one of the following values, as defined in <signal.h>:

SIG_BLOCK The resulting set will be the union of the current set and the signal set pointed to by the argument set.

SIG_UNBLOCK
The resulting set shall be the intersection of the current set and the complement of the signal set pointed to by the argument set.

SIG_SETMASK The resulting set shall be the signal set pointed to by the argument set.

If the argument oset is not NULL, the previous mask is stored in the space pointed to by oset. If the value of the argument set is NULL, the value of the argument how is not significant and the process’s signal mask is unchanged by this function call; thus, the call can be used to enquire about currently blocked signals. 

NOTES

If there are any pending unblocked signals after the call to the sigprocmask function, at least one of those signals shall be delivered before the sigprocmask function returns. 

It is not possible to block the SIGKILL and SIGSTOP signals; this is enforced by the system without causing an error to be indicated. 

If the sigprocmask function fails, the process’s signal mask is not changed by this function call. 

RETURN VALUE

Upon successful completion a value of zero is returned.  Otherwise, a value of −1 is returned and errno is set to indicate the error. 

ERRORS

If any of the following conditions occur, the sigprocmask function shall return −1 and set errno to the corresponding value:

[EINVAL] The value of the how argument is not equal to one of the defined values. 

[EFAULT] The set or oset address space is not valid. 

SEE ALSO

pause(2), sigaction(2), sigpending(2), sigsuspend(2), sigsetops(3C), signal(5). 

CX/UX Programmer’s Reference Manual

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026