sighold() — Add a signal to a thread

Standards

Standards / Extensions C or C++ Dependencies

XPG4.2
Single UNIX Specification, Version 3

both  

Format

#define _XOPEN_SOURCE_EXTENDED 1
#include <signal.h>

int sighold(int sig);

General description

The sighold() function provides a simplified method for adding the signal specified by the argument sig to the calling thread's signal mask.

Usage note

The use of the SIGTHSTOP and SIGTHCONT signal is not supported with this function.

Returned value

If successful, sighold() returns 0.

If unsuccessful, sighold() returns -1 and sets errno to one of the following values:
Error Code
Description
EINVAL
The value of the argument sig is not a valid signal type or it is SIGKILL, SIGSTOP, or SIGTRACE.

Related information