sigaction

Contains information about a signal action. This is only available for NLMs that are using POSIX semantics.

Service:Signal Services

Syntax

  #include <signal.h>
  
  struct sigaction
  {
     void     (*sa_handler)( int );
     sigset_t   sa_mask;
     int        sa_flags;
  };
  

Fields

sa_handler

Points to the function to call

sa_mask

Specifies a mask of signals which should be blocked during execution of the signal handler.

sa_flags

Specifies a set of flags which modify the behavior of the signal handling process. It is formed by the bitwise OR of zero or more of the following:

Flag

Value

Description

SA_NOCLDSTOP

0x00000001

Indicates that the process does not want to receive notification when a child process stops.

SA_ONESHOT

0x00000002

Restores the signal action to the default state once the signal handler has been called

SA_RESETHAND

0x00000002

Same as SA_ONESHOT.

SA_ONSTACK

0x00000004

Calls the signal handler on an alternate signal stack. If an alternate stack is not available, the default stack is used.

SA_RESTART

0x00000008

Makes certain system calls restartable across signals.

SA_NODEFER

0x00000010

Allows the signal to be received from within its own signal handle.

SA_NOMASK

0x00000010

Same as SA_NODEFER.

SA_SIGINFO

0x00000020

Indicates that the sa_handler field has been replaced with a pointer to a signal catching function.