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 SIGPROCMASK 2 2008-10-17 "Linux" "Linux Programmer's Manual"
33 .\"O sigprocmask \- examine and change blocked signals
34 sigprocmask \- 禁止するシグナルの確認と変更
37 .B #include <signal.h>
39 .BI "int sigprocmask(int " how ", const sigset_t *" set ,
40 .BI "sigset_t *" oldset );
43 .\"O Feature Test Macro Requirements for glibc (see
44 .\"O .BR feature_test_macros (7)):
46 .RB ( feature_test_macros (7)
52 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
56 .\"O .BR sigprocmask ()
57 .\"O is used to fetch and/or change the signal mask of the calling thread.
58 .\"O The signal mask is the set of signals whose delivery is currently
59 .\"O blocked for the caller
62 .\"O for more details).
64 を使うと、呼び出したスレッドのシグナルマスクの取得/変更ができる。
65 シグナルマスクは、呼び出し元に対して現在配送が禁止されているシグナルの
70 .\"O The behavior of the call is dependent on the value of
78 .\"O The set of blocked signals is the union of the current set and the
88 .\"O are removed from the current set of blocked signals.
89 .\"O It is permissible to attempt to unblock a signal which is not blocked.
92 にあるシグナルを取り除く。禁止されていないシグナルを取り除こうと
96 .\"O The set of blocked signals is set to the argument
104 .\"O is non-NULL, the previous value of the signal mask is stored in
107 が NULL でなければ、シグナルマスクの今までの値を
113 .\"O is NULL, then the signal mask is unchanged (i.e.,
116 .\"O but the current value of the signal mask is nevertheless returned in
118 .\"O (if it is not NULL).
120 が NULL であれば、シグナルマスクは変更されない (すなわち、
124 の値にかかわらず、現在のシグナルマスクの値は
131 .\"O .BR sigprocmask ()
132 .\"O is unspecified in a multithreaded process; see
133 .\"O .BR pthread_sigmask (3).
137 .BR pthread_sigmask (3)
139 .\"O .SH "RETURN VALUE"
141 .\"O .BR sigprocmask ()
142 .\"O returns 0 on success and \-1 on error.
144 は成功すれば 0 を返し、エラーならば \-1 を返す。
148 .\"O The value specified in
153 .\"O .SH "CONFORMING TO"
158 .\"O It is not possible to block
159 .\"O .BR SIGKILL " or " SIGSTOP .
160 .\"O Attempts to do so are silently ignored.
167 .\"O Each of the threads in a process has its own signal mask.
168 プロセス内の各スレッドはそれぞれ専用のシグナルマスクを持つ。
170 .\"O A child created via
172 .\"O inherits a copy of its parent's signal mask;
173 .\"O the signal mask is preserved across
176 経由で作成された子プロセスは親プロセスのシグナルマスクのコピーを継承する。
187 .\"O while they are blocked, the result is undefined,
188 .\"O unless the signal was generated by
190 .\"O .BR sigqueue (3),
207 .\"O .BR sigsetops (3)
208 .\"O for details on manipulating signal sets.
220 .BR pthread_sigmask (3),