sigwait

Suspends the calling thread until one of the signals in the set is delivered to the thread.

Library:LibC
Classification:ANSI
Service:Signal Services

Syntax

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

Parameters

set

(IN) Points to a set of signals.

sig

(OUT) Points to the signal that was delivered to the thread. For a list of signals, see Section 5.1, Standard Signals.

Return Values

If successful, returns 0. Otherwise, returns one of the following errors.

Decimal

Constant

Description

5

ENOMEM

No memory is available.

79

ENOTSUP

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

105

ENOCONTEXT

No thread context is present.

Remarks

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

The sigwait function suspends the calling thread until one of the signals in set is delivered to the calling thread. It then stores the number of the signal received in the sig parameter and returns.

See Also