1 .\" Copyright (c) 2005 Michael Kerrisk
2 .\" based on earlier work by faith@cs.unc.edu and
3 .\" Mike Battersby <mib@deakin.edu.au>
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" 2005-09-15, mtk, Created new page by splitting off from sigaction.2
27 .TH SIGSUSPEND 2 2008-08-29 "Linux" "Linux Programmer's Manual"
29 sigsuspend \- wait for a signal
31 .B #include <signal.h>
33 .BI "int sigsuspend(const sigset_t *" mask );
36 Feature Test Macro Requirements for glibc (see
37 .BR feature_test_macros (7)):
42 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
46 temporarily replaces the signal mask of the calling process with the
49 and then suspends the process until delivery of a signal whose
50 action is to invoke a signal handler or to terminate a process.
52 If the signal terminates the process, then
55 If the signal is caught, then
57 returns after the signal handler returns,
58 and the signal mask is restored to the state before the call to
61 It is not possible to block
65 specifying these signals in
67 has no effect on the process's signal mask.
70 always returns \-1, normally with the error
76 points to memory which is not a valid part of the process address space.
79 The call was interrupted by a signal.
86 is used in conjunction with
88 in order to prevent delivery of a signal during the execution of a
89 critical code section.
90 The caller first blocks the signals with
92 When the critical code has completed, the caller then waits for the
95 with the signal mask that was returned by
103 for details on manipulating signal sets.