1SIGPAUSE(3)                Linux Programmer's Manual               SIGPAUSE(3)
2
3
4

NAME

6       sigpause - atomically release blocked signals and wait for interrupt
7

SYNOPSIS

9       #include <signal.h>
10
11       int sigpause(int sigmask);  /* BSD (but see NOTES) */
12
13       int sigpause(int sig);      /* System V / UNIX 95 */
14

DESCRIPTION

16       Don't use this function.  Use sigsuspend(2) instead.
17
18       The  function  sigpause()  is  designed  to  wait  for some signal.  It
19       changes the process's signal mask (set of blocked  signals),  and  then
20       waits  for  a signal to arrive.  Upon arrival of a signal, the original
21       signal mask is restored.
22

RETURN VALUE

24       If sigpause() returns, it was interrupted by a signal  and  the  return
25       value is -1 with errno set to EINTR.
26

ATTRIBUTES

28       For   an   explanation   of   the  terms  used  in  this  section,  see
29       attributes(7).
30
31       ┌───────────┬───────────────┬─────────┐
32Interface  Attribute     Value   
33       ├───────────┼───────────────┼─────────┤
34sigpause() │ Thread safety │ MT-Safe │
35       └───────────┴───────────────┴─────────┘

CONFORMING TO

37       The System V version of sigpause() is standardized in POSIX.1-2001.  It
38       is also specified in POSIX.1-2008, where it is marked obsolete.
39

NOTES

41   History
42       The classical BSD version of this function appeared in 4.2BSD.  It sets
43       the process's signal mask to sigmask.  UNIX 95 standardized the  incom‐
44       patible System V version of this function, which removes only the spec‐
45       ified signal sig from the process's signal mask.  The unfortunate situ‐
46       ation  with two incompatible functions with the same name was solved by
47       the sigsuspend(2) function, that takes a sigset_t *  argument  (instead
48       of an int).
49
50   Linux notes
51       On  Linux,  this  routine  is a system call only on the Sparc (sparc64)
52       architecture.
53
54       Glibc uses the BSD version if the _BSD_SOURCE  feature  test  macro  is
55       defined  and  none  of  _POSIX_SOURCE,  _POSIX_C_SOURCE, _XOPEN_SOURCE,
56       _GNU_SOURCE, or _SVID_SOURCE is defined.  Otherwise, the System V  ver‐
57       sion  is  used,  and  feature test macros must be defined as follows to
58       obtain the declaration:
59
60       *  Since glibc 2.26: _XOPEN_SOURCE >= 500
61
62       *  Glibc 2.25 and earlier: _XOPEN_SOURCE
63
64       Since glibc 2.19, only the System V version is exposed  by  <signal.h>;
65       applications that formerly used the BSD sigpause() should be amended to
66       use sigsuspend(2).
67

SEE ALSO

69       kill(2),  sigaction(2),  sigprocmask(2),  sigsuspend(2),   sigblock(3),
70       sigvec(3), feature_test_macros(7)
71

COLOPHON

73       This  page  is  part of release 4.16 of the Linux man-pages project.  A
74       description of the project, information about reporting bugs,  and  the
75       latest     version     of     this    page,    can    be    found    at
76       https://www.kernel.org/doc/man-pages/.
77
78
79
80Linux                             2017-09-15                       SIGPAUSE(3)
Impressum