Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
Guardian Native C Library Calls (s) signal(3)
• Compile the application using the _PUT_MODEL_ feature test macro or equivalent
compiler command option.
• Compile the application using the -Wlp64 compiler command option.
• Link the application to the yputdll library (/G/system/zdllnnn/yputdll).
For detailed information about writing multi-threaded and 64-bit applications for the Open Sys-
tem Services environment, see the Open System Services Programmer’s Guide.
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), spt_signal(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 define. 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.
This function is an extension to the XPG4 Version 2 specification.
The following are HP extensions to the XPG4 Version 2 specification:
• HP defined several new signals, including SIGABEND. See the signal(4) reference
page for a complete list.
• The errno value [ENOTOSS] can be returned.
The use of this function with the POSIX User Thread Model library conforms to the following
industry standards:
• IEEE Std 1003.1-2004, POSIX System Application Program Interface
527192-018 Hewlett-Packard Company 6−41