SIGSETOPS(3)SIGSETOPS(3)NAME
sigsetops, sigemptyset, sigfillset, sigaddset, sigdelset, sigismember -
manipulate signal masks
SYNOPSIS
#include <signal.h>
sigemptyset(set);
sigset_t *set;
sigfillset(set);
sigset_t *set;
sigaddset(set, signo);
sigset_t *set;
int signo;
sigdelset(set, signo);
sigset_t *set;
int signo;
sigismember(set, signo);
sigset_t *set;
int signo;
DESCRIPTION
These functions manipulate signal mask stored in a sigset_t. They are
provided as macros, but actual functions are available if their names
are undefined (with #undef name).
The sigemptyset function initializes a signal set to be empty. The
sigfillset function initializes a signal set to contain all of the
known signals. One of these routines must be used to initialize a sig‐
nal set before its use by the other functions.
The sigaddset function adds a specified signal signo to a signal set.
The sigdelset function deletes a specified signal signo from a signal
set.
The sigismember function tests whether a specified signal signo is con‐
tained in a signal set.
RETURN VALUE
The sigismember function returnes 1 if the signal is a member of the
set, a 0 otherwise. The other functions return 0 upon success. A -1
return value indicates an error occurred and errno is set to indicated
the reason. The current implementation does not detect any errors.
ERRORS
These functions could fail if one of the following occurs:
[EINVAL] signo has an invalid value.
STANDARDS
These functions are defined by POSIX.1.
SEE ALSOkill(2), sigaction(2), sigsetops(2), sigsuspend(2)4.4 Berkeley Distribution July 1, 1990 SIGSETOPS(3)