Open System Services System Calls Reference Manual (G06.28+, H06.05+)

System Functions (s and S) spt_sigsuspend(2)
NAME
spt_sigsuspend - Changes the set of blocked signals and waits for a signal
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
int spt_sigsuspend(const sigset_t *
sset);
PARAMETERS
sset Species the set of signals to be blocked from delivery to the
calling thread.
DESCRIPTION
The spt_sigsuspend() function replaces the current signal mask of a thread with the signal set
specied by the sset parameter and suspends processing for the thread until the thread receives
one of the following signals:
SIGSTOP, SIGKILL, or SIGABEND.
A signal that is not a member of sset and has an action that:
Calls a signal-catching function.
Ends the request.
Terminates the process.
NOTE: The signal mask species a set of signals to be blocked. A function does
not receive or respond to signals that are specied in the signal mask. However,
the signals SIGSTOP, SIGKILL, and SIGABEND cannot be blocked or ignored,
even if they are specied in the signal mask.
If an incoming unblocked signal has an action to terminate, the
spt_sigsuspend() function never returns a value. If a signal-catching function
handles an incoming signal, the spt_sigsuspend() function returns only after the
signal-catching function returns. In this case, the signal mask of the thread is
restored to whatever it was before the spt_sigsuspend() function was called.
To catch externally generated signals (such as SIGINT, SIGQUIT, SIGALRM,
and SIGCHLD) at the thread level, you must export the
SPT_THREAD_AWARE_SIGNAL envronmental variable to the value 1. By
default, SPT_THREAD_AWARE_SIGNAL is disabled.
RETURN VALUES
When the signal is caught by the calling thread and control is returned from the signal-catching
function, the calling thread resumes execution from the point of suspension. The
spt_sigsuspend(2) function always returns -1 and sets errno to the value [EINTR].
ERRORS
The spt_sigsuspend(2) function alway sets errno to the following value:
[EINTR] The signal is caught by the calling thread and control is returned
from the signal-catching function.
527186-007 Hewlett-Packard Company 7319