1SIGSUSPEND(3P)             POSIX Programmer's Manual            SIGSUSPEND(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       sigsuspend - wait for a signal
13

SYNOPSIS

15       #include <signal.h>
16
17       int sigsuspend(const sigset_t *sigmask);
18
19

DESCRIPTION

21       The sigsuspend() function shall replace the current signal mask of  the
22       calling  thread  with the set of signals pointed to by sigmask and then
23       suspend the thread until delivery of a signal whose action is either to
24       execute  a  signal-catching  function or to terminate the process. This
25       shall not cause any other signals that may have  been  pending  on  the
26       process to become pending on the thread.
27
28       If the action is to terminate the process then sigsuspend() shall never
29       return. If the action is to execute a  signal-catching  function,  then
30       sigsuspend()  shall  return after the signal-catching function returns,
31       with the signal mask restored to the set that existed prior to the sig‐
32       suspend() call.
33
34       It  is  not  possible  to block signals that cannot be ignored. This is
35       enforced by the system without causing an error to be indicated.
36

RETURN VALUE

38       Since sigsuspend() suspends thread execution indefinitely, there is  no
39       successful  completion  return  value.  If a return occurs, -1 shall be
40       returned and errno set to indicate the error.
41

ERRORS

43       The sigsuspend() function shall fail if:
44
45       EINTR  A signal is  caught  by  the  calling  process  and  control  is
46              returned from the signal-catching function.
47
48
49       The following sections are informative.
50

EXAMPLES

52       None.
53

APPLICATION USAGE

55       Normally,  at the beginning of a critical code section, a specified set
56       of signals is blocked  using  the  sigprocmask()  function.   When  the
57       thread  has  completed  the  critical section and needs to wait for the
58       previously blocked signal(s), it pauses by  calling  sigsuspend()  with
59       the mask that was returned by the sigprocmask() call.
60

RATIONALE

62       None.
63

FUTURE DIRECTIONS

65       None.
66

SEE ALSO

68       Signal   Concepts,   pause(),  sigaction(),  sigaddset(),  sigdelset(),
69       sigemptyset(),   sigfillset(),   the   Base   Definitions   volume   of
70       IEEE Std 1003.1-2001, <signal.h>
71
73       Portions  of  this text are reprinted and reproduced in electronic form
74       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
75       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
76       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
77       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
78       event of any discrepancy between this version and the original IEEE and
79       The  Open Group Standard, the original IEEE and The Open Group Standard
80       is the referee document. The original Standard can be  obtained  online
81       at http://www.opengroup.org/unix/online.html .
82
83
84
85IEEE/The Open Group                  2003                       SIGSUSPEND(3P)
Impressum