unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

SIGPROCMASK(2V)                                                SIGPROCMASK(2V)



NAME
       sigprocmask - examine and change blocked signals

SYNOPSIS
       #include <&lt;signal.h>&gt;

       int sigprocmask(how, set, oset)
       int how;
       sigset_t *set, *oset;

DESCRIPTION
       sigprocmask()  is  used  to  examine  or  change  (or both) the calling
       process's signal mask.  If the value of set is not NULL, it points to a
       set of signals to be used to change the currently blocked set.

       The  value of how indicates the manner in which the set is changed, and
       consists of one of the following values, as defined in the header <&lt;sig-
       nal.h>&gt;:

              SIG_BLOCK      The resulting set is the union of the current set
                             and the signal set pointed to by set.

              SIG_UNBLOCK    The resulting set is the intersection of the cur-
                             rent  set  and  the  complement of the signal set
                             pointed to by set.

              SIG_SETMASK    The resulting set is the signal set pointed to by
                             set.

       If  oset  is not NULL, the previous mask is stored in the space pointed
       to by oset.  If the value of set is NULL, the value of how is not  sig-
       nificant  and  the  process's signal mask is unchanged by this function
       call.  Thus, the call can be used to enquire  about  currently  blocked
       signals.

       If  there  are any pending unblocked signals after the call to sigproc-
       mask(), at least one of those signals is be delivered  before  sigproc-
       mask() returns.

       If  it  is not possible to block the SIGKILL and SIGSTOP signals.  This
       is enforced by the system without causing an error to be indicated.

       If any of the SIGFPE, SIGKILL, or SIGSEGV signals are  generated  while
       they are blocked, the result is undefined, unless the signal was gener-
       ated by a call to kill(2V).

       If sigprocmask() fails, the process's signal mask is not changed.

RETURN VALUES
       sigprocmask() returns:

       0      on success.

       -1     on failure and sets errno to indicate the error.

ERRORS
       EINVAL         The value of how is not equal to one of the defined val-
                      ues.

SEE ALSO
       sigpause(2V), sigpending(2V), sigvec(2), sigaction(3V), sigsetops(3V)



                                21 January 1990                SIGPROCMASK(2V)