OSDN Git Service

175a94dadab1be26b50e975b88f7d4179731cc89
[linuxjm/LDP_man-pages.git] / draft / man3 / sigsetops.3
1 .\" Copyright (c) 1994 Mike Battersby
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Modified by aeb, 960721
24 .\" 2005-11-21, mtk, added descriptions of sigisemptyset(), sigandset(),
25 .\"                  and sigorset()
26 .\" 2007-10-26 mdw   added wording that a sigset_t must be initialized
27 .\"                  prior to use
28 .\"
29 .\"WORD:        signal set              シグナル集合
30 .\"
31 .\" Japanese Version Copyright (c) 1998 HANATAKA Shinya
32 .\"         all rights reserved.
33 .\" Translated 1998-05-24, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
34 .\" Updated 2005-12-05, Akihiro MOTOKI, Catch up to LDP man-pages 2.16
35 .\" Updated 2008-02-09, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.77
36 .\"
37 .TH SIGSETOPS 3 2008-09-01 "Linux" "Linux Programmer's Manual"
38 .\"O .SH NAME
39 .SH 名前
40 .\"O sigemptyset, sigfillset, sigaddset, sigdelset, sigismember \- POSIX
41 .\"O signal set operations.
42 sigemptyset, sigfillset, sigaddset, sigdelset, sigismember \- POSIX
43 シグナル集合の操作
44 .\"O .SH SYNOPSIS
45 .SH 書式
46 .B #include <signal.h>
47 .sp
48 .BI "int sigemptyset(sigset_t *" set );
49 .sp
50 .BI "int sigfillset(sigset_t *" set );
51 .sp
52 .BI "int sigaddset(sigset_t *" set ", int " signum );
53 .sp
54 .BI "int sigdelset(sigset_t *" set ", int " signum );
55 .sp
56 .BI "int sigismember(const sigset_t *" set ", int " signum );
57 .sp
58 .in -4n
59 .\"O Feature Test Macro Requirements for glibc (see
60 .\"O .BR feature_test_macros (7)):
61 glibc 向けの機能検査マクロの要件
62 .RB ( feature_test_macros (7)
63 参照):
64 .in
65 .sp
66 .ad l
67 .BR sigemptyset (),
68 .BR sigfillset (),
69 .BR sigaddset (),
70 .BR sigdelset (),
71 .BR sigismember ():
72 .RS 4
73 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
74 .RE
75 .ad b
76 .\"O .SH DESCRIPTION
77 .SH 説明
78 .\"O These functions allow the manipulation of POSIX signal sets.
79 これらの関数は POSIX シグナル集合(signal set)を操作するため使用する。
80 .PP
81 .\"O .BR sigemptyset ()
82 .\"O initializes the signal set given by
83 .\"O .I set
84 .\"O to empty, with all signals excluded from the set.
85 .BR sigemptyset ()
86
87 .I set
88 で与えられたシグナル集合を空に初期化し、シグナルが一つも
89 含まれていない状態にする。
90 .PP
91 .\"O .BR sigfillset ()
92 .\"O initializes
93 .\"O .I set
94 .\"O to full, including all signals.
95 .BR sigfillset ()
96
97 .I set
98 で与えられたシグナル集合が全てのシグナルを含むようにする。
99 .PP
100 .\"O .BR sigaddset ()
101 .\"O and
102 .\"O .BR sigdelset ()
103 .\"O add and delete respectively signal
104 .\"O .I signum
105 .\"O from
106 .\"O .IR set .
107 .BR sigaddset ()
108
109 .BR sigdelset ()
110
111 .I set
112
113 .I signum
114 シグナルをそれぞれ加えたり、削除したりする。
115 .PP
116 .\"O .BR sigismember ()
117 .\"O tests whether
118 .\"O .I signum
119 .\"O is a member of
120 .\"O .I set .
121 .BR sigismember ()
122
123 .I signum
124
125 .I set
126 に含まれているかどうかをテストする。
127 .PP
128 .\"O Objects of type
129 .\"O .I sigset_t
130 .\"O must be initialized by a call to either
131 .\"O .BR sigemptyset ()
132 .\"O or
133 .\"O .BR sigfillset ()
134 .\"O before being passed to the functions
135 .\"O .BR sigaddset (),
136 .\"O .BR sigdelset ()
137 .\"O and
138 .\"O .BR sigismember ()
139 .\"O or the additional glibc functions described below
140 .\"O .RB ( sigisemptyset (),
141 .\"O .BR sigandset (),
142 .\"O and
143 .\"O .BR sigorset ()).
144 .\"O The results are undefined if this is not done.
145 .I sigset_t
146 型のオブジェクトは、関数
147 .BR sigaddset (),
148 .BR sigdelset (),
149 .BR sigismember ()
150 や後述の glibc の追加関数
151 .RB ( sigisemptyset (),
152 .BR sigandset (),
153 .BR sigorset ())
154 に渡す前に、
155 .BR sigemptyset ()
156
157 .BR sigfillset ()
158 を呼び出して初期化しなければならない。
159 初期化しなかった場合の結果は未定義である。
160 .\"O .SH "RETURN VALUE"
161 .SH 返り値
162 .\"O .BR sigemptyset (),
163 .\"O .BR sigfillset (),
164 .\"O .BR sigaddset (),
165 .\"O and
166 .\"O .BR sigdelset ()
167 .\"O return 0 on success and \-1 on error.
168 .BR sigemptyset (),
169 .BR sigfillset (),
170 .BR sigaddset (),
171 .BR sigdelset ()
172 は成功すれば 0 を、エラーの場合は \-1 を返す。
173 .PP
174 .\"O .BR sigismember ()
175 .\"O returns 1 if
176 .\"O .I signum
177 .\"O is a member of
178 .\"O .IR set ,
179 .\"O 0 if
180 .\"O .I signum
181 .\"O is not a member, and \-1 on error.
182 .BR sigismember ()
183
184 .I signum
185
186 .I set
187 に含まれていれば 1 を返し、含まれていなければ 0 を返す。
188 エラーの場合は \-1 を返す。
189 .\"O .SH ERRORS
190 .SH エラー
191 .TP
192 .B EINVAL
193 .\"O .I sig
194 .\"O is not a valid signal.
195 .I sig
196 が有効なシグナルではない。
197 .\"O .SH "CONFORMING TO"
198 .SH 準拠
199 POSIX.1-2001.
200 .\"O .SH NOTES
201 .\"O .SS Glibc Notes
202 .SH 注意
203 .SS glibc での注意
204 .\"O If the
205 .\"O .B _GNU_SOURCE
206 .\"O feature test macro is defined, then \fI<signal.h>\fP
207 .\"O exposes three other functions for manipulating signal
208 .\"O sets.
209 .B _GNU_SOURCE
210 機能検査マクロが定義されていると、
211 \fI<signal.h>\fP でシグナル集合を操作する 3つの関数が追加で公開される。
212 .TP
213 .BI "int sigisemptyset(sigset_t *" set );
214 .\"O returns 1 if
215 .\"O .I set
216 .\"O contains no signals, and 0 otherwise.
217 .I set
218 にシグナルが一つも含まれていなければ 1 を返し、
219 それ以外は 0 を返す。
220 .TP
221 .BI "int sigorset(sigset_t *" dest ", sigset_t *" left \
222 ", sigset_t *" right );
223 .\"O places the union of the sets
224 .\"O .I left
225 .\"O and
226 .\"O .I right
227 .\"O in
228 .\"O .IR dest .
229 シグナル集合
230 .I left
231
232 .I left
233 の和集合を
234 .I dest
235 に書き込む。
236 .TP
237 .BI "int sigandset(sigset_t *" dest ", sigset_t *" left \
238 ", sigset_t *" right );
239 .\"O places the intersection of the sets
240 .\"O .I left
241 .\"O and
242 .\"O .I right
243 .\"O in
244 .\"O .IR dest .
245 シグナル集合
246 .I left
247
248 .I left
249 の積集合を
250 .I dest
251 に書き込む。
252 .PP
253 .\"O .BR sigorset ()
254 .\"O and
255 .\"O .BR sigandset ()
256 .\"O return 0 on success, and \-1 on failure.
257 .BR sigorset ()
258
259 .BR sigandset ()
260 は成功すると 0 を、失敗すると \-1 を返す。
261 .PP
262 .\"O These functions are nonstandard (a few other systems provide similar
263 .\"O functions) and their use should be avoided in portable applications.
264 これらの関数は非標準であり、(他にも同様の関数を提供しているシステムも
265 いくつかはあるが) 移植性を考慮したアプリケーションでは使用を避けるべき
266 である。
267 .\"O .SH "SEE ALSO"
268 .SH 関連項目
269 .BR sigaction (2),
270 .BR sigpending (2),
271 .BR sigprocmask (2),
272 .BR sigsuspend (2)