Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

pause(3)

sigaction(2)

sigblock(2)

sigprocmask(2)

sigsuspend(2)

sigvec(2)

sigpause(3)  —  Subroutines

NAME

sigpause − Provides a compatibility interface to the sigsuspend function

LIBRARY

Standard C Library (libc.a)

SYNOPSIS

#include <signal.h> int sigpause (
int signal_mask );

PARAMETERS

signal_maskSpecifies which signals to block. 

DESCRIPTION

The sigpause() function call blocks the signals specified by the signal_mask parameter and then suspends execution of the process until delivery of a signal whose action is either to execute a signal-catching function or to end the process.  Signal of value i is blocked if the i-th bit of the mask is set.  Only signals with values 1 to 31 can be blocked with the sigpause() function. In addition, the sigpause() function does not allow the SIGKILL, SIGSTOP, or SIGCONT signals to be blocked.  If a program attempts to block one of these signals, the sigpause() function gives no indication of the error. 

The sigpause() function sets the signal mask and waits for an unblocked signal as one atomic operation. This means that signals cannot occur between the operations of setting the mask and waiting for a signal. 

The sigpause() function is provided for compatibility with older UNIX systems; its function is a subset of the sigsuspend() function. 

RETURN VALUES

If a signal is caught by the calling process and control is returned from the signal handler, the calling process resumes execution after the sigpause() function, which always returns a value of -1 and sets errno to [EINTR]. 

If delivery of a signal causes the process to end, the sigpause() function does not return. 

If delivery of a signal causes a signal-catching function to execute, the sigpause() function returns after the signal-catching function returns, with the signal mask restored to the set that existed prior to the sigpause() call. 

RELATED INFORMATION

Functions: pause(3), sigaction(2), sigblock(2), sigprocmask(2), sigsuspend(2), sigvec(2)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026