The Reliable Signal API

To use the reliable signal API, you must work with signal sets. These allow you to work with signal collections. Alternatively, signal sets can be used as masks that enable or disable collections of signals.

The data type that is used for constructing signal sets is sigset_t. This type is manipulated by the following functions:

#include <signal.h>

int sigemptyset(sigset_t *set);
int sigfillset(sigset_t *set);
int sigaddset(sigset_t *set,int signum);
int sigdelset(sigset_t *set,int signum);

int sigismember(const sigset_t *set,int signum);

The functions sigemptyset(3), sigfillset(3), sigaddset(3), and sigdelset(3) all manipulate the sigset_t data type. The last function, sigismember(3), allows you to test the sigset_t ...

Get Advanced UNIX Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.