sigsuspend

Replaces the thread's signal mask and then suspends the thread until a signal is received.

Library:LibC
Classification:ANSI
Service:Signal Services

Syntax

  #include <signal.h> 
   
  int sigsuspend (
     const sigset_t   *mask );
  

Parameters

mask

(IN) Points to the signal set to use for the thread's signal mask.

Return Values

Because thread execution is suspended indefinitely, no successful return code has been defined. If an error occurs, returns -1 and sets errno to the following:

Decimal

Constant

Description

9

EINVAL

The signal handler is invalid.

63

EINTR

The calling process caught a signal.

Remarks

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

The sigsuspend function replaces the current signal mask of the calling thread with the set of signals in the mask parameter. The thread is then suspended until it receives a signal whose action is either to execute a signal-catching function or to terminate the process.

If the action is to terminate the process, sigsuspend never returns.

If the action is to execute a signal-catching function, sigsuspend returns after the signal-catching function returns and resets the signal mask to the set that existed prior to the call to the sigsuspend function.

See Also