Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

kill(2)

killpg(2)

sigaction(2)

signal(2)

sigsuspend(2)

sigpause(2)



  sigprocmask(2)                      CLIX                      sigprocmask(2)



  NAME

    sigprocmask - Examines or changes the current signal mask

  LIBRARY

    Standard C Library (libc.a)

  SYNOPSIS

    #include <signal.h>

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

  PARAMETERS

    how     Indicates the manner in which the set is changed; this parameter
            can have one of the following values:

            SIG_BLOCK
                   The resulting set is the union of the current set and the
                   signal set to which the set parameter points.

            SIG_UNBLOCK
                   The resulting set is the intersection of the current set
                   and the complement of the signal set to which the set
                   parameter points.

            SIG_SETMASK
                   The resulting set is the signal set to which the set
                   parameter points.

    set     Specifies the signal set.  If the value of the set parameter is
            not NULL, it points to a set of signals to be used to change the
            currently blocked set.  If the value of the set parameter is NULL,
            the value of the how parameter is not significant and the process
            signal mask is unchanged; thus, the call can be used to inquire
            about currently blocked signals.

    o_set   If the o_set parameter is not the NULL value, the signal mask in
            effect at the time of the call is stored in the space pointed to
            by the o_set parameter.

  DESCRIPTION

    The sigprocmask() function is used to examine or change the calling
    process signal mask.




  2/94 - Intergraph Corporation                                              1






  sigprocmask(2)                      CLIX                      sigprocmask(2)



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

    The sigprocmask() function does not allow the SIGKILL or SIGSTOP signals
    to be blocked.  If a program attempts to block one of these signals,
    sigprocmask() gives no indication of the error.

  EXAMPLES

    To set the signal mask to block only the SIGINT signal from delivery,
    enter the following:

    #include <signal.h>
    int return_value;
    sigset_t newset;
    sigset_t *newset_p;
     ...
    newset_p = &newset;
    sigemptyset(newset_p);
    sigaddset(newset_p, SIGINT);
    return_value = sigprocmask(SIG_SETMASK, newset_p, NULL);


  RETURN VALUES

    Upon completion, a value of 0 is returned.  If sigprocmask() fails, the
    signal mask of the process is unchanged, a value of -1 is returned, and
    the global variable errno is set to indicate the error.

  ERRORS

    The sigprocmask() function fails if the following is true:

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

  RELATED INFORMATION

    Functions:  kill(2), killpg(2), sigaction(2), signal(2), sigsuspend(2),
    sigpause(2)













  2                                              Intergraph Corporation - 2/94




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