Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
OSS Library Calls (s) signal(3)
NAME
signal - Specifies the action to take upon delivery of a signal
LIBRARY
G-series native Guardian processes: system library
G-series native OSS processes: system library
H-series and J-series native Guardian processes: implicit libraries
H-series and J-series OSS processes: implicit libraries
32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: |
/G/system/zdllnnn/zputdll
64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library: |
/G/system/zdllnnn/yputdll.PP
SYNOPSIS
#include <signal.h>
void (*signal(
int signal,
void (*function)(int))) (int);
PARAMETERS
signal Specifies the signal. The signal names are defined in the signal.h header file.
The range of valid signals depends on the requested action.
The signal( ) function does not support the SIGUNCP signal.
function Specifies the action to be taken upon receipt of the signal identified by the signal
parameter.
DESCRIPTION
The signal( ) function allows the calling process to change the action to be taken when a specific
signal is delivered to the process issuing this function call.
Associated with every signal is a signal-dependent default action. The signal( ) function can
change this action by causing the receiving process to
• Ignore the delivery of a specific signal.
• Restore the default action for a specific signal.
• Invoke a signal-catching function (that is, "catch" the signal) to execute in response to
the delivery of a specific signal.
If a signal-catching function is installed using the signal( ) function, then the action is restored to
the default action each time the signal is delivered. Note that this action is different from the
action taken by the sigaction( ) function.
See the signal(4) reference page for the defined signal names and details about the cause and
default action of each defined signal.
Use From the Guardian Environment
If signal( ) is called in a code module compiled in the Guardian environment and called from a
TNS or accelerated Guardian process (main( ) was compiled with systype guardian), the
signal-catching function found in the Guardian registry is entered. (The default signal-catching
function is identified by the SIG_DFL value for signal action.) If the signal specified by the sig-
nal parameter is unknown, the value -1 is returned and errno is set to [EINVAL].
If signal( ) is called in a code module compiled in the Guardian environment and called from a
G-series TNS or accelerated OSS process (main( ) was compiled with systype oss), the
signal-catching function found in the Guardian registry is entered. (The default signal-catching
527187-017 Hewlett-Packard Company 6−59