sigignore() — Set disposition to ignore a signal

Standards

Standards / Extensions C or C++ Dependencies
XPG4.2
Single UNIX Specification, Version 3
both
POSIX(ON)

Format

#define _XOPEN_SOURCE_EXTENDED 1
#include <signal.h>

int sigignore(int sig);

General description

The sigignore() function provides a simplified method for setting the signal action of the signal specified by the argument sig to SIG_IGN.

Usage note

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

Returned value

If successful, sigignore() returns 0.

If unsuccessful, sigignore() 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