|
|
#include <signal.h>int sigemptyset (set) sigset_t *set;
int sigfillset (set) sigset_t *set;
int sigaddset (set, signo) sigset_t *set; int signo;
int sigdelset (set, signo) sigset_t *set; int signo;
int sigismember (set, signo) sigset_t *set int signo;
sigdelset- remove a signal from the existing signal set
sigemptyset- initialize the signal set to include no signals
sigfillset- initialize the signal set to include all signals
sigismember- test if a signal is in the existing signal set
These functions manipulate sets of signals. They operate on data objects addressable by the application. They do not operate on any set of signals known to the system, such as the set blocked from delivery to a process or the set pending for a process (see signal(S) or sigaction(S)).
The sigemptyset routine initializes the signal set to which the argument set points, so that all signals are excluded.
The sigfillset routine initializes the signal set to which the argument set points, so that all signals are included.
Applications should call either the sigemptyset or the sigfillset routines at least once for each object of type sigset_t before using that object. If an object of type sigset_t is not initialized as described but is used as an argument in any sigaddset, sigdelset, sigismember, sigaction, signal, sigprocmask, sigpending, or sigsuspend routine, its behavior is undefined.
The sigaddset adds and sigdelset deletes the individual signal specified by the argument signo from the signal set to which the argument set points.
The sigismember function tests whether the signal specified by the argument signo is a member of the signal set to which the argument set points.
For the following condition, the sigaddset, sigdelset, and sigismember functions return a -1 and set errno to the corresponding value:
X/Open Portability Guide, Issue 3, 1989 .