Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sigsetops(3C) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sigaction(2)

sigpending(2)

sigprocmask(2)

sigsuspend(2)

signal(5)

sigsetops(3C)

NAME

sigemptyset, sigfillset, sigaddset, sigdelset, sigismember − manipulate signal sets

SYNOPSIS

#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

The POSIX sigsetops primitives manipulate sets of signals.  They 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 (see <signal.h>). 

The sigemptyset function initializes the signal set pointed to by the argument set, such that all signals defined in the system are excluded.  (See signal(5) for a list of defined signals.) 

The sigfillset function initializes the signal set pointed to by the argument set, such that all signals defined in the system are included.

The sigaddset and sigdelset functions respectively add and delete the individual signal specified by the value of the argument signo from the signal set pointed to by the argument set.

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

NOTES

Applications should call either sigempyset or sigfillset at least once for each object of type sigset_t prior to any other use of that object.  If such an object is not initialized in this way, but is nontheless supplied as an argument to any of the sigaddset, sigdelset, sigismember, sigaction, sigprocmask, sigpending, or sigsuspend functions, the results are undefined. 

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 above functions, if an error is detected, a value of −1 is returned and errno is set to indicate the error. 

ERRORS

If the following condition is detected, the sigaddset, sigdelset, and sigismember functions will return −1 and set errno to the following value:

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

If the following condition is detected, the sigfillset function will return −1 and set errno to the following value:

[EFAULT] set points to an invalid address. 

SEE ALSO

sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2), signal(5). 

CX/UX Programmer’s Reference Manual

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026