Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sigemptyset(3) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sigprocmask, sigsetmask, sigblock

sigsuspend, sigpause

sigaction, sigvec, signal



SIGEMPTYSET(3,L)            AIX Technical Reference            SIGEMPTYSET(3,L)



-------------------------------------------------------------------------------
sigemptyset, sigfillset, sigaddset, sigdelset, sigismember



PURPOSE

Creates and manipulates signal masks.

LIBRARY

Standard C Library (libc.a)

SYNTAX

#include <signal.h>




                int sigemptyset (set)       int sigdelset (set, signo)
                sigset_t *set;              sigset_t *set;
                                            int signo;
                int sigfillset (set)
                sigset_t *set;              int sigismember (set, signo)
                                            sigset_t *set;
                int sigaddset (set, signo)  int signo;
                sigset_t *set;
                int signo;



DESCRIPTION

The sigemptyset, sigfillset, sigaddset, sigdelset and sigismember subroutines
manipulate signal masks.  These functions operate on data objects addressable
by the application, not on any set of signals known to the system, such as the
set blocked from delivery to a process or the set pending for a process (see
"sigaction, sigvec, signal").

The sigemptyset function initializes the signal set pointed to by the parameter
set such that all signals are excluded.  The sigfillset function initializes
the signal set pointed to by the parameter set such that all signals are
included.  A call to either sigemptyset or sigfillset must be made a least once
for each object of type sigset_t prior to any other use of that object.  If
such an object is not initialized in this way, but is nonetheless supplied as
an argument to any of sigaddset, sigdelset, sigismember, sigaction,
sigprocmask, or sigsuspend, the results are undefined.

The sigaddset and sigdelset functions respectively add and delete the
individual signal specified by the signo parameter from the signal set




Processed November 7, 1990     SIGEMPTYSET(3,L)                               1





SIGEMPTYSET(3,L)            AIX Technical Reference            SIGEMPTYSET(3,L)



specified by the set parameter.  The sigismember function tests whether the
signo is a member of the signal set pointed to by the set parameter.

RETURN VALUE

Upon successful completion, the sigismember function returns a value of one if
the specified signal is a member of the specified set, or the value of 0 if
not.  Upon successful completion, the other functions return a value of 0.  For
all the above functions, if an error is detected, a value of -1 is returned and
errno is set to indicate the error.

ERROR CONDITIONS

The sigaddset and sigdelset subroutines fail if the following is true:

EINVAL  The value of the signo parameter is not a valid signal number, or set
        is NULL.

EXAMPLE

To generate and use a signal mask that blocks only SIGINT from delivery:

  #include <signal.h>
  #include <unistd.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);

RELATED INFORMATION

In this book:  "sigprocmask, sigsetmask, sigblock,"  "sigsuspend, sigpause,"
and  "sigaction, sigvec, signal."

















Processed November 7, 1990     SIGEMPTYSET(3,L)                               2



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