SIGSET(3)

NAME
sigset, sigaddset, sigdelset, sigemptyset, sigfillset, sigismember - manipulate signal sets

SYNOPSIS
#include <signal.h>
int sigaddset(sigset_t *set, int sig)
int sigdelset(sigset_t *set, int sig)
int sigemptyset(sigset_t *set)
int sigfillset(sigset_t *set)
int sigismember(const sigset_t *set, int sig)

DESCRIPTION
The system calls that handle signals, such as sigaction(2) and sigprocmask(2) use sets of signals to keep a process from being interrupted by those signals while executing a signal handler or a critical code segment. These signal sets are manipulated by the following functions:

int sigaddset(sigset_t *set, int sig)
    Add signal sig to the signal set referenced by set.

int sigdelset(sigset_t *set, int sig)
    Remove signal sig from the signal set referenced by set.

int sigemptyset(sigset_t *set)
    Initialize the signal set referenced by set to an empty set.

int sigfillset(sigset_t *set)
    Initialize the signal set referenced by set to an full set, i.e. all signals are in the set.

int sigismember(const sigset_t *set, int sig)
    Return 1 if the signal sig is present in the set referenced by set, 0 otherwise.

SEE ALSO
sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2).

DIAGNOSTICS
All functions except sigismember return 0 on success. Sigismember returns 0 or 1 on success. They return -1 with error code EINVAL for an invalid signal number. (They do not use EFAULT for a bad set address, but will simply cause a segmentation violation.)

AUTHOR
Kees J. Bot (kjb@cs.vu.nl)