sigvec

Permanently assigns a handler for a specific signal.

Format

#include  <signal.h>

int sigvec  (int sigint, struct sigvec *sv, struct
            sigvec *osv);

Arguments

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.

Description

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 as follows:

struct sigvec
   {
      int   (*handler)();
      int   mask;
      int   onstack;
   };

See Section 4.2 for more information on signal handling.

Return Values
Indicates that the call succeeded. 
-1  Indicates that an error occurred. 


Previous Page | Next Page | Table of Contents | Index