sigaddset

Adds a signal to a signal set.

Library:LibC
Classification:ANSI
Service:Signal Services

Syntax

  #include <signal.h> 
   
  int sigaddset (
     sigset_t   *set,
     const int   sig);
  

Parameters

set

(IN) Points to the signal set.

sig

(IN) Specifies the signal to add to the signal set. For a list of signals, see Section 5.1, Standard Signals.

Return Values

If successful, returns 0. Otherwise, returns -1 and sets errno to the following:

Decimal

Constant

Description

9

EINVAL

The value of the sig parameter is invalid or unsupported.

Remarks

You must call either sigemptyset or sigfillset at least once to initialized each object of type sigset_t before calling sigaddset or any of the other functions which manage the signal set.

See Also