VMS Help
CRTL, sigvec
*Conan The Librarian
|
Permanently assigns a handler for a specific signal.
Format
#include <signal.h>
int sigvec (int sigint, struct sigvec *sv, struct sigvec *osv);
sigint
The signal identifier.
sv
Pointer to a sigvec structure (see the Description section).
osv
If osv is not NULL, the previous handling information for the
signal is returned.
If sv is not NULL, it specifies the address of a structure
containing a pointer to a handler routine and mask to be used
when delivering the specified signal, and a flag indicating
whether the signal is to be processed on an alternative stack.
If sv->onstack has a value of 1, the system delivers the signal
to the process on a signal stack specified with sigstack.
The sigvec function establishes a handler that remains
established until explicitly removed or until the image
terminates.
The sigvec structure is defined in the <signal.h> header file:
struct sigvec
{
int (*handler)();
int mask;
int onstack;
};
See the "Error and Signal Handling" chapter of the HP C RTL
Reference Manual for more information on signal handling.
0 Indicates that the call succeeded.
-1 Indicates that an error occurred.