Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sigismember(3) [osf1 man page]

sigemptyset(3)						     Library Functions Manual						    sigemptyset(3)

NAME
sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - Creates and manipulates signal masks LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <signal.h> int sigemptyset ( sigset_t *set); int sigfillset ( sigset_t *set); int sigaddset ( sigset_t *set, int sig_number ); int sigdelset ( sigset_t *set, int sig_number ); int sigismember ( sigset_t *set, int sig_number ); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: sigemptyset(), sigfillset(), sigaddset(), sigdelset() sigismember(): XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies the signal set. Specifies the individual signal. DESCRIPTION
The sigemptyset(), sigfillset(), sigaddset(), sigdelset(), and sigismember() functions manipulate sets of signals. These functions operate on data objects that can be addressed 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 the sigfillset() or sigemptyset() function must be made at least once for each object of the type sigset_t prior to any other use of that object. The sigaddset() and sigdelset() functions respectively add and delete the individual signal specified by the sig_number parameter from the signal set specified by the set parameter. The sigismember() function tests whether the sig_number 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, enter: #include <signal.h> int return_value; sigset_t newset; . . . sigemptyset(&newset); sigaddset(&newset, SIGINT); return_value = sigprocmask (SIG_SETMASK, &newset, 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, or a value of 0 (zero) if it is not. Upon successful completion, the other functions return a value of 0. For all the preceding functions, if an error is detected, a value of -1 is returned and errno is set to indicate the error. ERRORS
The sigfillset(), sigdelset(), sigismember(), and sigaddset() functions set errno to the specified values for the following conditions: The value of the sig_number parameter is not a valid signal number. RELATED INFORMATION
Functions: sigaction(2), sigprocmask(2), sigsuspend(2), sigvec(2) Files: signal(4) Standards: standards(5) delim off sigemptyset(3)

Check Out this Related Man Page

sigsetops(3C)						   Standard C Library Functions 					     sigsetops(3C)

NAME
sigsetops, sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - manipulate sets of signals SYNOPSIS
#include <signal.h> int sigemptyset(sigset_t *set); int sigfillset(sigset_t *set); int sigaddset(sigset_t *set, int signo); int sigdelset(sigset_t *set, int signo); int sigismember(sigset_t *set, int signo); DESCRIPTION
These functions manipulate sigset_t data types, representing the set of signals supported by the implementation. The sigemptyset() function initializes the set pointed to by set to exclude all signals defined by the system. The sigfillset() function initializes the set pointed to by set to include all signals defined by the system. The sigaddset() function adds the individual signal specified by the value of signo to the set pointed to by set. The sigdelset() function deletes the individual signal specified by the value of signo from the set pointed to by set. The sigismember() function checks whether the signal specified by the value of signo is a member of the set pointed to by set. Any object of type sigset_t must be initialized by applying either sigemptyset() or sigfillset() before applying any other operation. RETURN VALUES
Upon successful completion, the sigismember() function returns 1 if the specified signal is a member of the specified set, or 0 if it is not. Upon successful completion, the other functions return 0. Otherwise -1 is returned and errno is set to indicate the error. ERRORS
The sigaddset(), sigdelset(), and sigismember() functions will fail if: EINVAL The value of the signo argument is not a valid signal number. The sigfillset() function will fail if: EFAULT The set argument specifies an invalid address. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |Async-Signal-Safe | +-----------------------------+-----------------------------+ SEE ALSO
sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2), signal.h(3HEAD), attributes(5), standards(5) SunOS 5.11 19 Dec 2003 sigsetops(3C)
Man Page