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

spt_sigaction(2) OSS System Calls Reference Manual
NAME
spt_sigaction - Species the action to take upon delivery of a signal (thread-aware version)
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
int spt_sigaction(
int sig,
const sigaction_t *act,
sigaction_t *o_action );
PARAMETERS
sig Species the signal number.
act Points to a sigaction_t structure that describes the new action to
be taken on delivery the signal identied by the sig parameter.
oact Points to a sigaction_t structure that returns the signal action
previously associated with the signal.
DESCRIPTION
The spt_sigaction() function allows the calling thread to change or examine the action to be
taken on delivery of a specic signal. This call removes any previously established signal
handler for this signal for this thread. You must reestablish the previous signal handler if you
want to use it at a later time.
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. If you export
SPT_THREAD_AWARE_SIGNAL to 1, the signal handler registered for that thread will be exe-
cuted immediately within the scope of the internal generic handler for pthreads. However, the
thread itself executes only when it is scheduled. Consequently, you cannot use thread-specic
functions like pthread_self() inside thread-specic signal handler functions.
Every signal has an associated default action. The spt_signal() function can change this action
by specifying that the receiving thread:
Ignore the delivery of a specic signal.
Restore the default action for a specic signal.
Invoke a signal-catching function in response to the delivery of a
specic signal.
For the dened signal names and details about the cause and default action of
each dened signal, see the signal(4) reference page
RETURN VALUES
Upon successful completion, the spt_sigaction() function returns the value 0 (zero). Otherwise,
the value -1 is returned, no new signal handler is installed, and errno is set to indicate the error.
7314 Hewlett-Packard Company 527186-007