Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     SIGPROCMASK(S)            UNIX System V            SIGPROCMASK(S)



     Name
          sigprocmask - examine and change blocked signals.

     Syntax
          #include <signal.h>

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

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

          The value of the argument how indicates the manner in which
          the set is changed, and consists of one of the following
          values, as defined in the header <signal.h>:

             Name                   Description
          _________________________________________________
          SIG_BLOCK     The resulting set is the union of
                        the current set and the signal set
                        pointed to by the argument set.

          SIG_UNBLOCK   The resulting set is the
                        intersection of the current set and
                        the complement of the signal set
                        pointed to by the argument set.

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

          If the argument oset is not NULL , the previous mask is
          stored in the space pointed to by oset . If the value of the
          argument set is NULL , the value of the argument how is not
          significant and the process's signal mask is unchanged by
          this function call; thus, the call can be used to inquire
          about currently blocked signals.

          If there are any pending unblocked signals after the call to
          the sigprocmask() function, at least one of those signals is
          delivered before the sigprocmask() fuction returns.

          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 , SIGILL , or SIGSEGV signals are
          generated while they are blocked, the result is undefined,
          unless the signal was generated by a call to the kill()
          function or the raise() function.

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

     Return Value
          Upon successful completion a value of zero is returned.
          Otherwise, a value of -1 is retruned and errno is set to
          indicate the error.

     See Also
          sigaction(S), sigpending(S), signal(S), sigset(S),
          sigsuspend(S)

     Diagnostics
          If any of the following conditions occur, the sigprocmask()
          function returns -1 and sets errno to the corresponding
          value:

               [EINVAL]       The value of the how argument is not
                              equal to one of the defined values.


     Standards Conformance
          sigprocmask is conformant with:
          IEEE POSIX Std 1003.1-1988 with C Standard Language-
          Dependent System Support;
          and NIST FIPS 151-1.

                                             (printed 6/20/89)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026