SIGSETMASK(2)                    System Calls                    SIGSETMASK(2)




NAME

       sigsetmask - set signal mask


SYNOPSIS

       #include <signal.h>

       long sigsetmask(long mask);
       #define sigmask(signum)


DESCRIPTION

       sigsetmask  is usually used to restore signal masks after modifications
       by sigblock.  The parameter mask is the absolute  value  to  which  the
       process  signal mask will be set.  (Compare to sigblock, which adds the
       argument to the set of blocked signals.)

       If there are pending instances of signals which become unblocked by the
       sigsetmask  call,  they are 'released' into the system signal queue and
       their 'pending' status is cleared.  The system signal  queue  is  main‐
       tained by the kernel null process, and is used in situations where sig‐
       nals could not normally be sent (such as in interrupt handlers).

       sigmask is a macro that can be  used  to  calculate  signal  masks  for
       sigsetmask.   It  takes  a signal number, as listed in signal(2), as an
       argument and returns a mask corresponding to that signal.


RETURN VALUE

       The previous value of the signal mask is returned from sigsetmask.


CAVEATS

       If somehow the process re-blocks a signal released by sigsetmask before
       the  system signal queue processes it, it will be blocked and marked as
       pending.  This can happen if a signal handler makes a sigblock call.


SEE ALSO

       kill(2), sigblock(2), signal(2)



GNO                             19 January 1997                  SIGSETMASK(2)

Man(1) output converted with man2html