Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)
Guardian Native C Library Calls (n - r) raise(3)
NAME
raise - Sends a signal to the calling process
LIBRARY
G-series native Guardian processes: system library
G-series native OSS processes: system library
H-series native Guardian processes: implicit libraries
H-series OSS processes: implicit libraries
SYNOPSIS
#include <signal.h>
int raise(
int signal);
PARAMETERS
signal Specifies a signal number.
DESCRIPTION
The raise() function sends the signal specified by the signal parameter to the executing program.
Calling this function is equivalent to the following:
error = kill(getpid( ), signal);
Use From the Guardian Environment
If 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 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 function is
identified by the SIG_DFL value for signal action.
If called in a code module compiled in the OSS environment and called from a TNS or
accelerated Guardian process (main() was compiled with systype guardian), the value -1 is
returned and errno is set to [ENOTOSS].
RETURN VALUES
Upon successful completion, the raise() function returns the value 0 (zero). Otherwise, the value
-1 is returned and errno is set to indicate the error.
ERRORS
If any of the following conditions occurs, the raise() function sets errno to the corresponding
value:
[EINVAL] The value of the signal parameter is an invalid or unsupported signal number.
[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
Commands: kill(1).
Functions: kill(2), sigaction(2), signal(3).
Files: signal(4).
527192-005 Hewlett-Packard Company 5−47