Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)

signal(3) Guardian Native C Library Calls Reference Manual
returned and errno is set to [ENOTOSS].
Specifying the Signal
The signal parameter species the signal. All signal values are valid if the corresponding action
is to restore the default action. All signals can be caught or ignored except the SIGKILL, SIG-
STOP, and SIGABEND signals; these signals can neither be caught nor ignored.
Specifying the Function
The function parameter can have the SIG_DFL or SIG_IGN value, or it can point to a function.
SIG_DFL and SIG_IGN are dened in the signal.h header le. A SIG_DFL value requests
default action to be taken when the signal is delivered. A value of SIG_IGN requests that the
signal have no effect on the receiving process. A pointer to a function requests that the signal be
caught; that is, the signal causes the signal-handling function to be called. These actions are
described in detail in the signal(4) reference page.
The action is ignored when the function parameter is set to the SIG_DFL value for a signal that
cannot be caught or ignored.
RETURN VALUES
Upon successful completion, the signal() function returns the value of the previous signal action.
Otherwise, a value of SIG_ERR is returned and errno is set to indicate the error.
Note that SIG_ERR is not a valid value for a signal-catching function.
ERRORS
If any of the following conditions occurs, the signal() function sets errno to the corresponding
value and no new signal-catching function is installed:
[EINVAL] One of the following conditions exists:
The signal parameter is not a valid signal number.
An attempt was made to ignore or supply a signal-catching function for
the SIGKILL, SIGSTOP,orSIGABEND signal.
[ENOTOSS] The calling process is not an OSS process or a native Guardian process. Refer to
Use From the Guardian Environment for permitted uses.
RELATED INFORMATION
Functions: _exit(2), exit(3), kill(2), pause(3), setjmp(3), sigaction(2), sigprocmask(2), sig-
suspend(2), umask(2), wait(2).
Commands: kill(1).
Files: signal(4).
STANDARDS CONFORMANCE
The signal() function is provided for compatibility with older versions of the UNIX operating
system. Its function is a subset of that available with the sigaction() function.
The POSIX standards leave some features to the implementing vendor to dene. The following
features are affected in the HP implementation:
The action is ignored when the function parameter is set to the SIG_DFL value for a sig-
nal that cannot be caught or ignored.
628 Hewlett-Packard Company 527192-007