DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

sigset(S)


sigset -- manipulate signal sets

Syntax

cc . . . -lc

#include  <signal.h>

int sigemptyset (set) sigset_t *set;

int sigfillset (set) sigset_t *set;

int sigaddset (set, signo) sigset_t *set; int signo;

int sigdelset (set, signo) sigset_t *set; int signo;

int sigismember (set, signo) sigset_t *set int signo;

Description

sigaddset- add a signal to the existing signal set

sigdelset- remove a signal from the existing signal set

sigemptyset- initialize the signal set to include no signals

sigfillset- initialize the signal set to include all signals

sigismember- test if a signal is in the existing signal set

These functions manipulate sets of signals. They operate on data objects addressable by the application. They do not operate 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 signal(S) or sigaction(S)).

The sigemptyset routine initializes the signal set to which the argument set points, so that all signals are excluded.

The sigfillset routine initializes the signal set to which the argument set points, so that all signals are included.

Applications should call either the sigemptyset or the sigfillset routines at least once for each object of type sigset_t before using that object. If an object of type sigset_t is not initialized as described but is used as an argument in any sigaddset, sigdelset, sigismember, sigaction, signal, sigprocmask, sigpending, or sigsuspend routine, its behavior is undefined.

The sigaddset adds and sigdelset deletes the individual signal specified by the argument signo from the signal set to which the argument set points.

The sigismember function tests whether the signal specified by the argument signo is a member of the signal set to which the argument set points.

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 a value of zero if it is not. Upon successful completion, the other functions return a value of zero. For all of the functions, if an error is detected, a value of -1 is returned and errno is set to indicate the error.

Diagnostics

For the following condition, the sigaddset, sigdelset, and sigismember functions return a -1 and set errno to the corresponding value:


[EINVAL]
The value of the signal argument is an invalid or unsupported signal number.

See also

sigaction(S), signal(M), signal(S), sigpending(S), sigprocmask(S), sigsuspend(S), sigsetjmp(S) sigsetv(S),

Standards conformance

sigset conforms with:

X/Open Portability Guide, Issue 3, 1989 .


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003