ssiiggpprrooccmmaasskk() -- System Call (libc)

Examine or change the signal mask
#iinncclluuddee <ssiiggnnaall.hh>
iinntt ssiiggpprrooccmmaasskk(_h_o_w, _s_e_t, _o_l_d__s_e_t)
iinntt _h_o_w; ccoonnsstt ssiiggsseett_tt *_s_e_t; ssiiggsseett_tt *_o_l_d__s_e_t;

ssiiggpprrooccmmaasskk() examines or changes the calling process's signal mask.

_h_o_w defines how to modify the mask, as follows:

SSIIGG_BBLLOOCCKK
     Add to the signal mask the set of signals to which _s_e_t points.

SSIIGG_UUNNBBLLOOCCKK
     Remove from the signal mask the set of signals to which _s_e_t points.

SSIIGG_SSEETTMMAASSKK
     Replace the current  signal mask with the set of  signals to which _s_e_t
     points.  If _o_l_d__s_e_t is not  NULL, ssiiggpprrooccmmaasskk() stores the old mask in
     the space to which it points.

If _s_e_t is  NULL, ssiiggpprrooccmmaasskk() ignores the value of  _h_o_w; thus, you can use
the call to find which signals are in the signal mask.

If   any  unblocked   unblocked  signals   are   pending  after   you  call
ssiiggpprrooccmmaasskk(),  at least  one  of those  signals will  be delivered  before
ssiiggpprrooccmmaasskk() returns.

If all goes well,  ssiiggpprrooccmmaasskk() returns zero.  ssiiggpprrooccmmaasskk() returns -1 if
either of the following conditions is true:

-> _h_o_w  is not  set to  a  recognized value.   ssiiggpprrooccmmaasskk() sets  eerrrrnnoo to
   EEIINNVVAALL.

-> _s_e_t  or _o_l_d__s_e_t  points outside the  process's allocated  address space.
   ssiiggpprrooccmmaasskk() sets eerrrrnnoo to EEFFAAUULLTT.

In either error condition, ssiiggpprrooccmmaasskk() does not change the signal mask.

_S_e_e _A_l_s_o
lliibbcc, ssiiggnnaall(), ssiigglloonnggjjmmpp(), ssiiggsseettjjmmpp()
POSIX Standard, section 3.3.5
