xref: /original-bsd/lib/libc/gen/sigsetops.3 (revision 92ab646d)
Copyright (c) 1983 The Regents of the University of California.
All rights reserved.

%sccs.include.redist.man%

@(#)sigsetops.3 6.1 (Berkeley) 07/01/90

SIGSETOPS 3 ""
C 7
NAME
sigsetops, sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - manipulate signal masks
SYNOPSIS
 #include <signal.h> 
 sigemptyset(set);  sigset_t *set; 
 sigfillset(set);  sigset_t *set; 
 sigaddset(set, signo);  sigset_t *set;  int signo; 
 sigdelset(set, signo);  sigset_t *set;  int signo; 
 sigismember(set, signo);  sigset_t *set;  int signo; 
DESCRIPTION
These functions manipulate signal mask stored in a sigset_t . They are provided as macros, but actual functions are available if their names are undefined (with #undef name ).

The sigemptyset function initializes a signal set to be empty. The sigfillset function initializes a signal set to contain all of the known signals. One of these routines must be used to initialize a signal set before its use by the other functions.

The sigaddset function adds a specified signal signo to a signal set. The sigdelset function deletes a specified signal signo from a signal set.

The sigismember function tests whether a specified signal signo is contained in a signal set.

"RETURN VALUE
The sigismember function returnes 1 if the signal is a member of the set, a 0 otherwise. The other functions return 0 upon success. A -1 return value indicates an error occurred and errno is set to indicated the reason. The current implementation does not detect any errors.
ERRORS
These functions could fail if one of the following occurs:

15 [EINVAL] signo has an invalid value.

STANDARDS
These functions are defined by POSIX.1.
"SEE ALSO"
kill(2), sigaction(2), sigsetops(2), sigsuspend(2)