HP 3000 Manuals

sigprocmask [ MPE/iX Developer's Kit Reference Manual Volume I ] MPE/iX 5.0 Documentation


MPE/iX Developer's Kit Reference Manual Volume I

sigprocmask 

Examines or changes blocked signals.

Syntax 

     #include <signal.h>
     int sigprocmask (int how, const sigset_t *set,
      sigset_t *oset);

Parameters 

how        Indicates how the process's signal mask should be changed by
           the parameter set.  One only of the following values must be
           passed:

           SIG_BLOCK     Add the specified signals in set to the
                         process's signal mask.
           SIG_UNBLOCK   Delete the specified signals in set from the
                         process's signal mask.
           SIG_SETMASK   Replace the process's signal mask with the
                         signal mask pointed to by set.

set        If not NULL, a pointer to a structure of type sigset_t
           containing a set of signals to use when changing the calling
           process's signal mask in the manner defined by how.  If NULL,
           how is ignored and the process's signal mask remains
           unchanged.

oset       If not NULL, a pointer to a structure of sigset_t that returns
           the process's previous signal mask (prior to any changes).  If
           NULL, the current signal mask is not returned.

Return Values 

0          Success.

-1         An error occurred.  The process's signal mask is not changed,
           and errno is set to indicate the error condition.

Description 

The sigprocmask() function allows the caller to examine or change (or
both) the calling process's signal mask.  If any pending unblocked
signals remain after a call to sigprocmask(), at least one of those
signals is delivered to the calling process before the function returns.

It is not possible to block the signals SIGKILL and SIGSTOP. If specified
in the structure pointed to by set, they are removed by the system
without error.

Implementation Considerations 

Refer to the EFAULT error description below.

Refer to Table 3-5  for implementation considerations associated with
signals.

Errors 

If an error occurs, errno is set to one of the following values:

EFAULT            CAUSE           The system detected a bad address in attempting to
                                  use the set or oset parameters.
                  ACTION          Make sure that the pointer is correctly initialized.

EINVAL            CAUSE           The value of how is not valid.
                  ACTION          Specify valid values for how.

See Also 

sigaction(), sigpending(), sigsuspend(), <signal.h>, POSIX.1 (Section
3.3.5)



MPE/iX 5.0 Documentation