sigsuspend()

wait for a signal 

Function


SYNOPSIS

#include <signal.h>

int sigsuspend(const sigset_t *set);


DESCRIPTION

The sigsuspend() function waits for a signal. Specifically, it replaces the signal mask of the process with the set of signals that the parameter set points to and then suspends the process until a signal is delivered. The signal either executes a signal-catching function or terminates the process.

If the signal terminates the process, the sigsuspend() function does not return. If the signal executes a signal-catching function, sigsuspend() returns after the signal-catching function returns with the signal mask restored to the set that existed before the call to sigsuspend().

It is not possible to block those signals that cannot be ignored. The system silently enforces this without causing an error.


PARAMETERS

set 

Points to the signal mask.


RETURN VALUES

The sigsuspend() function suspends process execution indefinitely; therefore, there is no successful completion return value. It always returns -1 and sets errno to one of the following values:

EFAULT 

set is an invalid pointer.

EINTR 

The calling process catches a signal and the signal-catching function returns control.


CONFORMANCE

POSIX.1 (1996).


MULTITHREAD SAFETY LEVEL

Async-signal-safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
pthread_sigmask(), sigaction(), sigaddset(), sigdelset(), sigemptyset(), sigfillset(), sigismember(), signal(), sigpause(), sigprocmask()


PTC MKS Toolkit 10.5 Documentation Build 40.