Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sigprocmask(2) — Motorola System V 88k Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sigaction(2)

signal(2)

sigsetopts(3C)

signal(5)

sigprocmask(2)  —  SYSTEM CALLS

NAME

sigprocmask − change or examine signal mask

SYNOPSIS

#include <signal.h>

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

DESCRIPTION

The sigprocmask function is used to examine and/or change the calling process’s signal mask.  If the value is SIG_BLOCK, the set pointed to by the argument set is added to the current signal mask.  If the value is SIG_UNBLOCK, the set pointed by the argument set is removed from the current signal mask.  If the value is SIG_SETMASK, the current signal mask is replaced by the 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 how is not significant and the process’s signal mask is unchanged; thus, the call can be used to enquire 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 that cannot be ignored [see sigaction(2)]; this restriction is silently imposed by the system. 

If sigprocmask fails, the process’s signal mask is not changed. 

sigprocmask fails if any of the following is true:

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

EFAULT The value of set or oset points outside the process’s allocated address space. 

NOTES

Signals resulting from machine exceptions cannot be blocked or ignored.  The system silently ignores attempts to do so.  The signals that result from machine exceptions are SIGSEGV, SIGILL, SIGBUS, SIGTRAP, and SIGFPE.  The behavior of a process that generates a machine exception (e.g. floating point exception or bus error) that gives rise to a signal that is blocked or ignored is specifically undefined and not portable.  The behavior may change in future releases or on different processor boards. 

SEE ALSO

sigaction(2), signal(2), sigsetopts(3C), signal(5)

DIAGNOSTICS

On success, sigprocmask returns zero.  On failure, it returns −1 and sets errno to indicate the error. 

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