sigprocmask -- Modify a Program's Signal Mask

SYNOPSIS

 #include <lcsignal.h>

 int sigprocmask(int block, const sigset_t *newset, sigset_t *oldset);
 
The synopsis for the POSIX implementation is
 #include <signal.h>

 int sigprocmask(int block, const sigset_t *newset, sigset_t *oldset);
 
You should use <signal.h> only if an appropriate feature test macro has been defined.

DESCRIPTION

sigprocmask modifies the signal mask of the calling program.

block specifies the type of modification. Values for block are

SIG_BLOCK
specifies that the signals in newset should be blocked (other signals are not changed).
SIG_UNBLOCK
specifies that the signals in newset should not be blocked (other signals are not changed).
SIG_SETMASK
specifies that exactly the set of signals specified by newset should be blocked.

The newset and oldset arguments are both pointers to structures of type sigset_t, which is declared in <lcsignal.h> and <signal.h>. The newset argument is the new set of signals that should be blocked or unblocked. If newset is NULL, then the mask is not changed. oldset is a pointer to a signal set where the previous set of blocked signals is to be stored. If oldset is NULL, the previous signal mask is not stored.

You can use the sigprocmask function to change the blocking of signals that are managed by either SAS/C or OpenEdition. If oesigsetup has not been called, any attempt to change the blocking status of signals managed by OpenEdition is ignored.

RETURN VALUE

sigprocmask returns 0 if it is successful and - 1 if it is not successful.

EXAMPLE

See the example for sigsetjmp.

RELATED FUNCTIONS

sigaddset, sigsuspend

SEE ALSO


Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.