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 .\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI all rights reserved.
28 .\" Translated 2005-10-03, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
30 .TH SIGSUSPEND 2 2008-08-29 "Linux" "Linux Programmer's Manual"
33 .\"O sigsuspend \- wait for a signal
37 .B #include <signal.h>
39 .BI "int sigsuspend(const sigset_t *" mask );
42 .\"O Feature Test Macro Requirements for glibc (see
43 .\"O .BR feature_test_macros (7)):
45 .RB ( feature_test_macros (7)
51 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
55 .\"O .BR sigsuspend ()
56 .\"O temporarily replaces the signal mask of the calling process with the
59 .\"O and then suspends the process until delivery of a signal whose
60 .\"O action is to invoke a signal handler or to terminate a process.
65 シグナルハンドラの起動もしくはプロセスの終了がアクションとして
66 設定されたシグナルが配送されるまで、そのプロセスを停止する。
68 .\"O If the signal terminates the process, then
69 .\"O .BR sigsuspend ()
71 .\"O If the signal is caught, then
72 .\"O .BR sigsuspend ()
73 .\"O returns after the signal handler returns,
74 .\"O and the signal mask is restored to the state before the call to
75 .\"O .BR sigsuspend ().
85 .\"O It is not possible to block
89 .\"O specifying these signals in
91 .\"O has no effect on the process's signal mask.
95 を禁止 (block) することはできない;
98 に指定しても、プロセスのシグナルマスクは影響を受けない。
99 .\"O .SH "RETURN VALUE"
101 .\"O .BR sigsuspend ()
102 .\"O always returns \-1, normally with the error
113 .\"O points to memory which is not a valid part of the process address space.
115 が指しているメモリが、プロセスのアドレス空間の有効な部分ではない。
118 .\"O The call was interrupted by a signal.
119 システムコールはシグナルにより割り込まれた。
120 .\"O .SH "CONFORMING TO"
127 .\"O .BR sigsuspend ()
128 .\"O is used in conjunction with
129 .\"O .BR sigprocmask (2)
130 .\"O in order to prevent delivery of a signal during the execution of a
131 .\"O critical code section.
132 .\"O The caller first blocks the signals with
133 .\"O .BR sigprocmask (2).
134 .\"O When the critical code has completed, the caller then waits for the
135 .\"O signals by calling
136 .\"O .BR sigsuspend ()
137 .\"O with the signal mask that was returned by
138 .\"O .BR sigprocmask (2)
143 は、通常、クリティカル・コード・セクション (critical code section) の
144 実行中にシグナルが配送されるのを防止するために、
150 クリティカル・コードが完了すると、呼び出し元は
156 を呼び出すことで、クリティカル・コード実行中に発生した
160 .\"O .BR sigsetops (3)
161 .\"O for details on manipulating signal sets.