Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

spt_sigsuspend(2) OSS System Calls Reference Manual
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 and J series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
int spt_sigsuspend(const sigset_t *sset);
PARAMETERS
sset Specifies 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
specified 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 specifies a set of signals to be blocked. A function does not receive or
respond to signals that are specified in the signal mask. However, the signals SIGSTOP, SIG-
KILL, and SIGABEND cannot be blocked or ignored, even if they are specified 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 environmental variable
to the value 1. By default, SPT_THREAD_AWARE_SIGNAL is disabled.
NOTES
To use this function in a threaded application that uses the Standard POSIX Threads library on
systems running J06.10 or later RVUs or H06.21 or later RVUs, you must perform all of the fol-
lowing tasks:
Include the spthread.h header file in the application.
Compile the application using the _SPT_MODEL_ feature test macro or equivalent
compiler command option in addition to any other feature test macros in use.
Link the application to the zsptdll library (/G/system/zdllnnn/zsptdll).
7420 Hewlett-Packard Company 527186-023