up | Inhaltsverzeichniss | Kommentar

Manual page for SIGPROCMASK(2V)

sigprocmask - examine and change blocked signals

SYNOPSIS

#include <signal.h>

int sigprocmask(how, set, oset) 
int how; 
sigset_t *set, *oset;

DESCRIPTION

sigprocmask() is used to examine or change (or both) the calling process's signal mask. If the value of set is not NULL, it points to a set of signals to be used to change the currently blocked set.

The value of how indicates the manner in which the set is changed, and consists of one of the following values, as defined in the header <signal.h>:

SIG_BLOCK
The resulting set is the union of the current set and the signal set pointed to by set.
SIG_UNBLOCK
The resulting set is the intersection of the current set and the complement of the signal set pointed to by set.
SIG_SETMASK
The resulting set is the signal set pointed to by set.

If oset is not NULL, the previous mask is stored in the space pointed to by oset. If the value of set is NULL, the value of how is not significant and the process's signal mask is unchanged by this function call. Thus, the call can be used to enquire about currently blocked signals.

If there are any pending unblocked signals after the call to sigprocmask(), at least one of those signals is be delivered before sigprocmask() returns.

If it is not possible to block the SIGKILL and SIGSTOP signals. This is enforced by the system without causing an error to be indicated.

If any of the SIGFPE, SIGKILL, or SIGSEGV signals are generated while they are blocked, the result is undefined, unless the signal was generated by a call to kill.2v

If sigprocmask() fails, the process's signal mask is not changed.

RETURN VALUES

sigprocmask() returns:

0
on success.
-1
on failure and sets errno to indicate the error.

ERRORS

EINVAL
The value of how is not equal to one of the defined values.

SEE ALSO

sigpause.2v sigpending.2v sigvec.2 sigaction.3v sigsetops.3v


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97