1 .\" Copyright (C) 2004 Andries Brouwer (aeb@cwi.nl)
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .TH SIGPAUSE 3 2010-09-12 "Linux" "Linux Programmer's Manual"
25 sigpause \- atomically release blocked signals and wait for interrupt
28 .B #include <signal.h>
30 .BI "int sigpause(int " sigmask "); /* BSD */"
32 .BI "int sigpause(int " sig "); /* System V / UNIX 95 */"
35 Don't use this function.
42 is designed to wait for some signal.
43 It changes the process's signal mask (set of blocked signals),
44 and then waits for a signal to arrive.
45 Upon arrival of a signal, the original signal mask is restored.
49 returns, it was interrupted by a signal and the return value is \-1
55 The System V version of
57 is standardized in POSIX.1-2001.
60 The classical BSD version of this function appeared in 4.2BSD.
61 It sets the process's signal mask to
63 UNIX 95 standardized the incompatible System V version of
64 this function, which removes only the specified signal
66 from the process's signal mask.
67 .\" __xpg_sigpause: UNIX 95, spec 1170, SVID, SVr4, XPG
68 The unfortunate situation with two incompatible functions with the
69 same name was solved by the
71 function, that takes a
73 argument (instead of an
76 On Linux, this routine is a system call only on the Sparc (sparc64)
79 Libc4 and libc5 only know about the BSD version.
81 Glibc uses the BSD version if the
83 feature test macro is defined and none of
91 Otherwise, the System V version is used.
93 .\" For the BSD version, one usually uses a zero
95 .\" to indicate that no signals are to be blocked.
103 .BR feature_test_macros (7)