sigpause(2)

sigpause2

Atomically release blocked signals and wait for interrupt

Usage

#include <signal.h>

int

sigpause(int sig);

Library

Standard C Library (libc, -lc)

Overview

This interface is made obsolete by sigsuspend(2).

Sigpause() assigns sig to the set of masked signals and then waits for a signal to arrive; on return the set of masked signals is restored. Sig is usually 0, indicating that no signals are to be blocked. Sigpause() always terminates by being interrupted, returning -1 with errno set to EINTR.

Compatibility

sigpause() now takes a signal value and not a mask. This often appears as a hang in sigpause$UNIX2003 or with sigpause() returning with errno set to EINVAL. Use sigsuspend() with signal masks.

Releases

155 releases since Mac OS X 10.2; the text changed 1 time.

  1. 10.2–10.4.11
  2. 10.5–26.5

History

The sigpause() function call appeared in 4.2BSD and has been deprecated.

From Libc 1752.120.2 in macOS 26.5. Parsed by carta from the page's mdoc source.