sigset_t
Number set and signal set operation function: The signal set is defined as a data type:
typedef struct {
unsigned long sig[_nsig_words];
} sigset_t
The signal set is used to describe the set of signals, and all the signals supported by Linux can appear in the signal set in whole or in part, mainly in conjunction with the signal blocking correlation function. The following are the related functions defined for the signal set operation:
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);
Header file
#include <signal.h>
Sigemptyset (sigset_t *set) initializes the set of signals specified by the set, and all signals inside the signal set are emptied;
Sigfillset (sigset_t *set) calls this function, the set points to the signal set will contain 64 kinds of signals supported by Linux;
Sigaddset (sigset_t *set, int signum) adds a signum signal to the set-directed signal set;
Sigdelset (sigset_t *set, int signum) deletes the signum signal in set-directed signal set;
The Sigismember (const sigset_t *set, int signum) determines whether the signal Signum is in the set-directed signal set.
Reprint Link: http://blog.csdn.net/haidonglin/article/details/4368262
Linux process Signal Set sigset_t-(transferred from Linengeir's column)