sigaction

Examines or changes the action taken by a process when it receives a specific signal.

Library:LibC
Classification:ANSI
Service:Signal Services

Syntax

  #include <signal.h> 
   
  int sigaction (
     int                       sig,
     const struct sigaction   *act,
     struct sigaction         *oact );
  

Parameters

sig

(IN) Specifies the signal which should trigger the action. For a list of signals, see Section 5.1, Standard Signals.

act

(IN) Points to action to take. If a null pointer, the action is not changed.

oact

(OUT) Points to where the old action is saved, if not a null pointer.

Return Values

If successful, returns 0. Otherwise, returns -1 and sets errno to the following. No new signal-catching function is installed.

Decimal

Constant

Description

9

EINVAL

The value of the sig parameter is invalid or unsupported.

79

ENOTSUP

The operation is not supported because the NLM is not linked with POSIX semantics.

105

ENOCONTEXT

No thread context is present.

Remarks

Once an action has been specified for a specific signal, that action remains in affect until another actions is explicitly requested with another call to the sigaction function.

IMPORTANT:This function is only available to NLMs that are using POSIX semantics.

See Also