#define SIG_BLOCK 1 #define SIG_UNBLOCK 2 #define SIG_SETMASK 3 int sigprocmask(int how, sigset_t *set, sigset_t *oldset);
This syscall fetches and/or changes the signal mask of the calling process. The signal mask is the set of signals whose delivery is currently blocked.
If not NULL, set can be used for passing a new mask, if not
NULL, oldset can be used for getting the existing mask.
The behaviour of the syscall will depend on the value passed to
how, which can be one of:
SIG_BLOCKThe blocked signals will be a union of the current ones and the passed ones.
SIG_UNBLOCKThe blocked signals will be the current ones minus the passed ones.
SIG_SETMASKThe blocked signals will be the passed ones.
It returns 0 on success and -1 on failure, with the following
errno:
EINVALhow is not valid.
EFAULTA non-NULL pointer points to not valid memory.