sigsetops(3)
Name
sigemptyset, sigfillset, sigaddset, sigdelset, sigismember − manipulate signal sets (POSIX)
Syntax
#include <signal.h>
int sigemptyset(set)
sigset_t *set;
int sigfillset (set)
sigset_t *set;
int sigaddset(set,sig)
sigset_t *set;
int sig;
int sigdelset(set,sig)
sigset_t *set;
int sig;
int sigismember(set,sig)
sigset_t *set;
int sig;
Description
The sigsetops() functions manipulate signal sets used by the other POSIX signal functions sigaction() sigprocmask() sigsuspend(.).
The sigemptyset() function initializes the signal set pointed to by the argument set so that all signals are excluded.
The sigfillset() function initializes the signal set pointed to by the argument set so that all signals are included.
The sigaddset() and sigdelset() functions respectively add and delete the individual signal specified by the value of the argument sig from the signal set pointed to by the argument set.
The sigismember() function tests whether the signal specified by the value of the argument sig is a member of the set pointed to by the argument set.
Return Value
Upon successful completion, the sigismember() function returns a value of 1 if the specified signal is a member of the set. If it is not a member of the set, a value of 0 is returned.
If the sigaddset() sigdelset() or sigismember() functions fail a −1 value is returned and errno is set to indicate the reason.
Diagnostics
The sigsetops() function will fail and the signal mask will remain unchanged if one of the following occur:
[EINVAL] The value of the sig argument is not a valid signal number