Tests whether a signal is a member of a signal set.
Syntax |
|
#include <signal.h>
int sigismember (const sigset_t *set, int sig);
|
Parameters |
|
- set
A pointer to a structure of type sigset_t containing a set of signals to test.
- sig
The signal number of the signal to test for membership in set. Valid signals are described in Table 3-6 “POSIX/iX Signals”.
Return Values |
|
- 1
The signal sig is a member of the signal set.
- 0
The signal sig is not a member of the signal set.
- -1
An error occurred. The test is not performed, and errno is set to indicate the error condition.
Description |
|
The sigismember() function tests whether or not the signal sig is a member of the set of signals specified in the structure pointed to by set.
Implementation Considerations |
|
Refer to the EFAULT error description below.
Errors |
|
If an error occurs, errno is set to one of the following values:
EFAULT | CAUSE
| The system detected a NULL or bad address in attempting to use
the set parameter. |
| ACTION
| Make sure that the pointer is correctly initialized.
|
EINVAL | CAUSE
| The signal sig is not a valid signal number. |
| ACTION
| Refer to Table 3-6 “POSIX/iX Signals” for descriptions of valid signal numbers.
|
See Also |
|
sigaction(), sigaddset(), sigdelset(), sigemptyset(), sigfillset(), <signal.h>, POSIX.1 (Section 3.3.3)