Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
OSS Library Calls (s) sigemptyset(3)
NAME
sigemptyset - Initializes a signal mask to exclude all signals
LIBRARY
G-series native OSS processes: system library
H-series and J-series OSS processes: implicit libraries
SYNOPSIS
#include <signal.h>
int sigemptyset(
sigset_t *set );
PARAMETERS
set Points to the signal set to be initialized.
DESCRIPTION
The sigemptyset( ) function initializes the signal set pointed to by the set parameter such that all
signals are excluded.
This function operates on data objects that can be addressed by the application, not on any set of
signals known to the system. This function is not for operating on the set of signals blocked from
delivery to a process or the set pending for a process.
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. If the object is used without such
initialization, the results are undefined for all other signal-related operations.
EXAMPLES
The following example shows how to generate and use a signal mask that blocks only the SIG-
INT signal from delivery.
#include <signal.h>
int return_value;
sigset_t newset;
sigset_t *newset_p;
...
newset_p = &newset;
sigemptyset(newset_p);
sigaddset(newset_p, SIGINT);
return_value = sigprocmask (SIG_SETMASK, newset_p, NULL);
RETURN VALUES
Upon successful completion, the sigemptyset( ) function returns the value 0 (zero).
ERRORS
This function never sets the value of errno.
RELATED INFORMATION
Functions: sigaction(2), sigaddset(3), sigdelset(3), sigfillset(3), sigismember(3), sigproc-
mask(2), sigsuspend(2).
Files: signal(4).
STANDARDS CONFORMANCE
The POSIX standards leave some features to the implementing vendor to define. The following
features are affected in the HP implementation:
• Use of an object of type sigset_t in a signal-related operation without prior initialization
by either the sigemptyset( ) or sigfillset( ) function causes undefined results.
527187-017 Hewlett-Packard Company 6−53