Standards / Extensions | C or C++ | Dependencies |
---|---|---|
XPG4.2 |
both | POSIX(ON) |
#define _XOPEN_SOURCE_EXTENDED 1
#include <signal.h>
int sigpause(int sig);
The sigpause() function provides a simplified method for removing a signal, specified by the argument sig, from the calling thread's signal mask and suspending this thread until a signal is received whose action is either to execute a signal catcher function or to terminate the process.
The use of the SIGTHSTOP and SIGTHCONT signal is not supported with this function.
If successful, sigpause() returns -1 and sets errno to EINTR.