sigemptyset(2) CLIX sigemptyset(2)
NAME
sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - Creates and
manipulates signal masks
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <signal.h>
int sigemptyset(
sigset_t *set );
int sigfillset(
sigset_t *set );
int sigaddset(
sigset_t *set ,
int signalnumber );
int sigdelset(
sigset_t *set ,
int signalnumber );
int sigismember(
sigset_t *set ,
int signalnumber );
PARAMETERS
set Specifies the signal set.
signalnumber Specifies the individual signal.
DESCRIPTION
The sigemptyset(), sigfillset(), sigaddset(), sigdelset(), and
sigismember() functions manipulate sets of signals. 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.
The sigemptyset() function initializes the signal set pointed to by the
set parameter, such that all signals are excluded. The sigfillset()
function initializes the signal set pointed to by the set parameter, such
that all signals are included. A call to either sigfillset() or
sigemptyset() should be made at least once for each object of the type
sigset_t prior to any other use of that object.
2/94 - Intergraph Corporation 1
sigemptyset(2) CLIX sigemptyset(2)
The sigaddset() function adds, and the sigdelset() function deletes, the
individual signal specified by the signalnumber parameter from the signal
set specified by the set parameter. The sigismember() function tests
whether the signalnumber parameter is a member of the signal set pointed
to by the set parameter.
EXAMPLES
To generate and use a signal mask that blocks only the SIGINT signal from
delivery, use the following:
#include <signal.h>
int return_value;
sigset_t newset;
sigset_t *newset_p;
...
newset_p = &newset;
sigemptyset(newset);
sigaddset(newset, SIGINT);
return_value = sigprocmask (SIG_SETMASK, newset_p, NULL);
RETURN VALUES
Upon successful completion, the sigismember() function returns a value of
1 if the specified signal is a member of the specified set. Otherwise, it
returns a value of 0. Upon successful completion, the other functions
return a value of 0. For all functions documented in this manpage, if an
error is detected, a value of -1 is returned and the global variable errno
is set to indicate the error.
ERRORS
The sigfillset(), sigdelset(), sigismember(), and sigaddset() functions
fail if the following is true:
[EINVAL] The value of the signalnumber parameter is not a valid signal
number.
RELATED INFORMATION
Functions: sigprocmask(2), sigsuspend(2), sigaction(2), signal(2)
2 Intergraph Corporation - 2/94