OSDN Git Service

メモリ -> メモリー
[linuxjm/LDP_man-pages.git] / po4a / signal / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2015-01-23 22:25+0900\n"
10 "PO-Revision-Date: 2015-01-25 07:25+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man3/bsd_signal.3:25
20 #, no-wrap
21 msgid "BSD_SIGNAL"
22 msgstr "BSD_SIGNAL"
23
24 #. type: TH
25 #: build/C/man3/bsd_signal.3:25
26 #, no-wrap
27 msgid "2013-10-22"
28 msgstr "2013-10-22"
29
30 #. type: TH
31 #: build/C/man3/bsd_signal.3:25 build/C/man2/eventfd.2:22
32 #: build/C/man2/getitimer.2:12 build/C/man3/gsignal.3:27
33 #: build/C/man2/kill.2:44 build/C/man2/killpg.2:42 build/C/man2/pause.2:30
34 #: build/C/man2/prctl.2:54 build/C/man3/profil.3:28 build/C/man3/psignal.3:30
35 #: build/C/man3/raise.3:29 build/C/man2/restart_syscall.2:33
36 #: build/C/man2/rt_sigqueueinfo.2:25 build/C/man2/s390_runtime_instr.2:25
37 #: build/C/man2/sgetmask.2:26 build/C/man2/sigaction.2:49
38 #: build/C/man2/sigaltstack.2:27 build/C/man7/sigevent.7:26
39 #: build/C/man3/siginterrupt.3:31 build/C/man2/signal.2:36
40 #: build/C/man7/signal.7:46 build/C/man2/signalfd.2:20
41 #: build/C/man3/sigpause.3:25 build/C/man2/sigpending.2:29
42 #: build/C/man2/sigprocmask.2:29 build/C/man3/sigqueue.3:28
43 #: build/C/man2/sigreturn.2:30 build/C/man3/sigset.3:26
44 #: build/C/man3/sigsetops.3:31 build/C/man2/sigsuspend.2:29
45 #: build/C/man3/sigvec.3:26 build/C/man3/sigwait.3:26
46 #: build/C/man2/sigwaitinfo.2:25 build/C/man3/sysv_signal.3:25
47 #: build/C/man2/timer_create.2:33 build/C/man2/timer_delete.2:26
48 #: build/C/man2/timer_getoverrun.2:26 build/C/man2/timer_settime.2:26
49 #: build/C/man2/timerfd_create.2:22 build/C/man2/tkill.2:29
50 #: build/C/man2/wait.2:49 build/C/man2/wait4.2:33
51 #, no-wrap
52 msgid "Linux Programmer's Manual"
53 msgstr "Linux Programmer's Manual"
54
55 #. type: SH
56 #: build/C/man3/bsd_signal.3:26 build/C/man2/eventfd.2:23
57 #: build/C/man2/getitimer.2:13 build/C/man3/gsignal.3:28
58 #: build/C/man2/kill.2:45 build/C/man2/killpg.2:43 build/C/man2/pause.2:31
59 #: build/C/man2/prctl.2:55 build/C/man3/profil.3:29 build/C/man3/psignal.3:31
60 #: build/C/man3/raise.3:30 build/C/man2/restart_syscall.2:34
61 #: build/C/man2/rt_sigqueueinfo.2:26 build/C/man2/s390_runtime_instr.2:26
62 #: build/C/man2/sgetmask.2:27 build/C/man2/sigaction.2:50
63 #: build/C/man2/sigaltstack.2:28 build/C/man7/sigevent.7:27
64 #: build/C/man3/siginterrupt.3:32 build/C/man2/signal.2:37
65 #: build/C/man7/signal.7:47 build/C/man2/signalfd.2:21
66 #: build/C/man3/sigpause.3:26 build/C/man2/sigpending.2:30
67 #: build/C/man2/sigprocmask.2:30 build/C/man3/sigqueue.3:29
68 #: build/C/man2/sigreturn.2:31 build/C/man3/sigset.3:27
69 #: build/C/man3/sigsetops.3:32 build/C/man2/sigsuspend.2:30
70 #: build/C/man3/sigvec.3:27 build/C/man3/sigwait.3:27
71 #: build/C/man2/sigwaitinfo.2:26 build/C/man3/sysv_signal.3:26
72 #: build/C/man2/timer_create.2:34 build/C/man2/timer_delete.2:27
73 #: build/C/man2/timer_getoverrun.2:27 build/C/man2/timer_settime.2:27
74 #: build/C/man2/timerfd_create.2:23 build/C/man2/tkill.2:30
75 #: build/C/man2/wait.2:50 build/C/man2/wait4.2:34
76 #, no-wrap
77 msgid "NAME"
78 msgstr "名前"
79
80 #. type: Plain text
81 #: build/C/man3/bsd_signal.3:28
82 msgid "bsd_signal - signal handling with BSD semantics"
83 msgstr "bsd_signal - BSD 方式のシグナル処理"
84
85 #. type: SH
86 #: build/C/man3/bsd_signal.3:28 build/C/man2/eventfd.2:25
87 #: build/C/man2/getitimer.2:15 build/C/man3/gsignal.3:30
88 #: build/C/man2/kill.2:47 build/C/man2/killpg.2:45 build/C/man2/pause.2:33
89 #: build/C/man2/prctl.2:57 build/C/man3/profil.3:31 build/C/man3/psignal.3:33
90 #: build/C/man3/raise.3:32 build/C/man2/restart_syscall.2:36
91 #: build/C/man2/rt_sigqueueinfo.2:28 build/C/man2/s390_runtime_instr.2:28
92 #: build/C/man2/sgetmask.2:29 build/C/man2/sigaction.2:52
93 #: build/C/man2/sigaltstack.2:30 build/C/man7/sigevent.7:29
94 #: build/C/man3/siginterrupt.3:34 build/C/man2/signal.2:39
95 #: build/C/man2/signalfd.2:23 build/C/man3/sigpause.3:28
96 #: build/C/man2/sigpending.2:32 build/C/man2/sigprocmask.2:32
97 #: build/C/man3/sigqueue.3:31 build/C/man2/sigreturn.2:33
98 #: build/C/man3/sigset.3:29 build/C/man3/sigsetops.3:35
99 #: build/C/man2/sigsuspend.2:32 build/C/man3/sigvec.3:29
100 #: build/C/man3/sigwait.3:29 build/C/man2/sigwaitinfo.2:28
101 #: build/C/man3/sysv_signal.3:28 build/C/man2/timer_create.2:36
102 #: build/C/man2/timer_delete.2:29 build/C/man2/timer_getoverrun.2:29
103 #: build/C/man2/timer_settime.2:30 build/C/man2/timerfd_create.2:26
104 #: build/C/man2/tkill.2:32 build/C/man2/wait.2:52 build/C/man2/wait4.2:36
105 #, no-wrap
106 msgid "SYNOPSIS"
107 msgstr "書式"
108
109 #. type: Plain text
110 #: build/C/man3/bsd_signal.3:30
111 msgid "B<#define _XOPEN_SOURCE> /* See feature_test_macros(7) */"
112 msgstr "B<#define _XOPEN_SOURCE> /* feature_test_macros(7) 参照 */"
113
114 #. type: Plain text
115 #: build/C/man3/bsd_signal.3:32 build/C/man2/killpg.2:47
116 #: build/C/man2/sigaltstack.2:32 build/C/man2/signal.2:41
117 #: build/C/man2/sigpending.2:34 build/C/man2/sigprocmask.2:34
118 #: build/C/man3/sigqueue.3:33 build/C/man3/sigset.3:31
119 #: build/C/man3/sigsetops.3:37 build/C/man2/sigsuspend.2:34
120 #: build/C/man3/sigvec.3:31 build/C/man3/sysv_signal.3:32
121 msgid "B<#include E<lt>signal.hE<gt>>"
122 msgstr "B<#include E<lt>signal.hE<gt>>"
123
124 #. type: Plain text
125 #: build/C/man3/bsd_signal.3:34 build/C/man2/signal.2:43
126 #: build/C/man3/sigset.3:33 build/C/man3/sysv_signal.3:34
127 msgid "B<typedef void (*sighandler_t)(int);>"
128 msgstr "B<typedef void (*sighandler_t)(int);>"
129
130 #. type: Plain text
131 #: build/C/man3/bsd_signal.3:36
132 msgid "B<sighandler_t bsd_signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
133 msgstr "B<sighandler_t bsd_signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
134
135 #. type: SH
136 #: build/C/man3/bsd_signal.3:36 build/C/man2/eventfd.2:29
137 #: build/C/man2/getitimer.2:24 build/C/man3/gsignal.3:49
138 #: build/C/man2/kill.2:65 build/C/man2/killpg.2:60 build/C/man2/pause.2:37
139 #: build/C/man2/prctl.2:64 build/C/man3/profil.3:46 build/C/man3/psignal.3:56
140 #: build/C/man3/raise.3:38 build/C/man2/restart_syscall.2:41
141 #: build/C/man2/rt_sigqueueinfo.2:38 build/C/man2/s390_runtime_instr.2:34
142 #: build/C/man2/sgetmask.2:36 build/C/man2/sigaction.2:72
143 #: build/C/man2/sigaltstack.2:51 build/C/man7/sigevent.7:52
144 #: build/C/man3/siginterrupt.3:55 build/C/man2/signal.2:45
145 #: build/C/man7/signal.7:49 build/C/man2/signalfd.2:27
146 #: build/C/man3/sigpause.3:36 build/C/man2/sigpending.2:46
147 #: build/C/man2/sigprocmask.2:47 build/C/man3/sigqueue.3:43
148 #: build/C/man2/sigreturn.2:35 build/C/man3/sigset.3:58
149 #: build/C/man3/sigsetops.3:63 build/C/man2/sigsuspend.2:46
150 #: build/C/man3/sigvec.3:49 build/C/man3/sigwait.3:45
151 #: build/C/man2/sigwaitinfo.2:46 build/C/man3/sysv_signal.3:36
152 #: build/C/man2/timer_create.2:54 build/C/man2/timer_delete.2:45
153 #: build/C/man2/timer_getoverrun.2:45 build/C/man2/timer_settime.2:50
154 #: build/C/man2/timerfd_create.2:38 build/C/man2/tkill.2:41
155 #: build/C/man2/wait.2:83 build/C/man2/wait4.2:67
156 #, no-wrap
157 msgid "DESCRIPTION"
158 msgstr "説明"
159
160 #. type: Plain text
161 #: build/C/man3/bsd_signal.3:41
162 msgid "The B<bsd_signal>()  function takes the same arguments, and performs the same task, as B<signal>(2)."
163 msgstr "B<bsd_signal>()  関数は B<signal>(2)  と同じ引き数をとり、同じ処理を実行する。"
164
165 #. type: Plain text
166 #: build/C/man3/bsd_signal.3:54
167 msgid "The difference between the two is that B<bsd_signal>()  is guaranteed to provide reliable signal semantics, that is: a) the disposition of the signal is not reset to the default when the handler is invoked; b) delivery of further instances of the signal is blocked while the signal handler is executing; and c) if the handler interrupts a blocking system call, then the system call is automatically restarted.  A portable application cannot rely on B<signal>(2)  to provide these guarantees."
168 msgstr "両者の違いは、 B<bsd_signal>()  では信頼性のあるシグナル処理方式の提供が保証されていることである。 信頼性のあるシグナル処理方式は以下の特徴を持つ。 a) ハンドラーが起動された場合に、シグナルの処理方法 (disposition) が デフォルトにリセットされない、 b) シグナルハンドラーの実行中は、それ以降に発生した同じシグナルの配送が ブロックされない、 c) ハンドラーが停止中の (blocking している) システムコールを 中断した場合、そのシステムコールが自動的に再開される。 移植性が必要なアプリケーションでは、 B<signal>(2)  でこれらが保証されることを前提にすべきではない。"
169
170 #. type: SH
171 #: build/C/man3/bsd_signal.3:54 build/C/man2/eventfd.2:222
172 #: build/C/man2/getitimer.2:129 build/C/man2/kill.2:100
173 #: build/C/man2/killpg.2:89 build/C/man2/pause.2:42 build/C/man2/prctl.2:884
174 #: build/C/man3/profil.3:68 build/C/man3/psignal.3:89 build/C/man3/raise.3:61
175 #: build/C/man2/restart_syscall.2:88 build/C/man2/rt_sigqueueinfo.2:129
176 #: build/C/man2/s390_runtime_instr.2:54 build/C/man2/sgetmask.2:59
177 #: build/C/man2/sigaction.2:728 build/C/man2/sigaltstack.2:133
178 #: build/C/man3/siginterrupt.3:73 build/C/man2/signal.2:97
179 #: build/C/man2/signalfd.2:251 build/C/man3/sigpause.3:48
180 #: build/C/man2/sigpending.2:53 build/C/man2/sigprocmask.2:93
181 #: build/C/man3/sigqueue.3:83 build/C/man2/sigreturn.2:65
182 #: build/C/man3/sigset.3:129 build/C/man3/sigsetops.3:107
183 #: build/C/man2/sigsuspend.2:70 build/C/man3/sigvec.3:199
184 #: build/C/man3/sigwait.3:69 build/C/man2/sigwaitinfo.2:105
185 #: build/C/man3/sysv_signal.3:51 build/C/man2/timer_create.2:169
186 #: build/C/man2/timer_delete.2:53 build/C/man2/timer_getoverrun.2:82
187 #: build/C/man2/timer_settime.2:173 build/C/man2/timerfd_create.2:294
188 #: build/C/man2/tkill.2:88 build/C/man2/wait.2:355 build/C/man2/wait4.2:132
189 #, no-wrap
190 msgid "RETURN VALUE"
191 msgstr "返り値"
192
193 #. type: Plain text
194 #: build/C/man3/bsd_signal.3:60
195 msgid "The B<bsd_signal>()  function returns the previous value of the signal handler, or B<SIG_ERR> on error."
196 msgstr "B<bsd_signal>()  関数はシグナルハンドラーの直前の値を返す。 エラーの場合、 B<SIG_ERR> を返す。"
197
198 #. type: SH
199 #: build/C/man3/bsd_signal.3:60 build/C/man2/eventfd.2:229
200 #: build/C/man2/getitimer.2:134 build/C/man2/kill.2:105
201 #: build/C/man2/killpg.2:94 build/C/man2/pause.2:53 build/C/man2/prctl.2:904
202 #: build/C/man2/restart_syscall.2:92 build/C/man2/rt_sigqueueinfo.2:134
203 #: build/C/man2/s390_runtime_instr.2:65 build/C/man2/sgetmask.2:64
204 #: build/C/man2/sigaction.2:733 build/C/man2/sigaltstack.2:137
205 #: build/C/man3/siginterrupt.3:83 build/C/man2/signal.2:105
206 #: build/C/man2/signalfd.2:265 build/C/man2/sigpending.2:59
207 #: build/C/man2/sigprocmask.2:99 build/C/man3/sigqueue.3:91
208 #: build/C/man3/sigset.3:154 build/C/man3/sigsetops.3:127
209 #: build/C/man2/sigsuspend.2:76 build/C/man3/sigvec.3:216
210 #: build/C/man3/sigwait.3:74 build/C/man2/sigwaitinfo.2:114
211 #: build/C/man3/sysv_signal.3:57 build/C/man2/timer_create.2:177
212 #: build/C/man2/timer_delete.2:60 build/C/man2/timer_getoverrun.2:90
213 #: build/C/man2/timer_settime.2:182 build/C/man2/timerfd_create.2:309
214 #: build/C/man2/tkill.2:92 build/C/man2/wait.2:385 build/C/man2/wait4.2:135
215 #, no-wrap
216 msgid "ERRORS"
217 msgstr "エラー"
218
219 #. type: Plain text
220 #: build/C/man3/bsd_signal.3:63 build/C/man3/sysv_signal.3:60
221 msgid "As for B<signal>(2)."
222 msgstr "B<signal>(2)  と同じ。"
223
224 #. type: SH
225 #: build/C/man3/bsd_signal.3:63 build/C/man3/raise.3:64
226 #: build/C/man3/siginterrupt.3:87 build/C/man3/sigpause.3:56
227 #: build/C/man3/sigqueue.3:114 build/C/man3/sigsetops.3:132
228 #: build/C/man3/sigvec.3:221 build/C/man3/sigwait.3:80
229 #: build/C/man3/sysv_signal.3:60
230 #, no-wrap
231 msgid "ATTRIBUTES"
232 msgstr "属性"
233
234 #. type: SS
235 #: build/C/man3/bsd_signal.3:64 build/C/man3/raise.3:65
236 #: build/C/man3/siginterrupt.3:88 build/C/man3/sigpause.3:57
237 #: build/C/man3/sigqueue.3:115 build/C/man3/sigsetops.3:133
238 #: build/C/man3/sigvec.3:222 build/C/man3/sigwait.3:81
239 #: build/C/man3/sysv_signal.3:61
240 #, no-wrap
241 msgid "Multithreading (see pthreads(7))"
242 msgstr "マルチスレッディング (pthreads(7) 参照)"
243
244 #. type: Plain text
245 #: build/C/man3/bsd_signal.3:68
246 msgid "The B<bsd_signal>()  function is thread-safe."
247 msgstr "B<bsd_signal>()  関数はスレッドセーフである。"
248
249 #. type: SH
250 #: build/C/man3/bsd_signal.3:68 build/C/man2/eventfd.2:266
251 #: build/C/man2/getitimer.2:155 build/C/man3/gsignal.3:95
252 #: build/C/man2/kill.2:121 build/C/man2/killpg.2:111 build/C/man2/pause.2:57
253 #: build/C/man2/prctl.2:1182 build/C/man3/profil.3:70
254 #: build/C/man3/psignal.3:99 build/C/man3/raise.3:69
255 #: build/C/man2/restart_syscall.2:100 build/C/man2/rt_sigqueueinfo.2:176
256 #: build/C/man2/s390_runtime_instr.2:81 build/C/man2/sgetmask.2:73
257 #: build/C/man2/sigaction.2:745 build/C/man2/sigaltstack.2:158
258 #: build/C/man7/sigevent.7:130 build/C/man3/siginterrupt.3:93
259 #: build/C/man2/signal.2:110 build/C/man7/signal.7:872
260 #: build/C/man2/signalfd.2:307 build/C/man3/sigpause.3:61
261 #: build/C/man2/sigpending.2:64 build/C/man2/sigprocmask.2:112
262 #: build/C/man3/sigqueue.3:119 build/C/man2/sigreturn.2:68
263 #: build/C/man3/sigset.3:173 build/C/man3/sigsetops.3:145
264 #: build/C/man2/sigsuspend.2:84 build/C/man3/sigvec.3:241
265 #: build/C/man3/sigwait.3:85 build/C/man2/sigwaitinfo.2:133
266 #: build/C/man3/sysv_signal.3:65 build/C/man2/timer_create.2:195
267 #: build/C/man2/timer_delete.2:67 build/C/man2/timer_getoverrun.2:97
268 #: build/C/man2/timer_settime.2:207 build/C/man2/timerfd_create.2:378
269 #: build/C/man2/tkill.2:109 build/C/man2/wait.2:423 build/C/man2/wait4.2:138
270 #, no-wrap
271 msgid "CONFORMING TO"
272 msgstr "準拠"
273
274 #. type: Plain text
275 #: build/C/man3/bsd_signal.3:75
276 msgid "4.2BSD, POSIX.1-2001.  POSIX.1-2008 removes the specification of B<bsd_signal>(), recommending the use of B<sigaction>(2)  instead."
277 msgstr "4.2BSD, POSIX.1-2001.  POSIX.1-2008 では B<bsd_signal>()  の仕様が削除されている。 代わりに、 B<sigaction>(2)  の使用が推奨されている。"
278
279 #. type: SH
280 #: build/C/man3/bsd_signal.3:75 build/C/man2/eventfd.2:271
281 #: build/C/man2/getitimer.2:165 build/C/man2/kill.2:123
282 #: build/C/man2/killpg.2:115 build/C/man3/raise.3:71
283 #: build/C/man2/restart_syscall.2:102 build/C/man2/rt_sigqueueinfo.2:178
284 #: build/C/man2/s390_runtime_instr.2:84 build/C/man2/sgetmask.2:75
285 #: build/C/man2/sigaction.2:748 build/C/man2/sigaltstack.2:160
286 #: build/C/man2/signal.2:112 build/C/man2/signalfd.2:312
287 #: build/C/man3/sigpause.3:65 build/C/man2/sigpending.2:66
288 #: build/C/man2/sigprocmask.2:114 build/C/man3/sigqueue.3:121
289 #: build/C/man2/sigreturn.2:74 build/C/man3/sigset.3:190
290 #: build/C/man3/sigsetops.3:147 build/C/man2/sigsuspend.2:86
291 #: build/C/man3/sigvec.3:247 build/C/man3/sigwait.3:87
292 #: build/C/man2/sigwaitinfo.2:135 build/C/man3/sysv_signal.3:67
293 #: build/C/man2/timer_create.2:197 build/C/man2/timer_getoverrun.2:99
294 #: build/C/man2/tkill.2:115 build/C/man2/wait.2:425 build/C/man2/wait4.2:147
295 #, no-wrap
296 msgid "NOTES"
297 msgstr "注意"
298
299 #. type: Plain text
300 #: build/C/man3/bsd_signal.3:81
301 msgid "Use of B<bsd_signal>()  should be avoided; use B<sigaction>(2)  instead."
302 msgstr "B<bsd_signal>()  の使用は避けるべきである。代わりに B<sigaction>(2)  を使うこと。"
303
304 #. type: Plain text
305 #: build/C/man3/bsd_signal.3:92
306 msgid "On modern Linux systems, B<bsd_signal>()  and B<signal>(2)  are equivalent.  But on older systems, B<signal>(2)  provided unreliable signal semantics; see B<signal>(2)  for details."
307 msgstr "最近の Linux システムでは、 B<bsd_signal>()  と B<signal>(2)  は等価である。しかし、以前のシステムでは、 B<signal>(2)  は信頼性に欠けるシグナル処理方式を提供していた。 詳細は B<signal>(2)  を参照。"
308
309 #. type: Plain text
310 #: build/C/man3/bsd_signal.3:99 build/C/man3/sysv_signal.3:92
311 msgid "The use of I<sighandler_t> is a GNU extension; this type is defined only if the B<_GNU_SOURCE> feature test macro is defined."
312 msgstr "I<sighandler_t> を使っているのは GNU による拡張である。 この型は機能検査マクロ B<_GNU_SOURCE> を定義した場合にのみ定義される。"
313
314 #. type: SH
315 #: build/C/man3/bsd_signal.3:99 build/C/man2/eventfd.2:417
316 #: build/C/man2/getitimer.2:246 build/C/man3/gsignal.3:103
317 #: build/C/man2/kill.2:171 build/C/man2/killpg.2:134 build/C/man2/pause.2:59
318 #: build/C/man2/prctl.2:1196 build/C/man3/profil.3:81
319 #: build/C/man3/psignal.3:113 build/C/man3/raise.3:82
320 #: build/C/man2/restart_syscall.2:135 build/C/man2/rt_sigqueueinfo.2:188
321 #: build/C/man2/s390_runtime_instr.2:88 build/C/man2/sgetmask.2:89
322 #: build/C/man2/sigaction.2:861 build/C/man2/sigaltstack.2:234
323 #: build/C/man7/sigevent.7:132 build/C/man3/siginterrupt.3:102
324 #: build/C/man2/signal.2:278 build/C/man7/signal.7:884
325 #: build/C/man2/signalfd.2:433 build/C/man3/sigpause.3:111
326 #: build/C/man2/sigpending.2:91 build/C/man2/sigprocmask.2:144
327 #: build/C/man3/sigqueue.3:154 build/C/man2/sigreturn.2:123
328 #: build/C/man3/sigset.3:266 build/C/man3/sigsetops.3:186
329 #: build/C/man2/sigsuspend.2:108 build/C/man3/sigvec.3:272
330 #: build/C/man3/sigwait.3:94 build/C/man2/sigwaitinfo.2:201
331 #: build/C/man3/sysv_signal.3:92 build/C/man2/timer_create.2:410
332 #: build/C/man2/timer_delete.2:69 build/C/man2/timer_getoverrun.2:131
333 #: build/C/man2/timer_settime.2:212 build/C/man2/timerfd_create.2:548
334 #: build/C/man2/tkill.2:124 build/C/man2/wait.2:635 build/C/man2/wait4.2:165
335 #, no-wrap
336 msgid "SEE ALSO"
337 msgstr "関連項目"
338
339 #. type: Plain text
340 #: build/C/man3/bsd_signal.3:104
341 msgid "B<sigaction>(2), B<signal>(2), B<sysv_signal>(3), B<signal>(7)"
342 msgstr "B<sigaction>(2), B<signal>(2), B<sysv_signal>(3), B<signal>(7)"
343
344 #. type: SH
345 #: build/C/man3/bsd_signal.3:104 build/C/man2/eventfd.2:428
346 #: build/C/man2/getitimer.2:253 build/C/man3/gsignal.3:107
347 #: build/C/man2/kill.2:181 build/C/man2/killpg.2:140 build/C/man2/pause.2:64
348 #: build/C/man2/prctl.2:1199 build/C/man3/profil.3:87
349 #: build/C/man3/psignal.3:118 build/C/man3/raise.3:89
350 #: build/C/man2/restart_syscall.2:144 build/C/man2/rt_sigqueueinfo.2:196
351 #: build/C/man2/s390_runtime_instr.2:91 build/C/man2/sgetmask.2:92
352 #: build/C/man2/sigaction.2:883 build/C/man2/sigaltstack.2:241
353 #: build/C/man7/sigevent.7:142 build/C/man3/siginterrupt.3:104
354 #: build/C/man2/signal.2:297 build/C/man7/signal.7:919
355 #: build/C/man2/signalfd.2:446 build/C/man3/sigpause.3:119
356 #: build/C/man2/sigpending.2:99 build/C/man2/sigprocmask.2:155
357 #: build/C/man3/sigqueue.3:162 build/C/man2/sigreturn.2:130
358 #: build/C/man3/sigset.3:276 build/C/man3/sigsetops.3:191
359 #: build/C/man2/sigsuspend.2:118 build/C/man3/sigvec.3:282
360 #: build/C/man3/sigwait.3:102 build/C/man2/sigwaitinfo.2:213
361 #: build/C/man3/sysv_signal.3:97 build/C/man2/timer_create.2:425
362 #: build/C/man2/timer_delete.2:75 build/C/man2/timer_getoverrun.2:141
363 #: build/C/man2/timer_settime.2:216 build/C/man2/timerfd_create.2:560
364 #: build/C/man2/tkill.2:129 build/C/man2/wait.2:647 build/C/man2/wait4.2:172
365 #, no-wrap
366 msgid "COLOPHON"
367 msgstr "この文書について"
368
369 #. type: Plain text
370 #: build/C/man3/bsd_signal.3:112 build/C/man2/eventfd.2:436
371 #: build/C/man2/getitimer.2:261 build/C/man3/gsignal.3:115
372 #: build/C/man2/kill.2:189 build/C/man2/killpg.2:148 build/C/man2/pause.2:72
373 #: build/C/man2/prctl.2:1207 build/C/man3/profil.3:95
374 #: build/C/man3/psignal.3:126 build/C/man3/raise.3:97
375 #: build/C/man2/restart_syscall.2:152 build/C/man2/rt_sigqueueinfo.2:204
376 #: build/C/man2/s390_runtime_instr.2:99 build/C/man2/sgetmask.2:100
377 #: build/C/man2/sigaction.2:891 build/C/man2/sigaltstack.2:249
378 #: build/C/man7/sigevent.7:150 build/C/man3/siginterrupt.3:112
379 #: build/C/man2/signal.2:305 build/C/man7/signal.7:927
380 #: build/C/man2/signalfd.2:454 build/C/man3/sigpause.3:127
381 #: build/C/man2/sigpending.2:107 build/C/man2/sigprocmask.2:163
382 #: build/C/man3/sigqueue.3:170 build/C/man2/sigreturn.2:138
383 #: build/C/man3/sigset.3:284 build/C/man3/sigsetops.3:199
384 #: build/C/man2/sigsuspend.2:126 build/C/man3/sigvec.3:290
385 #: build/C/man3/sigwait.3:110 build/C/man2/sigwaitinfo.2:221
386 #: build/C/man3/sysv_signal.3:105 build/C/man2/timer_create.2:433
387 #: build/C/man2/timer_delete.2:83 build/C/man2/timer_getoverrun.2:149
388 #: build/C/man2/timer_settime.2:224 build/C/man2/timerfd_create.2:568
389 #: build/C/man2/tkill.2:137 build/C/man2/wait.2:655 build/C/man2/wait4.2:180
390 msgid "This page is part of release 3.78 of the Linux I<man-pages> project.  A description of the project, information about reporting bugs, and the latest version of this page, can be found at \\%http://www.kernel.org/doc/man-pages/."
391 msgstr "この man ページは Linux I<man-pages> プロジェクトのリリース 3.78 の一部である。 プロジェクトの説明とバグ報告に関する情報は \\%http://www.kernel.org/doc/man-pages/ に書かれている。"
392
393 #. type: TH
394 #: build/C/man2/eventfd.2:22
395 #, no-wrap
396 msgid "EVENTFD"
397 msgstr "EVENTFD"
398
399 #. type: TH
400 #: build/C/man2/eventfd.2:22 build/C/man2/getitimer.2:12
401 #: build/C/man3/profil.3:28 build/C/man2/signalfd.2:20
402 #, no-wrap
403 msgid "2014-07-08"
404 msgstr "2014-07-08"
405
406 #. type: TH
407 #: build/C/man2/eventfd.2:22 build/C/man2/getitimer.2:12
408 #: build/C/man2/kill.2:44 build/C/man2/killpg.2:42 build/C/man2/pause.2:30
409 #: build/C/man2/prctl.2:54 build/C/man3/profil.3:28
410 #: build/C/man2/restart_syscall.2:33 build/C/man2/rt_sigqueueinfo.2:25
411 #: build/C/man2/sgetmask.2:26 build/C/man2/sigaction.2:49
412 #: build/C/man2/sigaltstack.2:27 build/C/man2/signal.2:36
413 #: build/C/man7/signal.7:46 build/C/man2/signalfd.2:20
414 #: build/C/man3/sigpause.3:25 build/C/man2/sigpending.2:29
415 #: build/C/man2/sigprocmask.2:29 build/C/man3/sigqueue.3:28
416 #: build/C/man2/sigreturn.2:30 build/C/man3/sigset.3:26
417 #: build/C/man3/sigsetops.3:31 build/C/man2/sigsuspend.2:29
418 #: build/C/man3/sigvec.3:26 build/C/man3/sigwait.3:26
419 #: build/C/man2/sigwaitinfo.2:25 build/C/man2/timer_create.2:33
420 #: build/C/man2/timer_delete.2:26 build/C/man2/timer_getoverrun.2:26
421 #: build/C/man2/timer_settime.2:26 build/C/man2/timerfd_create.2:22
422 #: build/C/man2/tkill.2:29 build/C/man2/wait.2:49 build/C/man2/wait4.2:33
423 #, no-wrap
424 msgid "Linux"
425 msgstr "Linux"
426
427 #. type: Plain text
428 #: build/C/man2/eventfd.2:25
429 msgid "eventfd - create a file descriptor for event notification"
430 msgstr "eventfd - イベント通知用のファイルディスクリプターを生成する"
431
432 #. type: Plain text
433 #: build/C/man2/eventfd.2:27
434 msgid "B<#include E<lt>sys/eventfd.hE<gt>>"
435 msgstr "B<#include E<lt>sys/eventfd.hE<gt>>"
436
437 #. type: Plain text
438 #: build/C/man2/eventfd.2:29
439 msgid "B<int eventfd(unsigned int >I<initval>B<, int >I<flags>B<);>"
440 msgstr "B<int eventfd(unsigned int >I<initval>B<, int >I<flags>B<);>"
441
442 #. type: Plain text
443 #: build/C/man2/eventfd.2:39
444 msgid "B<eventfd>()  creates an \"eventfd object\" that can be used as an event wait/notify mechanism by user-space applications, and by the kernel to notify user-space applications of events.  The object contains an unsigned 64-bit integer (I<uint64_t>)  counter that is maintained by the kernel.  This counter is initialized with the value specified in the argument I<initval>."
445 msgstr "B<eventfd>()  は \"eventfd オブジェクト\" を生成する。 eventfd オブジェクトはユーザー空間アプリケーションがイベント待ち受け/通知用の 仕組みとして使うことができる。また、カーネルがユーザー空間アプリケーションに イベントを通知するためにも使うことができる。 このオブジェクトには、unsigned の 64 ビット整数 (I<uint64_t>)  型のカウンターが含まれており、このカウンターはカーネルにより管理される。 このカウンターは I<initval> 引き数で指定された値で初期化される。"
446
447 #. type: Plain text
448 #: build/C/man2/eventfd.2:44
449 msgid "The following values may be bitwise ORed in I<flags> to change the behavior of B<eventfd>():"
450 msgstr "以下の値のいくつかをビット単位の論理和 (OR) で指定することで、 B<eventfd>() の振舞いを変更することができる。"
451
452 #. type: TP
453 #: build/C/man2/eventfd.2:44
454 #, no-wrap
455 msgid "B<EFD_CLOEXEC> (since Linux 2.6.27)"
456 msgstr "B<EFD_CLOEXEC> (Linux 2.6.27 以降)"
457
458 #. type: Plain text
459 #: build/C/man2/eventfd.2:54 build/C/man2/signalfd.2:95
460 #: build/C/man2/timerfd_create.2:110
461 msgid "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the new file descriptor.  See the description of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this may be useful."
462 msgstr "新しいファイルディスクリプターに対して close-on-exec (B<FD_CLOEXEC>)  フラグをセットする。 このフラグが役に立つ理由については、 B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
463
464 #. type: TP
465 #: build/C/man2/eventfd.2:54
466 #, no-wrap
467 msgid "B<EFD_NONBLOCK> (since Linux 2.6.27)"
468 msgstr "B<EFD_NONBLOCK> (Linux 2.6.27 以降)"
469
470 #. type: Plain text
471 #: build/C/man2/eventfd.2:62 build/C/man2/signalfd.2:85
472 #: build/C/man2/timerfd_create.2:100
473 msgid "Set the B<O_NONBLOCK> file status flag on the new open file description.  Using this flag saves extra calls to B<fcntl>(2)  to achieve the same result."
474 msgstr "新しく生成されるオープンファイル記述 (open file description) の B<O_NONBLOCK> ファイルステータスフラグをセットする。 このフラグを使うことで、 B<O_NONBLOCK> をセットするために B<fcntl>(2)  を追加で呼び出す必要がなくなる。"
475
476 #. type: TP
477 #: build/C/man2/eventfd.2:62
478 #, no-wrap
479 msgid "B<EFD_SEMAPHORE> (since Linux 2.6.30)"
480 msgstr "B<EFD_SEMAPHORE> (Linux 2.6.30 以降)"
481
482 #. type: Plain text
483 #: build/C/man2/eventfd.2:66
484 msgid "Provide semaphore-like semantics for reads from the new file descriptor.  See below."
485 msgstr "新しいファイルディスクリプターからの読み出しにおいて、セマフォ風の動作を行う。 下記参照。"
486
487 #. type: Plain text
488 #: build/C/man2/eventfd.2:70 build/C/man2/signalfd.2:99
489 msgid "In Linux up to version 2.6.26, the I<flags> argument is unused, and must be specified as zero."
490 msgstr "バージョン 2.6.26 以前の Linux では、 I<flags> 引き数は未使用であり、0 を指定しなければならない。"
491
492 #. type: Plain text
493 #: build/C/man2/eventfd.2:76
494 msgid "As its return value, B<eventfd>()  returns a new file descriptor that can be used to refer to the eventfd object.  The following operations can be performed on the file descriptor:"
495 msgstr "B<eventfd>()  は eventfd オブジェクトを参照するのに使用できる新しいファイルディスクリプター を返す。返されたファイルディスクリプターに対しては以下の操作を実行できる。"
496
497 #. type: TP
498 #: build/C/man2/eventfd.2:76 build/C/man2/signalfd.2:102
499 #: build/C/man2/timerfd_create.2:218
500 #, no-wrap
501 msgid "B<read>(2)"
502 msgstr "B<read>(2)"
503
504 #. type: Plain text
505 #: build/C/man2/eventfd.2:86
506 msgid "Each successful B<read>(2)  returns an 8-byte integer.  A B<read>(2)  will fail with the error B<EINVAL> if the size of the supplied buffer is less than 8 bytes."
507 msgstr "B<read>(2) は成功すると、8 バイトの整数を返す。 渡されたバッファーの大きさが 8 バイト未満の場合、 B<read>(2)  はエラー B<EINVAL> で失敗する。"
508
509 #. type: Plain text
510 #: build/C/man2/eventfd.2:91
511 msgid "The value returned by B<read>(2)  is in host byte order\\(emthat is, the native byte order for integers on the host machine."
512 msgstr "B<read>(2) が返す値は、ホストバイトオーダ、つまり、そのホストマシンにおける整数の通常のバイトオーダである。"
513
514 #. type: Plain text
515 #: build/C/man2/eventfd.2:98
516 msgid "The semantics of B<read>(2)  depend on whether the eventfd counter currently has a nonzero value and whether the B<EFD_SEMAPHORE> flag was specified when creating the eventfd file descriptor:"
517 msgstr "B<read>(2) の動作は、 eventfd カウンターの現在の値が 0 以外であるかと、 eventfd ファイルディスクリプターを作成する際に B<EFD_SEMAPHORE> フラグが指定されたか、により変化する。"
518
519 #. type: IP
520 #: build/C/man2/eventfd.2:99 build/C/man2/eventfd.2:106
521 #: build/C/man2/eventfd.2:113 build/C/man2/eventfd.2:158
522 #: build/C/man2/eventfd.2:168 build/C/man2/eventfd.2:178
523 #: build/C/man2/prctl.2:970 build/C/man2/prctl.2:975 build/C/man2/prctl.2:980
524 #: build/C/man2/prctl.2:990 build/C/man3/psignal.3:105
525 #: build/C/man3/psignal.3:109 build/C/man2/sigaction.2:318
526 #: build/C/man2/sigaction.2:333 build/C/man2/sigaction.2:349
527 #: build/C/man2/sigaction.2:364 build/C/man2/sigaction.2:411
528 #: build/C/man2/sigaction.2:458 build/C/man2/sigaction.2:472
529 #: build/C/man2/signal.2:68 build/C/man2/signal.2:73 build/C/man2/signal.2:80
530 #: build/C/man2/signal.2:224 build/C/man2/signal.2:228
531 #: build/C/man2/signal.2:244 build/C/man7/signal.7:149
532 #: build/C/man7/signal.7:157 build/C/man7/signal.7:615
533 #: build/C/man7/signal.7:617 build/C/man7/signal.7:638
534 #: build/C/man7/signal.7:672 build/C/man7/signal.7:676
535 #: build/C/man7/signal.7:683 build/C/man7/signal.7:701
536 #: build/C/man7/signal.7:707 build/C/man7/signal.7:714
537 #: build/C/man7/signal.7:719 build/C/man7/signal.7:723
538 #: build/C/man7/signal.7:742 build/C/man7/signal.7:756
539 #: build/C/man7/signal.7:767 build/C/man7/signal.7:774
540 #: build/C/man7/signal.7:783 build/C/man7/signal.7:791
541 #: build/C/man7/signal.7:797 build/C/man7/signal.7:817
542 #: build/C/man7/signal.7:831 build/C/man7/signal.7:842
543 #: build/C/man7/signal.7:845 build/C/man7/signal.7:848
544 #: build/C/man7/signal.7:851 build/C/man7/signal.7:858
545 #: build/C/man7/signal.7:864 build/C/man7/signal.7:868
546 #: build/C/man3/sigwait.3:62 build/C/man3/sigwait.3:67
547 #: build/C/man2/timer_create.2:218 build/C/man2/timer_create.2:221
548 #: build/C/man2/timer_create.2:224 build/C/man2/timer_create.2:228
549 #: build/C/man2/timer_create.2:231 build/C/man2/timer_create.2:246
550 #: build/C/man2/timer_create.2:250
551 #, no-wrap
552 msgid "*"
553 msgstr "*"
554
555 #. type: Plain text
556 #: build/C/man2/eventfd.2:106
557 msgid "If B<EFD_SEMAPHORE> was not specified and the eventfd counter has a nonzero value, then a B<read>(2)  returns 8 bytes containing that value, and the counter's value is reset to zero."
558 msgstr "B<EFD_SEMAPHORE> が指定されておらず、eventfd カウンターが 0 以外の値の場合、 B<read>(2) はカウンター値を格納した 8 バイトの値を返し、 カウンター値は 0 にリセットされる。"
559
560 #. type: Plain text
561 #: build/C/man2/eventfd.2:113
562 msgid "If B<EFD_SEMAPHORE> was specified and the eventfd counter has a nonzero value, then a B<read>(2)  returns 8 bytes containing the value 1, and the counter's value is decremented by 1."
563 msgstr "B<EFD_SEMAPHORE> が指定されていて eventfd カウンターが 0 以外の値の場合、 B<read>(2) は値 1 の 8 バイト値を返し、カウンター値は 1 減算される。"
564
565 #. type: Plain text
566 #: build/C/man2/eventfd.2:123
567 msgid "If the eventfd counter is zero at the time of the call to B<read>(2), then the call either blocks until the counter becomes nonzero (at which time, the B<read>(2)  proceeds as described above)  or fails with the error B<EAGAIN> if the file descriptor has been made nonblocking."
568 msgstr "B<read>(2) を呼び出した時点で eventfd カウンターが 0 の場合、 B<read>(2) はカウンターが 0 以外になるまで停止 (block) する (0 以外になった時点で B<read>(2) は上記で述べた通り実行を再開する)、 もしくはファイルディスクリプターが非停止 (nonblocking) に設定されている場合はエラー B<EAGAIN> で失敗する。"
569
570 #. type: TP
571 #: build/C/man2/eventfd.2:124
572 #, no-wrap
573 msgid "B<write>(2)"
574 msgstr "B<write>(2)"
575
576 #. type: Plain text
577 #: build/C/man2/eventfd.2:141
578 msgid "A B<write>(2)  call adds the 8-byte integer value supplied in its buffer to the counter.  The maximum value that may be stored in the counter is the largest unsigned 64-bit value minus 1 (i.e., 0xfffffffffffffffe).  If the addition would cause the counter's value to exceed the maximum, then the B<write>(2)  either blocks until a B<read>(2)  is performed on the file descriptor, or fails with the error B<EAGAIN> if the file descriptor has been made nonblocking."
579 msgstr "B<write>(2)  は、引き数のバッファーで渡された 8 バイトの整数値をカウンターに加算する。 カウンターに格納可能な最大値は unsigned の 64 ビット整数の最大値から 1 を引いた値 (すなわち 0xfffffffffffffffe) である。 加算を行うとカウンター値が最大値を超過する場合には、 そのファイルディスクリプターに対して B<read>(2)  が実行されるまで、 B<write>(2)  は停止 (block) する、 もしくはファイルディスクリプターが非停止 (nonblocking)  に設定されている場合はエラー B<EAGAIN> で失敗する。"
580
581 #. type: Plain text
582 #: build/C/man2/eventfd.2:148
583 msgid "A B<write>(2)  will fail with the error B<EINVAL> if the size of the supplied buffer is less than 8 bytes, or if an attempt is made to write the value 0xffffffffffffffff."
584 msgstr "渡されたバッファーの大きさが 8 バイト未満の場合、もしくは 値 0xffffffffffffffff を書き込もうとした場合、 B<write>(2)  はエラー B<EINVAL> で失敗する。"
585
586 #. type: TP
587 #: build/C/man2/eventfd.2:148 build/C/man2/signalfd.2:140
588 #: build/C/man2/timerfd_create.2:251
589 #, no-wrap
590 msgid "B<poll>(2), B<select>(2) (and similar)"
591 msgstr "B<poll>(2), B<select>(2) (と同様の操作)"
592
593 #. type: Plain text
594 #: build/C/man2/eventfd.2:157
595 msgid "The returned file descriptor supports B<poll>(2)  (and analogously B<epoll>(7))  and B<select>(2), as follows:"
596 msgstr "返されたファイルディスクリプターは、 B<poll>(2)  (B<epoll>(7)  も同じ) や B<select>(2)  をサポートしており、以下のような動作をする。"
597
598 #. type: Plain text
599 #: build/C/man2/eventfd.2:168
600 msgid "The file descriptor is readable (the B<select>(2)  I<readfds> argument; the B<poll>(2)  B<POLLIN> flag)  if the counter has a value greater than 0."
601 msgstr "カウンターが 0 より大きい値の場合、 ファイルディスクリプターは読み出し可能となる (B<select>(2)  の I<readfds> 引き数や B<poll>(2)  の B<POLLIN> フラグ)。"
602
603 #. type: Plain text
604 #: build/C/man2/eventfd.2:178
605 msgid "The file descriptor is writable (the B<select>(2)  I<writefds> argument; the B<poll>(2)  B<POLLOUT> flag)  if it is possible to write a value of at least \"1\" without blocking."
606 msgstr "少なくとも値 \"1\" を、停止 (block) を伴わずに書き込める場合、 ファイルディスクリプターは書き込み可能となる (B<select>(2)  の I<writefds> 引き数や B<poll>(2)  の B<POLLOUT> フラグ)。"
607
608 #. type: Plain text
609 #: build/C/man2/eventfd.2:198
610 msgid "If an overflow of the counter value was detected, then B<select>(2)  indicates the file descriptor as being both readable and writable, and B<poll>(2)  returns a B<POLLERR> event.  As noted above, B<write>(2)  can never overflow the counter.  However an overflow can occur if 2^64 eventfd \"signal posts\" were performed by the KAIO subsystem (theoretically possible, but practically unlikely).  If an overflow has occurred, then B<read>(2)  will return that maximum I<uint64_t> value (i.e., 0xffffffffffffffff)."
611 msgstr "カウンター値のオーバーフローが検出された場合、 B<select>(2)  はファイルディスクリプターは読み出し可能と書き込み可能の両方を通知し、 B<poll>(2)  は B<POLLERR> イベントを返す。 上述の通り、 B<write>(2)  でカウンターがオーバーフローすることは決してない。 しかしながら、 KAIO サブシステムによって 2^64 回の eventfd \"signal posts\" が 実行された場合にはオーバーフローが起こり得る (理論的にはあり得るが、実用的にはあり得ない)。 オーバーフローが発生した場合、 B<read>(2)  は I<uint64_t> の最大値 (すなわち 0xffffffffffffffff) を返す。"
612
613 #. type: Plain text
614 #: build/C/man2/eventfd.2:205
615 msgid "The eventfd file descriptor also supports the other file-descriptor multiplexing APIs: B<pselect>(2)  and B<ppoll>(2)."
616 msgstr "eventfd ファイルディスクリプターは、これ以外のファイルディスクリプター 多重 API である B<pselect>(2) と B<ppoll>(2) もサポートしている。"
617
618 #. type: TP
619 #: build/C/man2/eventfd.2:205 build/C/man2/signalfd.2:160
620 #: build/C/man2/timerfd_create.2:269
621 #, no-wrap
622 msgid "B<close>(2)"
623 msgstr "B<close>(2)"
624
625 #. type: Plain text
626 #: build/C/man2/eventfd.2:210
627 msgid "When the file descriptor is no longer required it should be closed.  When all file descriptors associated with the same eventfd object have been closed, the resources for object are freed by the kernel."
628 msgstr "ファイルディスクリプターがそれ以降は必要なくなった際には、クローズすべきである。 同じ eventfd オブジェクトに関連付けられたファイルディスクリプターが全て クローズされると、そのオブジェクト用の資源がカーネルにより解放される。"
629
630 #. type: Plain text
631 #: build/C/man2/eventfd.2:222
632 msgid "A copy of the file descriptor created by B<eventfd>()  is inherited by the child produced by B<fork>(2).  The duplicate file descriptor is associated with the same eventfd object.  File descriptors created by B<eventfd>()  are preserved across B<execve>(2), unless the close-on-exec flag has been set."
633 msgstr "B<fork>(2) で生成された子プロセスは、 B<eventfd>() で生成されたファイルディスクリプターのコピーを継承する。 複製されたファイルディスクリプターは同じ eventfd オブジェクトに関連付けられる。 close-on-exec フラグが設定されていない場合、 B<execve>(2) の前後で B<eventfd>() で生成されたファイルディスクリプターは保持される。"
634
635 #. type: Plain text
636 #: build/C/man2/eventfd.2:229
637 msgid "On success, B<eventfd>()  returns a new eventfd file descriptor.  On error, -1 is returned and I<errno> is set to indicate the error."
638 msgstr "成功すると、 B<eventfd>()  は新規の eventfd ファイルディスクリプターを返す。 エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
639
640 #. type: TP
641 #: build/C/man2/eventfd.2:230 build/C/man2/getitimer.2:142
642 #: build/C/man2/kill.2:106 build/C/man2/killpg.2:95 build/C/man2/prctl.2:922
643 #: build/C/man2/prctl.2:927 build/C/man2/prctl.2:939 build/C/man2/prctl.2:944
644 #: build/C/man2/prctl.2:953 build/C/man2/prctl.2:963 build/C/man2/prctl.2:1003
645 #: build/C/man2/prctl.2:1013 build/C/man2/prctl.2:1021
646 #: build/C/man2/prctl.2:1032 build/C/man2/prctl.2:1041
647 #: build/C/man2/prctl.2:1055 build/C/man2/prctl.2:1067
648 #: build/C/man2/prctl.2:1078 build/C/man2/rt_sigqueueinfo.2:141
649 #: build/C/man2/s390_runtime_instr.2:66 build/C/man2/sigaction.2:738
650 #: build/C/man2/sigaltstack.2:142 build/C/man3/siginterrupt.3:84
651 #: build/C/man2/signal.2:106 build/C/man2/signalfd.2:271
652 #: build/C/man2/signalfd.2:279 build/C/man2/sigprocmask.2:107
653 #: build/C/man3/sigqueue.3:98 build/C/man3/sigsetops.3:128
654 #: build/C/man3/sigwait.3:75 build/C/man2/sigwaitinfo.2:129
655 #: build/C/man2/timer_create.2:181 build/C/man2/timer_delete.2:61
656 #: build/C/man2/timer_getoverrun.2:91 build/C/man2/timer_settime.2:191
657 #: build/C/man2/timer_settime.2:199 build/C/man2/timerfd_create.2:312
658 #: build/C/man2/timerfd_create.2:320 build/C/man2/timerfd_create.2:356
659 #: build/C/man2/timerfd_create.2:363 build/C/man2/timerfd_create.2:369
660 #: build/C/man2/tkill.2:93 build/C/man2/wait.2:418
661 #, no-wrap
662 msgid "B<EINVAL>"
663 msgstr "B<EINVAL>"
664
665 #. type: Plain text
666 #: build/C/man2/eventfd.2:234
667 msgid "An unsupported value was specified in I<flags>."
668 msgstr "I<flags> にサポートされていない値が指定された。"
669
670 #. type: TP
671 #: build/C/man2/eventfd.2:234 build/C/man2/signalfd.2:286
672 #: build/C/man2/timerfd_create.2:327
673 #, no-wrap
674 msgid "B<EMFILE>"
675 msgstr "B<EMFILE>"
676
677 #. type: Plain text
678 #: build/C/man2/eventfd.2:237
679 msgid "The per-process limit on open file descriptors has been reached."
680 msgstr "オープン済みのファイルディスクリプターの数がプロセスあたりの上限に 達していた。"
681
682 #. type: TP
683 #: build/C/man2/eventfd.2:237 build/C/man2/signalfd.2:289
684 #: build/C/man2/timerfd_create.2:330
685 #, no-wrap
686 msgid "B<ENFILE>"
687 msgstr "B<ENFILE>"
688
689 #. type: Plain text
690 #: build/C/man2/eventfd.2:241 build/C/man2/signalfd.2:293
691 #: build/C/man2/timerfd_create.2:334
692 msgid "The system-wide limit on the total number of open files has been reached."
693 msgstr "オープン済みのファイル総数がシステム全体の上限に達していた。"
694
695 #. type: TP
696 #: build/C/man2/eventfd.2:241 build/C/man2/signalfd.2:293
697 #: build/C/man2/timerfd_create.2:334
698 #, no-wrap
699 msgid "B<ENODEV>"
700 msgstr "B<ENODEV>"
701
702 #. type: Plain text
703 #: build/C/man2/eventfd.2:249 build/C/man2/signalfd.2:296
704 #: build/C/man2/timerfd_create.2:337
705 msgid "Could not mount (internal) anonymous inode device."
706 msgstr "(カーネル内の) 無名 inode デバイスをマウントできなかった。"
707
708 #. type: TP
709 #: build/C/man2/eventfd.2:249 build/C/man2/s390_runtime_instr.2:73
710 #: build/C/man2/sigaltstack.2:147 build/C/man2/signalfd.2:296
711 #: build/C/man2/timer_create.2:189 build/C/man2/timerfd_create.2:337
712 #, no-wrap
713 msgid "B<ENOMEM>"
714 msgstr "B<ENOMEM>"
715
716 #. type: Plain text
717 #: build/C/man2/eventfd.2:253
718 msgid "There was insufficient memory to create a new eventfd file descriptor."
719 msgstr "新しい eventfd ファイルディスクリプターを生成するのに十分なメモリーがなかった。"
720
721 #. type: SH
722 #: build/C/man2/eventfd.2:253 build/C/man2/prctl.2:1177
723 #: build/C/man3/psignal.3:95 build/C/man2/restart_syscall.2:96
724 #: build/C/man2/rt_sigqueueinfo.2:169 build/C/man2/s390_runtime_instr.2:79
725 #: build/C/man2/sgetmask.2:66 build/C/man2/signalfd.2:299
726 #: build/C/man3/sigqueue.3:112 build/C/man3/sigvec.3:234
727 #: build/C/man2/timer_create.2:193 build/C/man2/timer_delete.2:65
728 #: build/C/man2/timer_getoverrun.2:95 build/C/man2/timer_settime.2:205
729 #: build/C/man2/timerfd_create.2:375 build/C/man2/tkill.2:104
730 #, no-wrap
731 msgid "VERSIONS"
732 msgstr "バージョン"
733
734 #.  eventfd() is in glibc 2.7, but reportedly does not build
735 #. type: Plain text
736 #: build/C/man2/eventfd.2:266
737 msgid "B<eventfd>()  is available on Linux since kernel 2.6.22.  Working support is provided in glibc since version 2.8.  The B<eventfd2>()  system call (see NOTES) is available on Linux since kernel 2.6.27.  Since version 2.9, the glibc B<eventfd>()  wrapper will employ the B<eventfd2>()  system call, if it is supported by the kernel."
738 msgstr "B<eventfd>()  はカーネル 2.6.22 以降の Linux で利用可能である。 正しく動作する glibc 側のサポートはバージョン 2.8 以降で提供されている。 B<eventfd2>()  システムコール (「注意」参照) は カーネル 2.6.27 以降の Linux で利用可能である。 バージョン 2.9 以降では、glibc の B<eventfd>()  のラッパー関数は、カーネルが対応していれば B<eventfd2>()  システムコールを利用する。"
739
740 #. type: Plain text
741 #: build/C/man2/eventfd.2:271
742 msgid "B<eventfd>()  and B<eventfd2>()  are Linux-specific."
743 msgstr "B<eventfd>()  と B<eventfd2>()  は Linux 固有である。"
744
745 #. type: Plain text
746 #: build/C/man2/eventfd.2:279
747 msgid "Applications can use an eventfd file descriptor instead of a pipe (see B<pipe>(2))  in all cases where a pipe is used simply to signal events.  The kernel overhead of an eventfd file descriptor is much lower than that of a pipe, and only one file descriptor is required (versus the two required for a pipe)."
748 msgstr "アプリケーションは、パイプをイベントを通知するためだけに使用している 全ての場面において、パイプの代わりに eventfd ファイルディスクリプターを 使用することができる。 eventfd ファイルディスクリプターを使う方が、パイプを使う場合に比べて カーネルでのオーバヘッドは比べるとずっと小さく、ファイルディスクリプターも 一つしか必要としない (パイプの場合は二つ必要である)。"
749
750 #.  or eventually syslets/threadlets
751 #. type: Plain text
752 #: build/C/man2/eventfd.2:285
753 msgid "When used in the kernel, an eventfd file descriptor can provide a bridge from kernel to user space, allowing, for example, functionalities like KAIO (kernel AIO)  to signal to a file descriptor that some operation is complete."
754 msgstr "カーネル内で使用すると、eventfd ファイルディスクリプターはカーネル空間からユーザー空間へのブリッジ機能を提供することができ、 例えば KAIO (kernel AIO)  のような機能が、あるファイルディスクリプターに何らかの操作が完了したことを 通知することができる。"
755
756 #. type: Plain text
757 #: build/C/man2/eventfd.2:302
758 msgid "A key point about an eventfd file descriptor is that it can be monitored just like any other file descriptor using B<select>(2), B<poll>(2), or B<epoll>(7).  This means that an application can simultaneously monitor the readiness of \"traditional\" files and the readiness of other kernel mechanisms that support the eventfd interface.  (Without the B<eventfd>()  interface, these mechanisms could not be multiplexed via B<select>(2), B<poll>(2), or B<epoll>(7).)"
759 msgstr "eventfd ファイルディスクリプターの重要な点は、 eventfd ファイルディスクリプターが B<select>(2), B<poll>(2), B<epoll>(7)  を使って他のファイルディスクリプターと全く同様に監視できる点である。 このことは、アプリケーションは「従来の (traditional)」 ファイルの状態変化と eventfd インターフェースをサポートする他のカーネル機構の状態変化を同時に監視 できることを意味する (B<eventfd>()  インターフェースがない時には、これらのカーネル機構は B<select>(2), B<poll>(2), B<epoll>(7)  経由で多重することはできなかった)。"
760
761 #. type: SS
762 #: build/C/man2/eventfd.2:302 build/C/man2/signalfd.2:326
763 #: build/C/man2/sigwaitinfo.2:183 build/C/man2/timer_create.2:243
764 #: build/C/man2/wait.2:525
765 #, no-wrap
766 msgid "C library/kernel ABI differences"
767 msgstr "C ライブラリとカーネル ABI の違い"
768
769 #. type: Plain text
770 #: build/C/man2/eventfd.2:316
771 msgid "There are two underlying Linux system calls: B<eventfd>()  and the more recent B<eventfd2>().  The former system call does not implement a I<flags> argument.  The latter system call implements the I<flags> values described above.  The glibc wrapper function will use B<eventfd2>()  where it is available."
772 msgstr "下層にある Linux システムコールは二種類あり、 B<eventfd>()  と、もっと新しい B<eventfd2>()  である。 B<eventfd>()  は I<flags> 引き数を実装していない。 B<eventfd2>()  では上記の値の I<flags> が実装されている。 glibc のラッパー関数は、 B<eventfd2>()  が利用可能であれば、これを使用する。"
773
774 #. type: SS
775 #: build/C/man2/eventfd.2:316
776 #, no-wrap
777 msgid "Additional glibc features"
778 msgstr "glibc の追加機能"
779
780 #. type: Plain text
781 #: build/C/man2/eventfd.2:320
782 msgid "The GNU C library defines an additional type, and two functions that attempt to abstract some of the details of reading and writing on an eventfd file descriptor:"
783 msgstr "GNU C ライブラリは、eventfd ファイルディスクリプターの読み出しと書き込みに を関する詳細のいくつか抽象化するために、一つの型と、二つの関数を追加で 定義している。"
784
785 #. type: Plain text
786 #: build/C/man2/eventfd.2:324
787 #, no-wrap
788 msgid "typedef uint64_t eventfd_t;\n"
789 msgstr "typedef uint64_t eventfd_t;\n"
790
791 #. type: Plain text
792 #: build/C/man2/eventfd.2:327
793 #, no-wrap
794 msgid ""
795 "int eventfd_read(int fd, eventfd_t *value);\n"
796 "int eventfd_write(int fd, eventfd_t value);\n"
797 msgstr ""
798 "int eventfd_read(int fd, eventfd_t *value);\n"
799 "int eventfd_write(int fd, eventfd_t value);\n"
800
801 #. type: Plain text
802 #: build/C/man2/eventfd.2:334
803 msgid "The functions perform the read and write operations on an eventfd file descriptor, returning 0 if the correct number of bytes was transferred, or -1 otherwise."
804 msgstr "これらの関数は、eventfd ファイルディスクリプターに対する読み出しと 書き込みの操作を実行し、正しいバイト数が転送された場合には 0 を返し、そうでない場合は -1 を返す。"
805
806 #. type: SH
807 #: build/C/man2/eventfd.2:334 build/C/man2/sigaction.2:858
808 #: build/C/man2/sigaltstack.2:217 build/C/man2/signalfd.2:360
809 #: build/C/man3/sigwait.3:91 build/C/man2/timer_create.2:264
810 #: build/C/man2/timer_getoverrun.2:128 build/C/man2/timer_settime.2:209
811 #: build/C/man2/timerfd_create.2:386 build/C/man2/wait.2:552
812 #, no-wrap
813 msgid "EXAMPLE"
814 msgstr "例"
815
816 #. type: Plain text
817 #: build/C/man2/eventfd.2:343
818 msgid "The following program creates an eventfd file descriptor and then forks to create a child process.  While the parent briefly sleeps, the child writes each of the integers supplied in the program's command-line arguments to the eventfd file descriptor.  When the parent has finished sleeping, it reads from the eventfd file descriptor."
819 msgstr "以下のプログラムは eventfd ファイルディスクリプターを生成し、 その後 fork を実行して子プロセスを生成する。 親プロセスが少しの間 sleep する間に、子プロセスは プログラムのコマンドライン引き数で指定された整数(列)をそれぞれ eventfd ファイルディスクリプターに書き込む。 親プロセスは sleep を完了すると eventfd ファイルディスクリプターから 読み出しを行う。"
820
821 #. type: Plain text
822 #: build/C/man2/eventfd.2:345
823 msgid "The following shell session shows a sample run of the program:"
824 msgstr "以下に示すシェルセッションにこのプログラムの使い方を示す。"
825
826 #. type: Plain text
827 #: build/C/man2/eventfd.2:357
828 #, no-wrap
829 msgid ""
830 "$B< ./a.out 1 2 4 7 14>\n"
831 "Child writing 1 to efd\n"
832 "Child writing 2 to efd\n"
833 "Child writing 4 to efd\n"
834 "Child writing 7 to efd\n"
835 "Child writing 14 to efd\n"
836 "Child completed write loop\n"
837 "Parent about to read\n"
838 "Parent read 28 (0x1c) from efd\n"
839 msgstr ""
840 "$B< ./a.out 1 2 4 7 14>\n"
841 "Child writing 1 to efd\n"
842 "Child writing 2 to efd\n"
843 "Child writing 4 to efd\n"
844 "Child writing 7 to efd\n"
845 "Child writing 14 to efd\n"
846 "Child completed write loop\n"
847 "Parent about to read\n"
848 "Parent read 28 (0x1c) from efd\n"
849
850 #. type: SS
851 #: build/C/man2/eventfd.2:359 build/C/man2/signalfd.2:383
852 #: build/C/man2/timer_create.2:295 build/C/man2/timerfd_create.2:414
853 #: build/C/man2/wait.2:587
854 #, no-wrap
855 msgid "Program source"
856 msgstr "プログラムのソース"
857
858 #. type: Plain text
859 #: build/C/man2/eventfd.2:367
860 #, no-wrap
861 msgid ""
862 "#include E<lt>sys/eventfd.hE<gt>\n"
863 "#include E<lt>unistd.hE<gt>\n"
864 "#include E<lt>stdlib.hE<gt>\n"
865 "#include E<lt>stdio.hE<gt>\n"
866 "#include E<lt>stdint.hE<gt>             /* Definition of uint64_t */\n"
867 msgstr ""
868 "#include E<lt>sys/eventfd.hE<gt>\n"
869 "#include E<lt>unistd.hE<gt>\n"
870 "#include E<lt>stdlib.hE<gt>\n"
871 "#include E<lt>stdio.hE<gt>\n"
872 "#include E<lt>stdint.hE<gt>             /* Definition of uint64_t */\n"
873
874 #. type: Plain text
875 #: build/C/man2/eventfd.2:370 build/C/man2/signalfd.2:394
876 #, no-wrap
877 msgid ""
878 "#define handle_error(msg) \\e\n"
879 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
880 msgstr ""
881 "#define handle_error(msg) \\e\n"
882 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
883
884 #. type: Plain text
885 #: build/C/man2/eventfd.2:377
886 #, no-wrap
887 msgid ""
888 "int\n"
889 "main(int argc, char *argv[])\n"
890 "{\n"
891 "    int efd, j;\n"
892 "    uint64_t u;\n"
893 "    ssize_t s;\n"
894 msgstr ""
895 "int\n"
896 "main(int argc, char *argv[])\n"
897 "{\n"
898 "    int efd, j;\n"
899 "    uint64_t u;\n"
900 "    ssize_t s;\n"
901
902 #. type: Plain text
903 #: build/C/man2/eventfd.2:382
904 #, no-wrap
905 msgid ""
906 "    if (argc E<lt> 2) {\n"
907 "        fprintf(stderr, \"Usage: %s E<lt>numE<gt>...\\en\", argv[0]);\n"
908 "        exit(EXIT_FAILURE);\n"
909 "    }\n"
910 msgstr ""
911 "    if (argc E<lt> 2) {\n"
912 "        fprintf(stderr, \"Usage: %s E<lt>numE<gt>...\\en\", argv[0]);\n"
913 "        exit(EXIT_FAILURE);\n"
914 "    }\n"
915
916 #. type: Plain text
917 #: build/C/man2/eventfd.2:386
918 #, no-wrap
919 msgid ""
920 "    efd = eventfd(0, 0);\n"
921 "    if (efd == -1)\n"
922 "        handle_error(\"eventfd\");\n"
923 msgstr ""
924 "    efd = eventfd(0, 0);\n"
925 "    if (efd == -1)\n"
926 "        handle_error(\"eventfd\");\n"
927
928 #. type: Plain text
929 #: build/C/man2/eventfd.2:398
930 #, no-wrap
931 msgid ""
932 "    switch (fork()) {\n"
933 "    case 0:\n"
934 "        for (j = 1; j E<lt> argc; j++) {\n"
935 "            printf(\"Child writing %s to efd\\en\", argv[j]);\n"
936 "            u = strtoull(argv[j], NULL, 0);\n"
937 "                    /* strtoull() allows various bases */\n"
938 "            s = write(efd, &u, sizeof(uint64_t));\n"
939 "            if (s != sizeof(uint64_t))\n"
940 "                handle_error(\"write\");\n"
941 "        }\n"
942 "        printf(\"Child completed write loop\\en\");\n"
943 msgstr ""
944 "    switch (fork()) {\n"
945 "    case 0:\n"
946 "        for (j = 1; j E<lt> argc; j++) {\n"
947 "            printf(\"Child writing %s to efd\\en\", argv[j]);\n"
948 "            u = strtoull(argv[j], NULL, 0);\n"
949 "                    /* strtoull() allows various bases */\n"
950 "            s = write(efd, &u, sizeof(uint64_t));\n"
951 "            if (s != sizeof(uint64_t))\n"
952 "                handle_error(\"write\");\n"
953 "        }\n"
954 "        printf(\"Child completed write loop\\en\");\n"
955
956 #. type: Plain text
957 #: build/C/man2/eventfd.2:400
958 #, no-wrap
959 msgid "        exit(EXIT_SUCCESS);\n"
960 msgstr "        exit(EXIT_SUCCESS);\n"
961
962 #. type: Plain text
963 #: build/C/man2/eventfd.2:403
964 #, no-wrap
965 msgid ""
966 "    default:\n"
967 "        sleep(2);\n"
968 msgstr ""
969 "    default:\n"
970 "        sleep(2);\n"
971
972 #. type: Plain text
973 #: build/C/man2/eventfd.2:411
974 #, no-wrap
975 msgid ""
976 "        printf(\"Parent about to read\\en\");\n"
977 "        s = read(efd, &u, sizeof(uint64_t));\n"
978 "        if (s != sizeof(uint64_t))\n"
979 "            handle_error(\"read\");\n"
980 "        printf(\"Parent read %llu (0x%llx) from efd\\en\",\n"
981 "                (unsigned long long) u, (unsigned long long) u);\n"
982 "        exit(EXIT_SUCCESS);\n"
983 msgstr ""
984 "        printf(\"Parent about to read\\en\");\n"
985 "        s = read(efd, &u, sizeof(uint64_t));\n"
986 "        if (s != sizeof(uint64_t))\n"
987 "            handle_error(\"read\");\n"
988 "        printf(\"Parent read %llu (0x%llx) from efd\\en\",\n"
989 "                (unsigned long long) u, (unsigned long long) u);\n"
990 "        exit(EXIT_SUCCESS);\n"
991
992 #. type: Plain text
993 #: build/C/man2/eventfd.2:416
994 #, no-wrap
995 msgid ""
996 "    case -1:\n"
997 "        handle_error(\"fork\");\n"
998 "    }\n"
999 "}\n"
1000 msgstr ""
1001 "    case -1:\n"
1002 "        handle_error(\"fork\");\n"
1003 "    }\n"
1004 "}\n"
1005
1006 #. type: Plain text
1007 #: build/C/man2/eventfd.2:428
1008 msgid "B<futex>(2), B<pipe>(2), B<poll>(2), B<read>(2), B<select>(2), B<signalfd>(2), B<timerfd_create>(2), B<write>(2), B<epoll>(7), B<sem_overview>(7)"
1009 msgstr "B<futex>(2), B<pipe>(2), B<poll>(2), B<read>(2), B<select>(2), B<signalfd>(2), B<timerfd_create>(2), B<write>(2), B<epoll>(7), B<sem_overview>(7)"
1010
1011 #. type: TH
1012 #: build/C/man2/getitimer.2:12
1013 #, no-wrap
1014 msgid "GETITIMER"
1015 msgstr "GETITIMER"
1016
1017 #. type: Plain text
1018 #: build/C/man2/getitimer.2:15
1019 msgid "getitimer, setitimer - get or set value of an interval timer"
1020 msgstr "getitimer, setitimer - インターバルタイマーの値を取得または設定する"
1021
1022 #. type: Plain text
1023 #: build/C/man2/getitimer.2:18
1024 #, no-wrap
1025 msgid "B<#include E<lt>sys/time.hE<gt>>\n"
1026 msgstr "B<#include E<lt>sys/time.hE<gt>>\n"
1027
1028 #. type: Plain text
1029 #: build/C/man2/getitimer.2:20
1030 #, no-wrap
1031 msgid "B<int getitimer(int >I<which>B<, struct itimerval *>I<curr_value>B<);>\n"
1032 msgstr "B<int getitimer(int >I<which>B<, struct itimerval *>I<curr_value>B<);>\n"
1033
1034 #. type: Plain text
1035 #: build/C/man2/getitimer.2:23
1036 #, no-wrap
1037 msgid ""
1038 "B<int setitimer(int >I<which>B<, const struct itimerval *>I<new_value>B<,>\n"
1039 "B<              struct itimerval *>I<old_value>B<);>\n"
1040 msgstr ""
1041 "B<int setitimer(int >I<which>B<, const struct itimerval *>I<new_value>B<,>\n"
1042 "B<              struct itimerval *>I<old_value>B<);>\n"
1043
1044 #. type: Plain text
1045 #: build/C/man2/getitimer.2:29
1046 msgid "The system provides each process with three interval timers, each decrementing in a distinct time domain.  When a timer expires, a signal is sent to the process, and the timer is reset to the specified interval (if nonzero)."
1047 msgstr "システムは 1 個のプロセスにつき 3 個のインターバルタイマーを提供する。 それぞれのタイマーは別々の時間領域で減少する。 あるタイマーが満了すると、 プロセスにシグナルが送られ、 タイマーは (0 でなければ) 指定されたインターバルに再設定される。"
1048
1049 #. type: TP
1050 #: build/C/man2/getitimer.2:29
1051 #, no-wrap
1052 msgid "B<ITIMER_REAL>"
1053 msgstr "B<ITIMER_REAL>"
1054
1055 #. type: Plain text
1056 #: build/C/man2/getitimer.2:34
1057 msgid "decrements in real time, and delivers B<SIGALRM> upon expiration."
1058 msgstr "実時間 (real time) で減少し、満了すると B<SIGALRM> が送られる。"
1059
1060 #. type: TP
1061 #: build/C/man2/getitimer.2:34
1062 #, no-wrap
1063 msgid "B<ITIMER_VIRTUAL>"
1064 msgstr "B<ITIMER_VIRTUAL>"
1065
1066 #. type: Plain text
1067 #: build/C/man2/getitimer.2:39
1068 msgid "decrements only when the process is executing, and delivers B<SIGVTALRM> upon expiration."
1069 msgstr "プロセスが実行されている間のみ減少し、満了すると B<SIGVTALRM> が送られる。"
1070
1071 #. type: TP
1072 #: build/C/man2/getitimer.2:39
1073 #, no-wrap
1074 msgid "B<ITIMER_PROF>"
1075 msgstr "B<ITIMER_PROF>"
1076
1077 #. type: Plain text
1078 #: build/C/man2/getitimer.2:49
1079 msgid "decrements both when the process executes and when the system is executing on behalf of the process.  Coupled with B<ITIMER_VIRTUAL>, this timer is usually used to profile the time spent by the application in user and kernel space.  B<SIGPROF> is delivered upon expiration."
1080 msgstr "プロセスが実行されていて、 かつシステムがそのプロセスのために処理を行なっている間に減少する。 多くの場合、このタイマーは B<ITIMER_VIRTUAL> と組み合わされて、アプリケーションがカーネル空間とユーザー空間で どれだけの時間を過ごしたかをプロファイルするのに使用される。 満了すると B<SIGPROF> が送られる。"
1081
1082 #. type: Plain text
1083 #: build/C/man2/getitimer.2:51
1084 msgid "Timer values are defined by the following structures:"
1085 msgstr "タイマーの値は以下の構造体によって定義される:"
1086
1087 #. type: Plain text
1088 #: build/C/man2/getitimer.2:59
1089 #, no-wrap
1090 msgid ""
1091 "struct itimerval {\n"
1092 "    struct timeval it_interval; /* Interval for periodic timer */\n"
1093 "    struct timeval it_value;    /* Time until next expiration */\n"
1094 "};\n"
1095 msgstr ""
1096 "struct itimerval {\n"
1097 "    struct timeval it_interval; /* Interval for periodic timer */\n"
1098 "    struct timeval it_value;    /* Time until next expiration */\n"
1099 "};\n"
1100
1101 #. type: Plain text
1102 #: build/C/man2/getitimer.2:64
1103 #, no-wrap
1104 msgid ""
1105 "struct timeval {\n"
1106 "    time_t      tv_sec;         /* seconds */\n"
1107 "    suseconds_t tv_usec;        /* microseconds */\n"
1108 "};\n"
1109 msgstr ""
1110 "struct timeval {\n"
1111 "    time_t      tv_sec;         /* seconds */\n"
1112 "    suseconds_t tv_usec;        /* microseconds */\n"
1113 "};\n"
1114
1115 #. type: Plain text
1116 #: build/C/man2/getitimer.2:90
1117 msgid "The function B<getitimer>()  fills the structure pointed to by I<curr_value> with the current value (i.e., the amount of time remaining until the next expiration)  of the timer specified by I<which> (one of B<ITIMER_REAL>, B<ITIMER_VIRTUAL>, or B<ITIMER_PROF>).  The subfields of the field I<it_value> are set to the amount of time remaining on the timer, or zero if the timer is disabled.  The I<it_interval> field is set to the timer interval (period); a value of zero returned in (both subfields of) this field indicates that this is a single-shot timer."
1118 msgstr "B<getitimer>()  関数は、 I<which> で指定されたタイマー (B<ITIMER_REAL>, B<ITIMER_VIRTUAL>, B<ITIMER_PROF> のどれか) の現在の値 (すなわち、次のタイマー満了までの残り時間) を、 I<curr_value> で指定された構造体に格納する。 I<it_value> フィールドのサブフィールドにはタイマーの残り時間が設定される。 タイマーが無効になっている場合は ゼロが設定される。 I<it_interval> フィールドにはタイマーのインターバル (期間) が設定される。 I<it_interval> (の両方のサブフィールド) で値 0 が返された場合は、 このタイマーが 1 回限りのタイマーであることを示している。"
1119
1120 #. type: Plain text
1121 #: build/C/man2/getitimer.2:101
1122 msgid "The function B<setitimer>()  sets the specified timer to the value in I<new_value>.  If I<old_value> is non-NULL, the old value of the timer (i.e., the same information as returned by B<getitimer>())  is stored there."
1123 msgstr "B<setitimer>()  関数は指定されたタイマーに I<new_value> の値を設定する。 I<old_value> が NULL 以外の場合、タイマーの古い値 (すなわち B<getitimer>() で返されるのと同じ情報) が I<old_value> に格納される。"
1124
1125 #. type: Plain text
1126 #: build/C/man2/getitimer.2:111
1127 msgid "Timers decrement from I<it_value> to zero, generate a signal, and reset to I<it_interval>.  A timer which is set to zero (I<it_value> is zero or the timer expires and I<it_interval> is zero) stops."
1128 msgstr "タイマーは I<it_value> からゼロへ向けて減っていき、シグナルを生成し、 I<it_interval> に初期化される。 タイマーがゼロに設定された場合 (I<it_value> がゼロか、タイマーが満了した時に I<it_interval> がゼロの場合) は停止する。"
1129
1130 #. type: Plain text
1131 #: build/C/man2/getitimer.2:117
1132 msgid "Both I<tv_sec> and I<tv_usec> are significant in determining the duration of a timer."
1133 msgstr "タイマーの期間は I<tv_sec> と I<tv_usec> の両方により決定される。"
1134
1135 #. type: Plain text
1136 #: build/C/man2/getitimer.2:129
1137 msgid "Timers will never expire before the requested time, but may expire some (short) time afterward, which depends on the system timer resolution and on the system load; see B<time>(7).  (But see BUGS below.)  Upon expiration, a signal will be generated and the timer reset.  If the timer expires while the process is active (always true for B<ITIMER_VIRTUAL>), the signal will be delivered immediately when generated.  Otherwise, the delivery will be offset by a small time dependent on the system loading."
1138 msgstr "要求した時間がくる前にタイマーが満了することはないが、 逆にある (短い) 時間だけ満了が遅れることはある。 どれだけ遅れるかはシステムの時間分解能とシステムの負荷に依存する (B<time>(7)  参照; 但し、バグの項も参照のこと)。 タイマーが満了するとシグナルが生成され、タイマーは初期化される。 プロセスがアクティブな時 (B<ITIMER_VIRTUAL> の場合には常にそうである) にタイマーが満了した場合、生成されたシグナルは すぐに配送される。それ以外の場合は、システムの負荷により少しの時間だけ 遅れて配送される。"
1139
1140 #. type: Plain text
1141 #: build/C/man2/getitimer.2:134 build/C/man2/killpg.2:94
1142 #: build/C/man2/tkill.2:92
1143 msgid "On success, zero is returned.  On error, -1 is returned, and I<errno> is set appropriately."
1144 msgstr "成功した場合、0 が返される。エラーが発生した場合、-1 が返され、 I<errno> が適切に設定される。"
1145
1146 #. type: TP
1147 #: build/C/man2/getitimer.2:135 build/C/man2/prctl.2:905
1148 #: build/C/man2/prctl.2:909 build/C/man2/sigaction.2:734
1149 #: build/C/man2/sigaltstack.2:138 build/C/man2/sigpending.2:60
1150 #: build/C/man2/sigprocmask.2:100 build/C/man2/sigsuspend.2:77
1151 #: build/C/man2/timer_settime.2:184 build/C/man2/timerfd_create.2:349
1152 #, no-wrap
1153 msgid "B<EFAULT>"
1154 msgstr "B<EFAULT>"
1155
1156 #. type: Plain text
1157 #: build/C/man2/getitimer.2:142 build/C/man2/timerfd_create.2:356
1158 msgid "I<new_value>, I<old_value>, or I<curr_value> is not valid a pointer."
1159 msgstr "I<new_value>, I<old_value>, I<curr_value> が有効なポインターではない。"
1160
1161 #. type: Plain text
1162 #: build/C/man2/getitimer.2:155
1163 msgid "I<which> is not one of B<ITIMER_REAL>, B<ITIMER_VIRTUAL>, or B<ITIMER_PROF>; or (since Linux 2.6.22) one of the I<tv_usec> fields in the structure pointed to by I<new_value> contains a value outside the range 0 to 999999."
1164 msgstr "I<which> が B<ITIMER_REAL>, B<ITIMER_VIRTUAL>, B<ITIMER_PROF> のどれでもない。 または (Linux 2.6.22 以降で)  I<new_value> で指定された構造体の I<tv_usec> フィールドの一つが 0 以上 999999 以下の範囲に入らない値である。"
1165
1166 #. type: Plain text
1167 #: build/C/man2/getitimer.2:165
1168 msgid "POSIX.1-2001, SVr4, 4.4BSD (this call first appeared in 4.2BSD).  POSIX.1-2008 marks B<getitimer>()  and B<setitimer>()  obsolete, recommending the use of the POSIX timers API (B<timer_gettime>(2), B<timer_settime>(2), etc.) instead."
1169 msgstr "POSIX.1-2001, SVr4, 4.4BSD (このコールは 4.2BSD で始めて現われた).  POSIX.1-2008 では、 B<getitimer>()  と B<setitimer>()  は廃止予定とされており、 代わりに POSIX タイマー API (B<timer_gettime>(2), B<timer_settime>(2)  など) を使うことが推奨されている。"
1170
1171 #. type: Plain text
1172 #: build/C/man2/getitimer.2:171
1173 msgid "A child created via B<fork>(2)  does not inherit its parent's interval timers.  Interval timers are preserved across an B<execve>(2)."
1174 msgstr "B<fork>(2)  で作成された子プロセスは、 親プロセスのインターバルタイマーを継承しない。 B<execve>(2)  の前後ではインターバルタイマーは保存される。"
1175
1176 #. type: Plain text
1177 #: build/C/man2/getitimer.2:181
1178 msgid "POSIX.1 leaves the interaction between B<setitimer>()  and the three interfaces B<alarm>(2), B<sleep>(3), and B<usleep>(3)  unspecified."
1179 msgstr "POSIX.1 では、 B<setitimer>()  と、 B<alarm>(2), B<sleep>(3), B<usleep>(3)  という 3 つのインターフェースとの相互の影響については規定していない。"
1180
1181 #. type: Plain text
1182 #: build/C/man2/getitimer.2:183
1183 msgid "The standards are silent on the meaning of the call:"
1184 msgstr "標準では、次の呼び出しの意味については規定されていない。"
1185
1186 #. type: Plain text
1187 #: build/C/man2/getitimer.2:185
1188 #, no-wrap
1189 msgid "    setitimer(which, NULL, &old_value);\n"
1190 msgstr "    setitimer(which, NULL, &old_value);\n"
1191
1192 #. type: Plain text
1193 #: build/C/man2/getitimer.2:188
1194 msgid "Many systems (Solaris, the BSDs, and perhaps others)  treat this as equivalent to:"
1195 msgstr "(Solaris, BSD 系やおそらく他のシステムもそうだが) 多くのシステムでは、この呼び出しは以下と等価である。"
1196
1197 #. type: Plain text
1198 #: build/C/man2/getitimer.2:190
1199 #, no-wrap
1200 msgid "    getitimer(which, &old_value);\n"
1201 msgstr "    getitimer(which, &old_value);\n"
1202
1203 #. type: Plain text
1204 #: build/C/man2/getitimer.2:196
1205 msgid "In Linux, this is treated as being equivalent to a call in which the I<new_value> fields are zero; that is, the timer is disabled.  I<Don't use this Linux misfeature>: it is nonportable and unnecessary."
1206 msgstr "Linux では、この呼び出しは I<new_value> フィールドが 0 の呼び出しと等価なものと扱われる。 つまり、タイマーが無効になる。 I<Linux のこの間違った機能を使用しないこと>。移植性もなく、不必要な機能である。"
1207
1208 #. type: SH
1209 #: build/C/man2/getitimer.2:196 build/C/man2/kill.2:161
1210 #: build/C/man3/profil.3:72 build/C/man3/psignal.3:101
1211 #: build/C/man2/sigaction.2:849 build/C/man2/signalfd.2:352
1212 #: build/C/man2/sigpending.2:85 build/C/man3/sigset.3:232
1213 #: build/C/man2/timer_getoverrun.2:115 build/C/man2/timerfd_create.2:380
1214 #: build/C/man2/wait.2:537
1215 #, no-wrap
1216 msgid "BUGS"
1217 msgstr "バグ"
1218
1219 #. type: Plain text
1220 #: build/C/man2/getitimer.2:205
1221 msgid "The generation and delivery of a signal are distinct, and only one instance of each of the signals listed above may be pending for a process.  Under very heavy loading, an B<ITIMER_REAL> timer may expire before the signal from a previous expiration has been delivered.  The second signal in such an event will be lost."
1222 msgstr "シグナルの生成と配送は別個のものであり、 前述のシグナルのそれぞれについて一つだけがプロセスのために 待機する。 非常に重い負荷の下では、 B<ITIMER_REAL> タイマーでは、時間切れにより生成された一つ前のシグナルが配送される前に、 次の時間切れが起こる場合がある。 そのような場合、 2 個めのイベントに対するシグナルは失われてしまう。"
1223
1224 #. type: Plain text
1225 #: build/C/man2/getitimer.2:220
1226 msgid "On Linux kernels before 2.6.16, timer values are represented in jiffies.  If a request is made set a timer with a value whose jiffies representation exceeds B<MAX_SEC_IN_JIFFIES> (defined in I<include/linux/jiffies.h>), then the timer is silently truncated to this ceiling value.  On Linux/i386 (where, since Linux 2.6.13, the default jiffy is 0.004 seconds), this means that the ceiling value for a timer is approximately 99.42 days.  Since Linux 2.6.16, the kernel uses a different internal representation for times, and this ceiling is removed."
1227 msgstr "バージョン 2.6.16 より前の Linux カーネルでは、 タイマーの値は jiffy で表現される。 要求が jiffy 表現で (I<include/linux/jiffies.h> で定義されている)  B<MAX_SEC_IN_JIFFIES> を越える値をタイマーに設定しようとするものの場合、 タイマーは暗黙にこの上限値に切り詰められる。 Linux/i386 の場合 (Linux 2.6.13 以降では jiffy は 0.004 秒) の場合、 これはタイマーの上限値がおよそ 99.42 日になることを意味する。 Linux 2.6.16 以降では、カーネルは時間に関する内部表現として 異なる表現を使うようになっており、この上限はなくなった。"
1228
1229 #.  4 Jul 2005: It looks like this bug may remain in 2.4.x.
1230 #.      http://lkml.org/lkml/2005/7/1/165
1231 #. type: Plain text
1232 #: build/C/man2/getitimer.2:227
1233 msgid "On certain systems (including i386), Linux kernels before version 2.6.12 have a bug which will produce premature timer expirations of up to one jiffy under some circumstances.  This bug is fixed in kernel 2.6.12."
1234 msgstr "(i386 を含む) いくつかのシステムでは、 バージョン 2.6.12 以前の Linux カーネルは ある種の状況では 1 jiffy 早くタイマーが終了してしまうというバグがあった。 このバグはカーネル 2.6.12 で修正された。"
1235
1236 #.  Bugzilla report 25 Apr 2006:
1237 #.  http://bugzilla.kernel.org/show_bug.cgi?id=6443
1238 #.  "setitimer() should reject noncanonical arguments"
1239 #. type: Plain text
1240 #: build/C/man2/getitimer.2:246
1241 msgid "POSIX.1-2001 says that B<setitimer>()  should fail if a I<tv_usec> value is specified that is outside of the range 0 to 999999.  However, in kernels up to and including 2.6.21, Linux does not give an error, but instead silently adjusts the corresponding seconds value for the timer.  From kernel 2.6.22 onward, this nonconformance has been repaired: an improper I<tv_usec> value results in an B<EINVAL> error."
1242 msgstr "POSIX.1-2001 では B<setitimer>()  は I<tv_usec> の値が 0 から 999999 の範囲外である場合には失敗するべきだとしている。 しかし、2.6.21 以前のカーネルの Linux ではエラーにならず、 対応する秒数の分だけそのタイマーの秒の値が暗黙に調整される。 カーネル 2.6.22 以降では、この標準非準拠の動作は修正され、 I<tv_usec> の値が不適切な場合には B<EINVAL> エラーとなる。"
1243
1244 #. type: Plain text
1245 #: build/C/man2/getitimer.2:253
1246 msgid "B<gettimeofday>(2), B<sigaction>(2), B<signal>(2), B<timer_create>(2), B<timerfd_create>(2), B<time>(7)"
1247 msgstr "B<gettimeofday>(2), B<sigaction>(2), B<signal>(2), B<timer_create>(2), B<timerfd_create>(2), B<time>(7)"
1248
1249 #. type: TH
1250 #: build/C/man3/gsignal.3:27
1251 #, no-wrap
1252 msgid "GSIGNAL"
1253 msgstr "GSIGNAL"
1254
1255 #. type: TH
1256 #: build/C/man3/gsignal.3:27
1257 #, no-wrap
1258 msgid "2007-07-26"
1259 msgstr "2007-07-26"
1260
1261 #. type: Plain text
1262 #: build/C/man3/gsignal.3:30
1263 msgid "gsignal, ssignal - software signal facility"
1264 msgstr "gsignal, ssignal - ソフトウェアシグナル機能"
1265
1266 #. type: Plain text
1267 #: build/C/man3/gsignal.3:33 build/C/man2/kill.2:52 build/C/man3/psignal.3:36
1268 #: build/C/man3/raise.3:35 build/C/man2/sigaction.2:55
1269 #: build/C/man3/siginterrupt.3:37 build/C/man3/sigpause.3:31
1270 #: build/C/man3/sigwait.3:32 build/C/man2/sigwaitinfo.2:31
1271 #, no-wrap
1272 msgid "B<#include E<lt>signal.hE<gt>>\n"
1273 msgstr "B<#include E<lt>signal.hE<gt>>\n"
1274
1275 #. type: Plain text
1276 #: build/C/man3/gsignal.3:35
1277 #, no-wrap
1278 msgid "B<typedef void (*sighandler_t)(int);>\n"
1279 msgstr "B<typedef void (*sighandler_t)(int);>\n"
1280
1281 #. type: Plain text
1282 #: build/C/man3/gsignal.3:37
1283 #, no-wrap
1284 msgid "B<int gsignal(int >I<signum>B<);>\n"
1285 msgstr "B<int gsignal(int >I<signum>B<);>\n"
1286
1287 #. type: Plain text
1288 #: build/C/man3/gsignal.3:39
1289 #, no-wrap
1290 msgid "B<sighandler_t ssignal(int >I<signum>B<, sighandler_t >I<action>B<);>\n"
1291 msgstr "B<sighandler_t ssignal(int >I<signum>B<, sighandler_t >I<action>B<);>\n"
1292
1293 #. type: Plain text
1294 #: build/C/man3/gsignal.3:44 build/C/man2/kill.2:59 build/C/man2/killpg.2:53
1295 #: build/C/man3/profil.3:42 build/C/man3/psignal.3:46
1296 #: build/C/man2/sigaction.2:63 build/C/man2/sigaltstack.2:38
1297 #: build/C/man3/siginterrupt.3:44 build/C/man2/sigpending.2:40
1298 #: build/C/man2/sigprocmask.2:41 build/C/man3/sigqueue.3:39
1299 #: build/C/man3/sigset.3:45 build/C/man3/sigsetops.3:51
1300 #: build/C/man2/sigsuspend.2:40 build/C/man3/sigvec.3:45
1301 #: build/C/man3/sigwait.3:39 build/C/man2/sigwaitinfo.2:41
1302 #: build/C/man2/timer_create.2:50 build/C/man2/timer_delete.2:41
1303 #: build/C/man2/timer_getoverrun.2:41 build/C/man2/timer_settime.2:45
1304 #: build/C/man2/wait.2:69 build/C/man2/wait4.2:53
1305 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1306 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1307
1308 #. type: Plain text
1309 #: build/C/man3/gsignal.3:49
1310 msgid "B<gsignal>(), B<ssignal>(): _SVID_SOURCE"
1311 msgstr "B<gsignal>(), B<ssignal>(): _SVID_SOURCE"
1312
1313 #. type: Plain text
1314 #: build/C/man3/gsignal.3:57
1315 msgid "Don't use these functions under Linux.  Due to a historical mistake, under Linux these functions are aliases for B<raise>(3)  and B<signal>(2), respectively."
1316 msgstr "Linux ではこれらの関数を使用しないこと。 過去に間違いがあり、Linux では B<gsignal>()  と B<ssignal>()  はそれぞれ B<raise>(3)  と B<signal>(2)  の別名になっている。"
1317
1318 #. type: Plain text
1319 #: build/C/man3/gsignal.3:95
1320 msgid "Elsewhere, on System V-like systems, these functions implement software signaling, entirely independent of the classical B<signal>(2)  and B<kill>(2)  functions.  The function B<ssignal>()  defines the action to take when the software signal with number I<signum> is raised using the function B<gsignal>(), and returns the previous such action or B<SIG_DFL>.  The function B<gsignal>()  does the following: if no action (or the action B<SIG_DFL>)  was specified for I<signum>, then it does nothing and returns 0.  If the action B<SIG_IGN> was specified for I<signum>, then it does nothing and returns 1.  Otherwise, it resets the action to B<SIG_DFL> and calls the action function with argument I<signum>, and returns the value returned by that function.  The range of possible values I<signum> varies (often 1-15 or 1-17)."
1321 msgstr "一方、System V 風のシステムでは、これらの関数で、 従来の B<signal>(2)  や B<kill>(2)  の関数群とは完全に独立な、 ソフトウェアシグナリングを実現している。 B<ssignal>()  関数は、番号 I<signum> のソフトウェアシグナルが B<gsignal>()  関数を使って発生された時にとるべきアクションを定義する。 B<gsignal>()  の返り値は、一つ前に指定されていたアクション、もしくは B<SIG_DFL> である。 B<gsignal>()  は以下のような動作を行う: I<signum> に対してアクションが指定されていないか、アクション B<SIG_DFL> が指定されていた場合、何もせずに 0 を返す。 I<signum> に対して アクション B<SIG_IGN> が指定されていた場合、何もせずに 1 を返す。 それ以外の場合、アクションを B<SIG_DFL> にリセットし、引き数に I<signum> を指定してアクション関数を呼び出して、アクション関数の返り値を返す。 I<signum> がとり得る値の範囲は実装により異なる (多くの場合 1〜15 か 1〜17 である)。"
1322
1323 #. type: Plain text
1324 #: build/C/man3/gsignal.3:103
1325 msgid "These functions are available under AIX, DG/UX, HP-UX, SCO, Solaris, Tru64.  They are called obsolete under most of these systems, and are broken under Linux libc and glibc.  Some systems also have B<gsignal_r>()  and B<ssignal_r>()."
1326 msgstr "これらの関数は、AIX, DG/UX, HP-UX, SCO, Solaris, Tru64 で使用可能である。 これらのシステムのほとんどで廃止されたことになっており、 Linux の libc および glibc では正しく実装されていない。 B<gsignal_r>()  と B<ssignal_r>()  が実装されているシステムもある。"
1327
1328 #. type: Plain text
1329 #: build/C/man3/gsignal.3:107
1330 msgid "B<kill>(2), B<signal>(2), B<raise>(3)"
1331 msgstr "B<kill>(2), B<signal>(2), B<raise>(3)"
1332
1333 #. type: TH
1334 #: build/C/man2/kill.2:44
1335 #, no-wrap
1336 msgid "KILL"
1337 msgstr "KILL"
1338
1339 #. type: TH
1340 #: build/C/man2/kill.2:44
1341 #, no-wrap
1342 msgid "2013-09-17"
1343 msgstr "2013-09-17"
1344
1345 #. type: Plain text
1346 #: build/C/man2/kill.2:47
1347 msgid "kill - send signal to a process"
1348 msgstr "kill - プロセスにシグナルを送る"
1349
1350 #. type: Plain text
1351 #: build/C/man2/kill.2:50
1352 #, no-wrap
1353 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
1354 msgstr "B<#include E<lt>sys/types.hE<gt>>\n"
1355
1356 #. type: Plain text
1357 #: build/C/man2/kill.2:54
1358 #, no-wrap
1359 msgid "B<int kill(pid_t >I<pid>B<, int >I<sig>B<);>\n"
1360 msgstr "B<int kill(pid_t >I<pid>B<, int >I<sig>B<);>\n"
1361
1362 #. type: Plain text
1363 #: build/C/man2/kill.2:64
1364 msgid "B<kill>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
1365 msgstr "B<kill>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
1366
1367 #. type: Plain text
1368 #: build/C/man2/kill.2:70
1369 msgid "The B<kill>()  system call can be used to send any signal to any process group or process."
1370 msgstr "システムコールの B<kill>()  は、任意のプロセスグループもしくはプロセスにシグナルを 送るのに使われる。"
1371
1372 #. type: Plain text
1373 #: build/C/man2/kill.2:73
1374 msgid "If I<pid> is positive, then signal I<sig> is sent to the process with the ID specified by I<pid>."
1375 msgstr "I<pid> に正の値を指定した場合、シグナル I<sig> が I<pid> で指定された ID を持つプロセスに送られる。"
1376
1377 #. type: Plain text
1378 #: build/C/man2/kill.2:76
1379 msgid "If I<pid> equals 0, then I<sig> is sent to every process in the process group of the calling process."
1380 msgstr "I<pid> に 0 を指定した場合、 呼び出し元のプロセスのプロセスグループに属するすべてのプロセスに I<sig> で指定したシグナルが送られる。"
1381
1382 #. type: Plain text
1383 #: build/C/man2/kill.2:80
1384 msgid "If I<pid> equals -1, then I<sig> is sent to every process for which the calling process has permission to send signals, except for process 1 (I<init>), but see below."
1385 msgstr "I<pid> に -1 を指定した場合、 I<sig> で指定したシグナルが、 呼び出し元のプロセスがシグナルを送る許可を持つ全てのプロセスに 送られる。但し、プロセス番号 1 (I<init>) へはシグナルは送られない。 以下の関連部分も参照のこと。"
1386
1387 #. type: Plain text
1388 #: build/C/man2/kill.2:83
1389 msgid "If I<pid> is less than -1, then I<sig> is sent to every process in the process group whose ID is I<-pid>."
1390 msgstr "I<pid> に -1 より小さな値を指定した場合、 ID が I<-pid> のプロセスグループに属するすべてのプロセスに I<sig> で指定したシグナルが送られる。"
1391
1392 #. type: Plain text
1393 #: build/C/man2/kill.2:88
1394 msgid "If I<sig> is 0, then no signal is sent, but error checking is still performed; this can be used to check for the existence of a process ID or process group ID."
1395 msgstr "I<sig> に 0 を指定した場合、シグナルは送られないが、 エラーのチェックは行われる。これを使って、プロセス ID や プロセスグループ ID の存在確認を行うことができる。"
1396
1397 #. type: Plain text
1398 #: build/C/man2/kill.2:100
1399 msgid "For a process to have permission to send a signal it must either be privileged (under Linux: have the B<CAP_KILL> capability), or the real or effective user ID of the sending process must equal the real or saved set-user-ID of the target process.  In the case of B<SIGCONT> it suffices when the sending and receiving processes belong to the same session.  (Historically, the rules were different; see NOTES.)"
1400 msgstr "プロセスがシグナルを送信する許可を持つためには、 プロセスが特権 (Linux では B<CAP_KILL> ケーパビリティ (capability)) を持つか、 送信元プロセスの実ユーザー ID または実効ユーザー ID が 送信先プロセスの実 set-user-ID または保存 set-user-ID と 等しくなければならない。 B<SIGCONT> の場合、送信プロセスと受信プロセスが 同じセッションに属していれば十分である。 (過去には、 ルールは違っていた; 「注意」の節を参照。)"
1401
1402 #. type: Plain text
1403 #: build/C/man2/kill.2:105
1404 msgid "On success (at least one signal was sent), zero is returned.  On error, -1 is returned, and I<errno> is set appropriately."
1405 msgstr "成功した場合 (少なくとも一つのシグナルが送信された場合)、 0 が返される。エラーの場合 -1 が返され、 I<errno> が適切に設定される。"
1406
1407 #. type: Plain text
1408 #: build/C/man2/kill.2:109
1409 msgid "An invalid signal was specified."
1410 msgstr "無効なシグナルを指定した。"
1411
1412 #. type: TP
1413 #: build/C/man2/kill.2:109 build/C/man2/killpg.2:99 build/C/man2/prctl.2:1090
1414 #: build/C/man2/prctl.2:1102 build/C/man2/prctl.2:1112
1415 #: build/C/man2/prctl.2:1120 build/C/man2/rt_sigqueueinfo.2:148
1416 #: build/C/man2/sigaltstack.2:153 build/C/man3/sigqueue.3:102
1417 #: build/C/man2/tkill.2:96
1418 #, no-wrap
1419 msgid "B<EPERM>"
1420 msgstr "B<EPERM>"
1421
1422 #. type: Plain text
1423 #: build/C/man2/kill.2:113 build/C/man2/killpg.2:103
1424 msgid "The process does not have permission to send the signal to any of the target processes."
1425 msgstr "プロセスが、受信するプロセスのいずれに対しても シグナルを送る許可を持っていない。"
1426
1427 #. type: TP
1428 #: build/C/man2/kill.2:113 build/C/man2/killpg.2:103 build/C/man2/killpg.2:107
1429 #: build/C/man2/rt_sigqueueinfo.2:156 build/C/man3/sigqueue.3:108
1430 #: build/C/man2/tkill.2:101
1431 #, no-wrap
1432 msgid "B<ESRCH>"
1433 msgstr "B<ESRCH>"
1434
1435 #. type: Plain text
1436 #: build/C/man2/kill.2:121
1437 msgid "The pid or process group does not exist.  Note that an existing process might be a zombie, a process which already committed termination, but has not yet been B<wait>(2)ed for."
1438 msgstr "指定したプロセスまたはプロセスグループが存在しなかった。 ゾンビプロセスは存在するプロセスとしてみなされる。 ゾンビプロセスとはすでに処理は終了しているが、親プロセスによる B<wait>()  処理が行われていないプロセスのことである。"
1439
1440 #. type: Plain text
1441 #: build/C/man2/kill.2:123 build/C/man2/pause.2:59 build/C/man2/wait.2:425
1442 msgid "SVr4, 4.3BSD, POSIX.1-2001."
1443 msgstr "SVr4, 4.3BSD, POSIX.1-2001."
1444
1445 #. type: Plain text
1446 #: build/C/man2/kill.2:131
1447 msgid "The only signals that can be sent to process ID 1, the I<init> process, are those for which I<init> has explicitly installed signal handlers.  This is done to assure the system is not brought down accidentally."
1448 msgstr "プロセス番号 1 の I<init> プロセスに送ることができるシグナルは、 I<init> が明示的にシグナルハンドラーを設定したシグナルだけである。 こうなっているのは、誤ってシステムをダウンさせないようにするためである。"
1449
1450 #. type: Plain text
1451 #: build/C/man2/kill.2:137
1452 msgid "POSIX.1-2001 requires that I<kill(-1,sig)> send I<sig> to all processes that the calling process may send signals to, except possibly for some implementation-defined system processes.  Linux allows a process to signal itself, but on Linux the call I<kill(-1,sig)> does not signal the calling process."
1453 msgstr "POSIX.1-2001 では、 I<kill(-1,sig)> が 呼び出し元のプロセスがシグナルを送ることが出来るプロセス全てに I<sig> を送ることを要求している。 但し、システム実装時に定められたシステムプロセスは シグナルの送信対象から除外される。 Linux では、プロセスが自分自身にシグナルを送れるようになっているが、 Linux の I<kill(-1,sig)> は呼び出し元のプロセスにはシグナルを送らない。"
1454
1455 #. type: Plain text
1456 #: build/C/man2/kill.2:147
1457 msgid "POSIX.1-2001 requires that if a process sends a signal to itself, and the sending thread does not have the signal blocked, and no other thread has it unblocked or is waiting for it in B<sigwait>(3), at least one unblocked signal must be delivered to the sending thread before the B<kill>()  returns."
1458 msgstr "POSIX.1-2001 では以下の動作になることを要求している。 自分自身にシグナルを送ると、シグナルを送ったスレッドがそのシグナルをブロック しておらず、他のどのスレッドもそのシグナルを受ける状態にもなく B<sigwait>(3)  でそのシグナルを待ってもいない場合、 B<kill>()  が返る前に少なくとも一つのブロックされていない シグナルがシグナルを送ったスレッドに配送されなければならない。"
1459
1460 #. type: SS
1461 #: build/C/man2/kill.2:147 build/C/man3/sigpause.3:82 build/C/man2/wait.2:480
1462 #, no-wrap
1463 msgid "Linux notes"
1464 msgstr "Linux での注意"
1465
1466 #.  In the 0.* kernels things chopped and changed quite
1467 #.  a bit - MTK, 24 Jul 02
1468 #. type: Plain text
1469 #: build/C/man2/kill.2:161
1470 msgid "Across different kernel versions, Linux has enforced different rules for the permissions required for an unprivileged process to send a signal to another process.  In kernels 1.0 to 1.2.2, a signal could be sent if the effective user ID of the sender matched effective user ID of the target, or the real user ID of the sender matched the real user ID of the target.  From kernel 1.2.3 until 1.3.77, a signal could be sent if the effective user ID of the sender matched either the real or effective user ID of the target.  The current rules, which conform to POSIX.1-2001, were adopted in kernel 1.3.78."
1471 msgstr "Linux では、特権のないプロセスが他のプロセスにシグナルを送信するために必要な権限についてのルールが、カーネルバージョンにより違っている。 カーネル 1.0 から 1.2.2 では、送信側の実効ユーザー ID が送信対象の実効ユーザー ID と一致するか、 送信側の実ユーザー ID が送信対象の実ユーザー ID と一致すれば、 シグナルを送信できた。 カーネル 1.2.3 から 1.3.77では、送信側の実効ユーザー ID が送信対象の実ユーザー ID か実効ユーザー ID のいずれかと一致すればシグナルを送信できた。 現在のルールは、POSIX.1-2001 に準拠しており、カーネル 1.3.78 以降で 適用されている。"
1472
1473 #. type: Plain text
1474 #: build/C/man2/kill.2:171
1475 msgid "In 2.6 kernels up to and including 2.6.7, there was a bug that meant that when sending signals to a process group, B<kill>()  failed with the error B<EPERM> if the caller did not have permission to send the signal to I<any> (rather than I<all>) of the members of the process group.  Notwithstanding this error return, the signal was still delivered to all of the processes for which the caller had permission to signal."
1476 msgstr "バージョン 2.6.7 以前の 2.6 系のカーネルには、 プロセスグループにシグナルを送ったときに、 呼び出し元のプロセスがプロセスグループの (全メンバーではなく) 一部のメンバーに対してのみシグナルを送る許可を持っていない場合に、 B<kill>()  がエラー B<EPERM> で失敗するというバグがある。 このエラーが返るにもかかわらず、そのシグナルは呼び出し元が シグナルを送る許可を持つ全てのプロセスへ送られる。"
1477
1478 #. type: Plain text
1479 #: build/C/man2/kill.2:181
1480 msgid "B<_exit>(2), B<killpg>(2), B<signal>(2), B<tkill>(2), B<exit>(3), B<sigqueue>(3), B<capabilities>(7), B<credentials>(7), B<signal>(7)"
1481 msgstr "B<_exit>(2), B<killpg>(2), B<signal>(2), B<tkill>(2), B<exit>(3), B<sigqueue>(3), B<credentials>(7), B<capabilities>(7), B<signal>(7)"
1482
1483 #. type: TH
1484 #: build/C/man2/killpg.2:42
1485 #, no-wrap
1486 msgid "KILLPG"
1487 msgstr "KILLPG"
1488
1489 #. type: TH
1490 #: build/C/man2/killpg.2:42 build/C/man3/sigset.3:26
1491 #, no-wrap
1492 msgid "2010-09-20"
1493 msgstr "2010-09-20"
1494
1495 #. type: Plain text
1496 #: build/C/man2/killpg.2:45
1497 msgid "killpg - send signal to a process group"
1498 msgstr "killpg - シグナルをプロセスグループに送る"
1499
1500 #. type: Plain text
1501 #: build/C/man2/killpg.2:49
1502 msgid "B<int killpg(int >I<pgrp>B<, int >I<sig>B<);>"
1503 msgstr "B<int killpg(int >I<pgrp>B<, int >I<sig>B<);>"
1504
1505 #. type: TP
1506 #: build/C/man2/killpg.2:55
1507 #, no-wrap
1508 msgid "B<killpg>():"
1509 msgstr "B<killpg>():"
1510
1511 #. type: Plain text
1512 #: build/C/man2/killpg.2:59 build/C/man2/sigaltstack.2:46
1513 #: build/C/man3/siginterrupt.3:51 build/C/man2/wait4.2:60
1514 msgid "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
1515 msgstr "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
1516
1517 #. type: Plain text
1518 #: build/C/man2/killpg.2:69
1519 msgid "B<killpg>()  sends the signal I<sig> to the process group I<pgrp>.  See B<signal>(7)  for a list of signals."
1520 msgstr "B<killpg>()  は I<sig> で指定したシグナルを I<pgrp> で指定したプロセスグループに送る。 シグナルの定義の一覧は B<signal>(7)  を参照のこと。"
1521
1522 #. type: Plain text
1523 #: build/C/man2/killpg.2:78
1524 msgid "If I<pgrp> is 0, B<killpg>()  sends the signal to the calling process's process group.  (POSIX says: If I<pgrp> is less than or equal to 1, the behavior is undefined.)"
1525 msgstr "引き数 I<pgrp> に 0 を指定した場合には B<killpg>()  は呼び出し元のプロセスが属しているプロセスグループに対してシグナルを送る。 (POSIX では以下のように記述されている: I<pgrp> が 1 以下である場合、動作は未定義である。)"
1526
1527 #. type: Plain text
1528 #: build/C/man2/killpg.2:89
1529 msgid "For a process to have permission to send a signal it must either be privileged (under Linux: have the B<CAP_KILL> capability), or the real or effective user ID of the sending process must equal the real or saved set-user-ID of the target process.  In the case of B<SIGCONT> it suffices when the sending and receiving processes belong to the same session."
1530 msgstr "プロセスがシグナルを送信する許可を持つためには、 プロセスが特権 (Linux では B<CAP_KILL> ケーパビリティ (capability)) を持つか、 送信元プロセスの実ユーザー ID または実効ユーザー ID が 送信先プロセスの実 set-user-ID または保存 set-user-ID と 等しくなければならない。 B<SIGCONT> の場合、送信プロセスと受信プロセスが 同じセッションに属していれば十分である。"
1531
1532 #. type: Plain text
1533 #: build/C/man2/killpg.2:99
1534 msgid "I<sig> is not a valid signal number."
1535 msgstr "I<sig> で指定された値は無効なシグナル番号である。"
1536
1537 #. type: Plain text
1538 #: build/C/man2/killpg.2:107
1539 msgid "No process can be found in the process group specified by I<pgrp>."
1540 msgstr "I<pgrp> で指定されたプロセスグループに属するプロセスが存在しなかった。"
1541
1542 #. type: Plain text
1543 #: build/C/man2/killpg.2:111
1544 msgid "The process group was given as 0 but the sending process does not have a process group."
1545 msgstr "プロセスグループとして 0 が指定されたが、送信プロセスは プロセスグループを持っていない。"
1546
1547 #. type: Plain text
1548 #: build/C/man2/killpg.2:115
1549 msgid "SVr4, 4.4BSD (the B<killpg>()  function call first appeared in 4BSD), POSIX.1-2001."
1550 msgstr "SVr4, 4.4BSD (B<killpg>()  は 4BSD で初めて追加された), POSIX.1-2001。"
1551
1552 #. type: Plain text
1553 #: build/C/man2/killpg.2:129
1554 msgid "There are various differences between the permission checking in BSD-type systems and System\\ V-type systems.  See the POSIX rationale for B<kill>().  A difference not mentioned by POSIX concerns the return value B<EPERM>: BSD documents that no signal is sent and B<EPERM> returned when the permission check failed for at least one target process, while POSIX documents B<EPERM> only when the permission check failed for all target processes."
1555 msgstr "BSD 系システムと System\\ V 系システムでは、 許可のチェックに様々な違いがある。 B<kill>(2)  についての POSIX の原理 (rationale) を参照すること。 POSIX で記述されていない違いとしては、返り値 B<EPERM> がある。 BSD では「送信先プロセスの許可のチェックが 1 つでも失敗した場合は、 シグナルが送信されず、 B<EPERM> が返される」と記述されている。 POSIX では「送信先プロセスの許可のチェックが全て失敗した場合にのみ、 B<EPERM> が返される」と記述されている。"
1556
1557 #. type: Plain text
1558 #: build/C/man2/killpg.2:134
1559 msgid "On Linux, B<killpg>()  is implemented as a library function that makes the call I<kill(-pgrp,\\ sig)>."
1560 msgstr "Linux では、 B<killpg>()  はライブラリ関数として実装されており、 I<kill(-pgrp,\\ sig)> の呼び出しが行われる。"
1561
1562 #. type: Plain text
1563 #: build/C/man2/killpg.2:140
1564 msgid "B<getpgrp>(2), B<kill>(2), B<signal>(2), B<capabilities>(7), B<credentials>(7)"
1565 msgstr "B<getpgrp>(2), B<kill>(2), B<signal>(2), B<credentials>(7), B<capabilities>(7)"
1566
1567 #. type: TH
1568 #: build/C/man2/pause.2:30
1569 #, no-wrap
1570 msgid "PAUSE"
1571 msgstr "PAUSE"
1572
1573 #. type: TH
1574 #: build/C/man2/pause.2:30
1575 #, no-wrap
1576 msgid "2008-10-06"
1577 msgstr "2008-10-06"
1578
1579 #. type: Plain text
1580 #: build/C/man2/pause.2:33
1581 msgid "pause - wait for signal"
1582 msgstr "pause - シグナルを待つ"
1583
1584 #. type: Plain text
1585 #: build/C/man2/pause.2:35
1586 msgid "B<#include E<lt>unistd.hE<gt>>"
1587 msgstr "B<#include E<lt>unistd.hE<gt>>"
1588
1589 #. type: Plain text
1590 #: build/C/man2/pause.2:37
1591 msgid "B<int pause(void);>"
1592 msgstr "B<int pause(void);>"
1593
1594 #. type: Plain text
1595 #: build/C/man2/pause.2:42
1596 msgid "B<pause>()  causes the calling process (or thread) to sleep until a signal is delivered that either terminates the process or causes the invocation of a signal-catching function."
1597 msgstr "B<pause>()  は、呼び出したプロセス (またはスレッド) を、 そのプロセスを終了させたり、シグナル捕捉関数が起動されるような シグナルが配送されるまで、スリープさせる。"
1598
1599 #.  .BR ERESTARTNOHAND .
1600 #. type: Plain text
1601 #: build/C/man2/pause.2:53
1602 msgid "B<pause>()  returns only when a signal was caught and the signal-catching function returned.  In this case, B<pause>()  returns -1, and I<errno> is set to B<EINTR>."
1603 msgstr "B<pause>()  が返るのは、シグナルを受け取りシグナル捕獲関数から返った場合だけである。 この場合は B<pause>()  は -1 を返し、 I<errno> に B<EINTR> が設定される。"
1604
1605 #. type: TP
1606 #: build/C/man2/pause.2:54 build/C/man2/sigsuspend.2:81
1607 #: build/C/man2/sigwaitinfo.2:123 build/C/man2/wait.2:411
1608 #, no-wrap
1609 msgid "B<EINTR>"
1610 msgstr "B<EINTR>"
1611
1612 #. type: Plain text
1613 #: build/C/man2/pause.2:57
1614 msgid "a signal was caught and the signal-catching function returned."
1615 msgstr "シグナルを受け取り、シグナル捕獲関数から帰ってきた。"
1616
1617 #. type: Plain text
1618 #: build/C/man2/pause.2:64
1619 msgid "B<kill>(2), B<select>(2), B<signal>(2), B<sigsuspend>(2)"
1620 msgstr "B<kill>(2), B<select>(2), B<signal>(2), B<sigsuspend>(2)"
1621
1622 #. type: TH
1623 #: build/C/man2/prctl.2:54
1624 #, no-wrap
1625 msgid "PRCTL"
1626 msgstr "PRCTL"
1627
1628 #. type: TH
1629 #: build/C/man2/prctl.2:54 build/C/man2/restart_syscall.2:33
1630 #: build/C/man2/sgetmask.2:26 build/C/man7/signal.7:46
1631 #: build/C/man2/sigreturn.2:30 build/C/man3/sigvec.3:26
1632 #: build/C/man2/tkill.2:29
1633 #, no-wrap
1634 msgid "2014-12-31"
1635 msgstr "2014-12-31"
1636
1637 #. type: Plain text
1638 #: build/C/man2/prctl.2:57
1639 msgid "prctl - operations on a process"
1640 msgstr "prctl - プロセスの操作を行なう"
1641
1642 #. type: Plain text
1643 #: build/C/man2/prctl.2:60
1644 #, no-wrap
1645 msgid "B<#include E<lt>sys/prctl.hE<gt>>\n"
1646 msgstr "B<#include E<lt>sys/prctl.hE<gt>>\n"
1647
1648 #. type: Plain text
1649 #: build/C/man2/prctl.2:63
1650 #, no-wrap
1651 msgid ""
1652 "B<int prctl(int >I<option>B<, unsigned long >I<arg2>B<, unsigned long >I<arg3>B<,>\n"
1653 "B<          unsigned long >I<arg4>B<, unsigned long >I<arg5>B<);>\n"
1654 msgstr ""
1655 "B<int prctl(int >I<option>B<, unsigned long >I<arg2>B<, unsigned long >I<arg3>B<,>\n"
1656 "B<          unsigned long >I<arg4>B<, unsigned long >I<arg5>B<);>\n"
1657
1658 #. type: Plain text
1659 #: build/C/man2/prctl.2:70
1660 msgid "B<prctl>()  is called with a first argument describing what to do (with values defined in I<E<lt>linux/prctl.hE<gt>>), and further arguments with a significance depending on the first one.  The first argument can be:"
1661 msgstr "B<prctl>()  の動作は最初の引き数によって決定される (この値は I<E<lt>linux/prctl.hE<gt>> に定義されている)。 残りの引き数は最初の引き数によって変化する。 一番目の引き数として以下のものを指定できる:"
1662
1663 #. type: TP
1664 #: build/C/man2/prctl.2:70
1665 #, no-wrap
1666 msgid "B<PR_CAPBSET_READ> (since Linux 2.6.25)"
1667 msgstr "B<PR_CAPBSET_READ> (Linux 2.6.25 以降)"
1668
1669 #. type: Plain text
1670 #: build/C/man2/prctl.2:82
1671 msgid "Return (as the function result) 1 if the capability specified in I<arg2> is in the calling thread's capability bounding set, or 0 if it is not.  (The capability constants are defined in I<E<lt>linux/capability.hE<gt>>.)  The capability bounding set dictates whether the process can receive the capability through a file's permitted capability set on a subsequent call to B<execve>(2)."
1672 msgstr "で指定されたケーパビリティが呼び出したスレッドのケーパビリティ バインディングセット (capability bounding set) に含まれている場合、 (関数の結果として) 1 を返し、そうでない場合 0 を返す (ケーパビリティ定数は I<E<lt>linux/capability.hE<gt>> で定義されている)。 ケーパビリティバウンディングセットは、 B<execve>(2)  を呼び出した際に、ファイルの許可 (permitted) ケーパビリティの中で そのプロセスが獲得できるケーパビリティを指示するものである。"
1673
1674 #. type: Plain text
1675 #: build/C/man2/prctl.2:87
1676 msgid "If the capability specified in I<arg2> is not valid, then the call fails with the error B<EINVAL>."
1677 msgstr "I<arg2> に指定されたケーパビリティが有効でない場合、 呼び出しはエラー B<EINVAL> で失敗する。"
1678
1679 #. type: TP
1680 #: build/C/man2/prctl.2:87
1681 #, no-wrap
1682 msgid "B<PR_CAPBSET_DROP> (since Linux 2.6.25)"
1683 msgstr "B<PR_CAPBSET_DROP> (Linux 2.6.25 以降)"
1684
1685 #. type: Plain text
1686 #: build/C/man2/prctl.2:96
1687 msgid "If the calling thread has the B<CAP_SETPCAP> capability, then drop the capability specified by I<arg2> from the calling thread's capability bounding set.  Any children of the calling thread will inherit the newly reduced bounding set."
1688 msgstr "呼び出したスレッドがケーパビリティ B<CAP_SETPCAP> を持っている場合、 呼び出したスレッドのケーパビリティバウンディングセットから I<arg2> で指定されたケーパビリティを外す。 呼び出したスレッドの子プロセスは変更後のバウンディングセットを 継承する。"
1689
1690 #. type: Plain text
1691 #: build/C/man2/prctl.2:108
1692 msgid "The call fails with the error: B<EPERM> if the calling thread does not have the B<CAP_SETPCAP>; B<EINVAL> if I<arg2> does not represent a valid capability; or B<EINVAL> if file capabilities are not enabled in the kernel, in which case bounding sets are not supported."
1693 msgstr "呼び出したスレッドが B<CAP_SETPCAP> を持っていない場合、呼び出しはエラー B<EPERM> で失敗する。 I<arg2> に指定されたケーパビリティが有効でない場合、 B<EINVAL> で失敗する。 ファイルケーパビリティがカーネルで有効になっていない場合 (この場合にはバウンディングセットがサポートされない)、 B<EINVAL> で失敗する。"
1694
1695 #. type: TP
1696 #: build/C/man2/prctl.2:108
1697 #, no-wrap
1698 msgid "B<PR_SET_CHILD_SUBREAPER> (since Linux 3.4)"
1699 msgstr "B<PR_SET_CHILD_SUBREAPER> (Linux 3.4 以降)"
1700
1701 #.  commit ebec18a6d3aa1e7d84aab16225e87fd25170ec2b
1702 #. type: Plain text
1703 #: build/C/man2/prctl.2:133
1704 msgid "If I<arg2> is nonzero, set the \"child subreaper\" attribute of the calling process; if I<arg2> is zero, unset the attribute.  When a process is marked as a child subreaper, all of the children that it creates, and their descendants, will be marked as having a subreaper.  In effect, a subreaper fulfills the role of B<init>(1)  for its descendant processes.  Upon termination of a process that is orphaned (i.e., its immediate parent has already terminated)  and marked as having a subreaper, the nearest still living ancestor subreaper will receive a B<SIGCHLD> signal and be able to B<wait>(2)  on the process to discover its termination status."
1705 msgstr ""
1706
1707 #. type: TP
1708 #: build/C/man2/prctl.2:133
1709 #, no-wrap
1710 msgid "B<PR_GET_CHILD_SUBREAPER> (since Linux 3.4)"
1711 msgstr "B<PR_GET_CHILD_SUBREAPER> (Linux 3.4 以降)"
1712
1713 #. type: Plain text
1714 #: build/C/man2/prctl.2:138
1715 msgid "Return the \"child subreaper\" setting of the caller, in the location pointed to by I<(int\\ *) arg2>."
1716 msgstr ""
1717
1718 #. type: TP
1719 #: build/C/man2/prctl.2:138
1720 #, no-wrap
1721 msgid "B<PR_SET_DUMPABLE> (since Linux 2.3.20)"
1722 msgstr "B<PR_SET_DUMPABLE> (Linux 2.3.20 以降)"
1723
1724 #.  See http://marc.theaimsgroup.com/?l=linux-kernel&m=115270289030630&w=2
1725 #.  Subject:    Fix prctl privilege escalation (CVE-2006-2451)
1726 #.  From:       Marcel Holtmann <marcel () holtmann ! org>
1727 #.  Date:       2006-07-12 11:12:00
1728 #. type: Plain text
1729 #: build/C/man2/prctl.2:164
1730 msgid "Set the state of the flag determining whether core dumps are produced for the calling process upon delivery of a signal whose default behavior is to produce a core dump.  (Normally, this flag is set for a process by default, but it is cleared when a set-user-ID or set-group-ID program is executed and also by various system calls that manipulate process UIDs and GIDs).  In kernels up to and including 2.6.12, I<arg2> must be either 0 (process is not dumpable) or 1 (process is dumpable).  Between kernels 2.6.13 and 2.6.17, the value 2 was also permitted, which caused any binary which normally would not be dumped to be dumped readable by root only; for security reasons, this feature has been removed.  (See also the description of I</proc/sys/fs/suid_dumpable> in B<proc>(5).)  Processes that are not dumpable can not be attached via B<ptrace>(2)  B<PTRACE_ATTACH>."
1731 msgstr "(Linux 2.3.20 以降) デフォルトの振る舞いではコアダンプを引き起こすようなシグナルを受信したときに、呼び出し元のプロセスでコアダンプを生成するかどうかを決定するフラグを設定する (通常このフラグは、デフォルトではセットされているが、 set-user-ID あるいは set-group-ID プログラムが実行されたり、 さまざまなシステムコールによってプロセスの UID や GID が操作されたときに クリアされる)。 2.6.12 以前のカーネルでは、 I<arg2> は 0 (プロセスはダンプ不可) あるいは 1 (プロセスはダンプ可能) の どちらかでなければならない。 2.6.13 から 2.6.17 までのカーネルでは、値 2 も認められていた。 この値を指定すると、通常はダンプされないバイナリが root だけが 読み込み可能な形でダンプされた。 セキュリティ上の理由から、この機能は削除された (B<proc>(5) の I</proc/sys/fs/suid_dumpable> の説明も参照)。 ダンプ不可のプロセスを B<ptrace>(2) B<PTRACE_ATTACH> 経由で接続することはできない。"
1732
1733 #. type: TP
1734 #: build/C/man2/prctl.2:164
1735 #, no-wrap
1736 msgid "B<PR_GET_DUMPABLE> (since Linux 2.3.20)"
1737 msgstr "B<PR_GET_DUMPABLE> (Linux 2.3.20 以降)"
1738
1739 #.  Since Linux 2.6.13, the dumpable flag can have the value 2,
1740 #.  but in 2.6.13 PR_GET_DUMPABLE simply returns 1 if the dumpable
1741 #.  flags has a nonzero value.  This was fixed in 2.6.14.
1742 #. type: Plain text
1743 #: build/C/man2/prctl.2:171
1744 msgid "Return (as the function result) the current state of the calling process's dumpable flag."
1745 msgstr "(Linux 2.3.20 以降)  呼び出し元プロセスにおけるダンプ可能フラグの 現在の状態を (関数の結果として) 返す。"
1746
1747 #. type: TP
1748 #: build/C/man2/prctl.2:171
1749 #, no-wrap
1750 msgid "B<PR_SET_ENDIAN> (since Linux 2.6.18, PowerPC only)"
1751 msgstr "B<PR_SET_ENDIAN> (Linux 2.6.18 以降、PowerPC のみ)"
1752
1753 #.  Respectively 0, 1, 2
1754 #. type: Plain text
1755 #: build/C/man2/prctl.2:181
1756 msgid "Set the endian-ness of the calling process to the value given in I<arg2>, which should be one of the following: B<PR_ENDIAN_BIG>, B<PR_ENDIAN_LITTLE>, or B<PR_ENDIAN_PPC_LITTLE> (PowerPC pseudo little endian)."
1757 msgstr "呼び出し元プロセスのエンディアン設定 (endian-ness) を I<arg2> で指定された値に設定する。 指定できる値は B<PR_ENDIAN_BIG>, B<PR_ENDIAN_LITTLE>, B<PR_ENDIAN_PPC_LITTLE> (PowerPC 擬似リトルエンディアン)  のいずれか一つである。"
1758
1759 #. type: TP
1760 #: build/C/man2/prctl.2:181
1761 #, no-wrap
1762 msgid "B<PR_GET_ENDIAN> (since Linux 2.6.18, PowerPC only)"
1763 msgstr "B<PR_GET_ENDIAN> (Linux 2.6.18 以降、PowerPC のみ)"
1764
1765 #. type: Plain text
1766 #: build/C/man2/prctl.2:186
1767 msgid "Return the endian-ness of the calling process, in the location pointed to by I<(int\\ *) arg2>."
1768 msgstr "呼び出し元プロセスのエンディアン設定 (endian-ness) を I<(int\\ *) arg2> が指す場所に格納して返す。"
1769
1770 #. type: TP
1771 #: build/C/man2/prctl.2:186
1772 #, no-wrap
1773 msgid "B<PR_SET_FPEMU> (since Linux 2.4.18, 2.5.9, only on ia64)"
1774 msgstr "B<PR_SET_FPEMU> (Linux 2.4.18 以降, 2.5.9, ia64 のみ)"
1775
1776 #. type: Plain text
1777 #: build/C/man2/prctl.2:193
1778 msgid "Set floating-point emulation control bits to I<arg2>.  Pass B<PR_FPEMU_NOPRINT> to silently emulate fp operations accesses, or B<PR_FPEMU_SIGFPE> to not emulate fp operations and send B<SIGFPE> instead."
1779 msgstr "浮動小数点エミュレーション (floating-point emulation) 制御ビットを I<arg2> で指定された値に設定する。 指定できる値は B<PR_FPEMU_NOPRINT> (浮動小数点命令アクセスを黙って エミュレートする) か B<PR_FPEMU_SIGFPE> (浮動小数点命令をエミュレートせず、 代わりに B<SIGFPE> を送る) である。"
1780
1781 #. type: TP
1782 #: build/C/man2/prctl.2:193
1783 #, no-wrap
1784 msgid "B<PR_GET_FPEMU> (since Linux 2.4.18, 2.5.9, only on ia64)"
1785 msgstr "B<PR_GET_FPEMU> (Linux 2.4.18 以降, 2.5.9, ia64 のみ)"
1786
1787 #. type: Plain text
1788 #: build/C/man2/prctl.2:198
1789 msgid "Return floating-point emulation control bits, in the location pointed to by I<(int\\ *) arg2>."
1790 msgstr "浮動小数点エミュレーション制御ビットの値を I<(int\\ *) arg2> が指す場所に格納して返す。"
1791
1792 #. type: TP
1793 #: build/C/man2/prctl.2:198
1794 #, no-wrap
1795 msgid "B<PR_SET_FPEXC> (since Linux 2.4.21, 2.5.32, only on PowerPC)"
1796 msgstr "B<PR_SET_FPEXC> (Linux 2.4.21 および 2.5.32 以降、PowerPC のみ)"
1797
1798 #. type: Plain text
1799 #: build/C/man2/prctl.2:211
1800 msgid "Set floating-point exception mode to I<arg2>.  Pass B<PR_FP_EXC_SW_ENABLE> to use FPEXC for FP exception enables, B<PR_FP_EXC_DIV> for floating-point divide by zero, B<PR_FP_EXC_OVF> for floating-point overflow, B<PR_FP_EXC_UND> for floating-point underflow, B<PR_FP_EXC_RES> for floating-point inexact result, B<PR_FP_EXC_INV> for floating-point invalid operation, B<PR_FP_EXC_DISABLED> for FP exceptions disabled, B<PR_FP_EXC_NONRECOV> for async nonrecoverable exception mode, B<PR_FP_EXC_ASYNC> for async recoverable exception mode, B<PR_FP_EXC_PRECISE> for precise exception mode."
1801 msgstr "浮動小数点例外モード (floating-point exception mode) を I<arg2> で指定された値に設定する。 指定できるのは以下の値である: B<PR_FP_EXC_SW_ENABLE> (FPEXC で浮動小数点例外を有効にする)、 B<PR_FP_EXC_DIV> (0 除算)、 B<PR_FP_EXC_OVF> (オーバーフロー)、 B<PR_FP_EXC_UND> (アンダーフロー)、 B<PR_FP_EXC_RES> (不正確な結果 (inexact result))、 B<PR_FP_EXC_INV> (不正な命令 (invalid operation))、 B<PR_FP_EXC_DISABLED> (浮動小数点例外を無効にする)、 B<PR_FP_EXC_NONRECOV> (async nonrecoverable exception mode)、 B<PR_FP_EXC_ASYNC> (async recoverable exception mode)、 B<PR_FP_EXC_PRECISE> (precise exception mode)。"
1802
1803 #. type: TP
1804 #: build/C/man2/prctl.2:211
1805 #, no-wrap
1806 msgid "B<PR_GET_FPEXC> (since Linux 2.4.21, 2.5.32, only on PowerPC)"
1807 msgstr "B<PR_GET_FPEXC>(Linux 2.4.21 および 2.5.32 以降、PowerPC のみ)"
1808
1809 #. type: Plain text
1810 #: build/C/man2/prctl.2:216
1811 msgid "Return floating-point exception mode, in the location pointed to by I<(int\\ *) arg2>."
1812 msgstr "浮動小数点例外モードの値を I<(int\\ *) arg2> が指す場所に格納して返す。"
1813
1814 #. type: TP
1815 #: build/C/man2/prctl.2:216
1816 #, no-wrap
1817 msgid "B<PR_SET_KEEPCAPS> (since Linux 2.2.18)"
1818 msgstr "B<PR_SET_KEEPCAPS> (Linux 2.2.18 以降)"
1819
1820 #. type: Plain text
1821 #: build/C/man2/prctl.2:234
1822 msgid "Set the state of the thread's \"keep capabilities\" flag, which determines whether the threads's permitted capability set is cleared when a change is made to the threads's user IDs such that the threads's real UID, effective UID, and saved set-user-ID all become nonzero when at least one of them previously had the value 0.  By default, the permitted capability set is cleared when such a change is made; setting the \"keep capabilities\" flag prevents it from being cleared.  I<arg2> must be either 0 (permitted capabilities are cleared)  or 1 (permitted capabilities are kept).  (A thread's I<effective> capability set is always cleared when such a credential change is made, regardless of the setting of the \"keep capabilities\" flag.)  The \"keep capabilities\" value will be reset to 0 on subsequent calls to B<execve>(2)."
1823 msgstr "スレッドの「ケーパビリティ保持」フラグを設定する。 このフラグは、スレッドの実 UID、実効 UID、保存 set-user-ID のうち少なくとも一つが 0 であった状態から、これら全てが 0 以外に変更されたとき、 スレッドの許可ケーパビリティ集合がクリアされるかどうかを決定する。 デフォルトでは、このような変更が行われた場合、許可ケーパビリティセットはクリアされる。「ケーパビリティ保持」フラグを設定すると、許可ケーパビリティセットはクリアされなくなる。 I<arg2> は 0 (許可ケーパビリティをクリアする) か 1 (許可ケーパビリティを保持する) の どちらかでなければならない。 (このような ID の変更が行われた場合、「ケーパビリティ保持」フラグの設定に関わらず、スレッドのI<実効>ケーパビリティセットは常にクリアされる。) B<execve>(2) が呼び出されると、「ケーパビリティ保持」フラグは 0 にリセットされる。"
1824
1825 #. type: TP
1826 #: build/C/man2/prctl.2:234
1827 #, no-wrap
1828 msgid "B<PR_GET_KEEPCAPS> (since Linux 2.2.18)"
1829 msgstr "B<PR_GET_KEEPCAPS> (Linux 2.2.18 以降)"
1830
1831 #. type: Plain text
1832 #: build/C/man2/prctl.2:238
1833 msgid "Return (as the function result) the current state of the calling threads's \"keep capabilities\" flag."
1834 msgstr "呼び出し元スレッドにおける「ケーパビリティ保持」フラグの 現在の状態を (関数の結果として) 返す。"
1835
1836 #. type: TP
1837 #: build/C/man2/prctl.2:238
1838 #, no-wrap
1839 msgid "B<PR_SET_NAME> (since Linux 2.6.9)"
1840 msgstr "B<PR_SET_NAME> (Linux 2.6.9 以降)"
1841
1842 #.  TASK_COMM_LEN in include/linux/sched.h
1843 #. type: Plain text
1844 #: build/C/man2/prctl.2:257
1845 msgid "Set the name of the calling thread, using the value in the location pointed to by I<(char\\ *) arg2>.  The name can be up to 16 bytes long, including the terminating null byte.  (If the length of the string, including the terminating null byte, exceeds 16 bytes, the string is silently truncated.)  This is the same attribute that can be set via B<pthread_setname_np>(3)  and retrieved using B<pthread_getname_np>(3).  The attribute is likewise accessible via I</proc/self/task/[tid]/comm>, where I<tid> is the name of the calling thread."
1846 msgstr "呼び出し元スレッドのプロセス名を I<(char\\ *) arg2> が指す場所に格納された値を使って設定する。 名前は終端の NULL バイトを含めて最大で 16 バイトである (終端の NULL バイトを含めた文字列の長さが 16 バイトを超える場合、 文字列は黙って切り詰められる)。 これは、 B<pthread_setname_np>(3) で設定でき、 B<pthread_getname_np>(3) で取得できるのと同じ属性である。 同様に、 I<tid> が呼び出し元スレッドの ID の場合、 この属性は I</proc/self/task/[tid]/comm> 経由でもアクセス可能である。"
1847
1848 #. type: TP
1849 #: build/C/man2/prctl.2:257
1850 #, no-wrap
1851 msgid "B<PR_GET_NAME> (since Linux 2.6.11)"
1852 msgstr "B<PR_GET_NAME> (Linux 2.6.11 以降)"
1853
1854 #. type: Plain text
1855 #: build/C/man2/prctl.2:264
1856 msgid "Return the name of the calling thread, in the buffer pointed to by I<(char\\ *) arg2>.  The buffer should allow space for up to 16 bytes; the returned string will be null-terminated."
1857 msgstr "呼び出し元スレッドの名前を I<(char\\ *) arg2> が指す場所に格納して返す。 バッファーは最大で 16 バイトを格納できるようにすべきである。 返される文字列はヌル終端される。"
1858
1859 #. type: TP
1860 #: build/C/man2/prctl.2:264
1861 #, no-wrap
1862 msgid "B<PR_SET_NO_NEW_PRIVS> (since Linux 3.5)"
1863 msgstr "B<PR_SET_NO_NEW_PRIVS> (Linux 3.5 以降)"
1864
1865 #. type: Plain text
1866 #: build/C/man2/prctl.2:287
1867 msgid "Set the calling process's I<no_new_privs> bit to the value in I<arg2>.  With I<no_new_privs> set to 1, B<execve>(2)  promises not to grant privileges to do anything that could not have been done without the B<execve>(2)  call (for example, rendering the set-user-ID and set-group-ID permission bits, and file capabilities non-functional).  Once set, this bit cannot be unset.  The setting of this bit is inherited by children created by B<fork>(2)  and B<clone>(2), and preserved across B<execve>(2)."
1868 msgstr ""
1869
1870 #. type: Plain text
1871 #: build/C/man2/prctl.2:290
1872 msgid "For more information, see the kernel source file I<Documentation/prctl/no_new_privs.txt>."
1873 msgstr "詳しい情報は、カーネルソースファイル I<Documentation/prctl/no_new_privs.txt> を参照。"
1874
1875 #. type: TP
1876 #: build/C/man2/prctl.2:290
1877 #, no-wrap
1878 msgid "B<PR_GET_NO_NEW_PRIVS> (since Linux 3.5)"
1879 msgstr "B<PR_GET_NO_NEW_PRIVS> (Linux 3.5 以降)"
1880
1881 #. type: Plain text
1882 #: build/C/man2/prctl.2:301
1883 msgid "Return (as the function result) the value of the I<no_new_privs> bit for the current process.  A value of 0 indicates the regular B<execve>(2)  behavior.  A value of 1 indicates B<execve>(2)  will operate in the privilege-restricting mode described above."
1884 msgstr ""
1885
1886 #. type: TP
1887 #: build/C/man2/prctl.2:301
1888 #, no-wrap
1889 msgid "B<PR_SET_PDEATHSIG> (since Linux 2.1.57)"
1890 msgstr "B<PR_SET_PDEATHSIG> (Linux 2.1.57 以降)"
1891
1892 #. type: Plain text
1893 #: build/C/man2/prctl.2:314
1894 msgid "Set the parent process death signal of the calling process to I<arg2> (either a signal value in the range 1..maxsig, or 0 to clear).  This is the signal that the calling process will get when its parent dies.  This value is cleared for the child of a B<fork>(2)  and (since Linux 2.4.36 / 2.6.23)  when executing a set-user-ID or set-group-ID binary.  This value is preserved across B<execve>(2)."
1895 msgstr "親プロセス死亡シグナル (parent process death signal) を I<arg2> に設定する (設定できるシグナル値の範囲は 1..maxsig であり、0 は通知の解除である)。 呼び出し元プロセスの親プロセスが死んだ際に、ここで設定した値が シグナルとして通知される。この値は B<fork>(2) の子プロセスでは解除される。 (Linux 2.4.36 以降および 2.6.23 以降では) set-user-ID もしくは set-group-ID されたバイナリを実行した場合にも、このフラグは解除される。この値は B<execve>(2) の前後で保持される。"
1896
1897 #. type: TP
1898 #: build/C/man2/prctl.2:314
1899 #, no-wrap
1900 msgid "B<PR_GET_PDEATHSIG> (since Linux 2.3.15)"
1901 msgstr "B<PR_GET_PDEATHSIG> (Linux 2.3.15 以降)"
1902
1903 #. type: Plain text
1904 #: build/C/man2/prctl.2:319
1905 msgid "Return the current value of the parent process death signal, in the location pointed to by I<(int\\ *) arg2>."
1906 msgstr "親プロセス死亡シグナルの現在の値を I<(int\\ *) arg2> が指す場所に格納して返す。"
1907
1908 #. type: TP
1909 #: build/C/man2/prctl.2:319
1910 #, no-wrap
1911 msgid "B<PR_SET_PTRACER> (since Linux 3.4)"
1912 msgstr "B<PR_SET_PTRACER> (Linux 3.4 以降)"
1913
1914 #.  commit 2d514487faf188938a4ee4fb3464eeecfbdcf8eb
1915 #.  commit bf06189e4d14641c0148bea16e9dd24943862215
1916 #. type: Plain text
1917 #: build/C/man2/prctl.2:344
1918 msgid "This is meaningful only when the Yama LSM is enabled and in mode 1 (\"restricted ptrace\", visible via I</proc/sys/kernel/yama/ptrace_scope>).  When a \"ptracer process ID\" is passed in I<arg2>, the caller is declaring that the ptracer process can B<ptrace>(2)  the calling process as if it were a direct process ancestor.  Each B<PR_SET_PTRACER> operation replaces the previous \"ptracer process ID\".  Employing B<PR_SET_PTRACER> with I<arg2> set to 0 clears the caller's \"ptracer process ID\".  If I<arg2> is B<PR_SET_PTRACER_ANY>, the ptrace restrictions introduced by Yama are effectively disabled for the calling process."
1919 msgstr ""
1920
1921 #. type: Plain text
1922 #: build/C/man2/prctl.2:347
1923 msgid "For further information, see the kernel source file I<Documentation/security/Yama.txt>."
1924 msgstr "詳しい情報は、カーネルソースファイル I<Documentation/security/Yama.txt> を参照。"
1925
1926 #. type: TP
1927 #: build/C/man2/prctl.2:347
1928 #, no-wrap
1929 msgid "B<PR_SET_SECCOMP> (since Linux 2.6.23)"
1930 msgstr "B<PR_SET_SECCOMP> (Linux 2.6.23 以降)"
1931
1932 #.  See http://thread.gmane.org/gmane.linux.kernel/542632
1933 #.  [PATCH 0 of 2] seccomp updates
1934 #.  andrea@cpushare.com
1935 #. type: Plain text
1936 #: build/C/man2/prctl.2:358
1937 msgid "Set the secure computing (seccomp) mode for the calling thread, to limit the available system calls.  The more recent B<seccomp>(2)  system call provides a superset of the functionality of B<PR_SET_SECCOMP>."
1938 msgstr "呼び出したスレッドのセキュアコンピューティング (seccomp) モードを設定する。 最近の B<seccomp>(2) システムコールは B<PR_SET_SECCOMP> の上位互換の機能を提供する。"
1939
1940 #. type: Plain text
1941 #: build/C/man2/prctl.2:363
1942 msgid "The seccomp mode is selected via I<arg2>.  (The seccomp constants are defined in I<E<lt>linux/seccomp.hE<gt>>.)"
1943 msgstr "seccomp モードは I<arg2> で指定できる (seccomp 定数は I<E<lt>linux/seccomp.hE<gt>> で定義されている)。"
1944
1945 #. type: Plain text
1946 #: build/C/man2/prctl.2:384
1947 msgid "With I<arg2> set to B<SECCOMP_MODE_STRICT>, the only system calls that the thread is permitted to make are B<read>(2), B<write>(2), B<_exit>(2), and B<sigreturn>(2).  Other system calls result in the delivery of a B<SIGKILL> signal.  Strict secure computing mode is useful for number-crunching applications that may need to execute untrusted byte code, perhaps obtained by reading from a pipe or socket.  This operation is available only if the kernel is configured with B<CONFIG_SECCOMP> enabled."
1948 msgstr "I<arg2> を B<SECCOMP_MODE_STRICT> に設定すると、 そのスレッドが呼び出しを許可されるシステムコールは B<read>(2), B<write>(2), B<_exit>(2), B<sigreturn>(2) だけになる。 それ以外のシステムコールを呼び出すと、シグナル B<SIGKILL> が配送される。 パイプやソケットから読み込んだ、 信頼できないバイトコードを実行する必要がある大量の演算を行うアプリケーションにおいて、 strict secure computing モードは役立つ。 この操作は利用できるのは、 カーネルが B<CONFIG_SECCOMP> を有効にして作成されている場合だけである。"
1949
1950 #. type: Plain text
1951 #: build/C/man2/prctl.2:399
1952 msgid "With I<arg2> set to B<SECCOMP_MODE_FILTER> (since Linux 3.5), the system calls allowed are defined by a pointer to a Berkeley Packet Filter passed in I<arg3>.  This argument is a pointer to I<struct sock_fprog>; it can be designed to filter arbitrary system calls and system call arguments.  This mode is available only if the kernel is configured with B<CONFIG_SECCOMP_FILTER> enabled."
1953 msgstr "I<arg2> を B<SECCOMP_MODE_FILTER> (Linux 3.5 以降) に設定すると、 許可されるシステムコールは I<arg3> で渡された Berkeley Packet Filter へのポインターで定義される。 この引き数は I<struct sock_fprog> へのポインターである。 これは任意のシステムコールやシステムコール引き数をフィルタリングするために設計された。 このモードはカーネルで B<CONFIG_SECCOMP_FILTER> が有効になっている場合にのみ利用可能である。"
1954
1955 #. type: Plain text
1956 #: build/C/man2/prctl.2:414
1957 msgid "If B<SECCOMP_MODE_FILTER> filters permit B<fork>(2), then the seccomp mode is inherited by children created by B<fork>(2); if B<execve>(2)  is permitted, then the seccomp mode is preserved across B<execve>(2).  If the filters permit B<prctl>()  calls, then additional filters can be added; they are run in order until the first non-allow result is seen."
1958 msgstr "B<SECCOMP_MODE_FILTER> フィルターで B<fork>(2) が許可されている場合、 seccomp モードは B<fork>(2) で作成された子プロセスに継承される。 B<execve>(2) が許可されている場合、 seccomp モードは B<execve>(2) の前後で維持される。 フィルターで B<prctl>() コールが許可されている場合、 追加でフィルターが定義され、 これらのフィルターは許可されないものが見つかるまで指定された順序で実行される。"
1959
1960 #. type: Plain text
1961 #: build/C/man2/prctl.2:417
1962 msgid "For further information, see the kernel source file I<Documentation/prctl/seccomp_filter.txt>."
1963 msgstr "詳しい情報は、カーネルソースファイル I<Documentation/prctl/seccomp_filter.txt> を参照。"
1964
1965 #. type: TP
1966 #: build/C/man2/prctl.2:417
1967 #, no-wrap
1968 msgid "B<PR_GET_SECCOMP> (since Linux 2.6.23)"
1969 msgstr "B<PR_GET_SECCOMP> (Linux 2.6.23 以降)"
1970
1971 #. type: Plain text
1972 #: build/C/man2/prctl.2:435
1973 msgid "Return (as the function result)  the secure computing mode of the calling thread.  If the caller is not in secure computing mode, this operation returns 0; if the caller is in strict secure computing mode, then the B<prctl>()  call will cause a B<SIGKILL> signal to be sent to the process.  If the caller is in filter mode, and this system call is allowed by the seccomp filters, it returns 2; otherwise, the process is killed with a B<SIGKILL> signal.  This operation is available only if the kernel is configured with B<CONFIG_SECCOMP> enabled."
1974 msgstr "呼び出したスレッドの secure computing モードを (関数の結果として) 返す。 呼び出したスレッドが secure computing モードでなかった場合、 この操作は 0 を返し、 呼び出したスレッドが strict secure computing モードの場合、 B<prctl>()  を呼び出すとシグナル B<SIGKILL> がそのプロセスに送信される。 呼び出したスレッドがフィルタモードで、 このシステムコールが seccomp フィルタにより許可されている場合、 2 を返し、 そうでない場合プロセスは B<SIGKILL> シグナルで kill されづ。 この操作が利用できるのは、カーネルが B<CONFIG_SECCOMP> を有効にして作成されている場合だけである。"
1975
1976 #. type: Plain text
1977 #: build/C/man2/prctl.2:443
1978 msgid "Since Linux 3.8, the I<Seccomp> field of the I</proc/[pid]/status> file provides a method of obtaining the same information, without the risk that the process is killed; see B<proc>(5)."
1979 msgstr "Linux 3.8 以降では、 I</proc/[pid]/status> の I<seccomp> フィールドからも同じ情報を取得できる。 この方法の場合はプロセスが kill される危険はない。 B<proc>(5) を参照。"
1980
1981 #. type: TP
1982 #: build/C/man2/prctl.2:443
1983 #, no-wrap
1984 msgid "B<PR_SET_SECUREBITS> (since Linux 2.6.26)"
1985 msgstr "B<PR_SET_SECUREBITS> (Linux 2.6.26 以降)"
1986
1987 #. type: Plain text
1988 #: build/C/man2/prctl.2:449
1989 msgid "Set the \"securebits\" flags of the calling thread to the value supplied in I<arg2>.  See B<capabilities>(7)."
1990 msgstr "呼び出したスレッドの \"securebits\" フラグを I<arg2> で渡された値に設定する。 B<capabilities>(7)  参照。"
1991
1992 #. type: TP
1993 #: build/C/man2/prctl.2:449
1994 #, no-wrap
1995 msgid "B<PR_GET_SECUREBITS> (since Linux 2.6.26)"
1996 msgstr "B<PR_GET_SECUREBITS> (Linux 2.6.26 以降)"
1997
1998 #. type: Plain text
1999 #: build/C/man2/prctl.2:455
2000 msgid "Return (as the function result)  the \"securebits\" flags of the calling thread.  See B<capabilities>(7)."
2001 msgstr "呼び出したスレッドの \"securebits\" フラグを (関数の結果として) 返す。 B<capabilities>(7)  参照。"
2002
2003 #. type: TP
2004 #: build/C/man2/prctl.2:455
2005 #, no-wrap
2006 msgid "B<PR_SET_THP_DISABLE> (since Linux 3.15)"
2007 msgstr "B<PR_SET_THP_DISABLE> (Linux 3.15 以降)"
2008
2009 #.  commit a0715cc22601e8830ace98366c0c2bd8da52af52
2010 #. type: Plain text
2011 #: build/C/man2/prctl.2:471
2012 msgid "Set the state of the \"THP disable\" flag for the calling thread.  If I<arg2> has a nonzero value, the flag is set, otherwise it is cleared.  Setting this flag provides a method for disabling transparent huge pages for jobs where the code cannot be modified, and using a malloc hook with B<madvise>(2)  is not an option (i.e., statically allocated data).  The setting of the \"THP disable\" flag is inherited by a child created via B<fork>(2)  and is preserved across B<execve>(2)."
2013 msgstr "呼び出したスレッドの \"THP disable\" (THP 無効) フラグの状態を設定する。 I<arg2> が 0 以外の場合、フラグは有効になり、そうでない場合はクリーンされる。 このフラグを設定する方法により、 コードを変更できなかったり B<madvise>(2) の malloc hook をが有効ではないジョブ (この方法は静的に割り当てられたデータには有効ではない)に対して、 transparent huge pages を無効にする手段が提供される。 \"THP disable\" フラグの設定は B<fork>(2) で作成された子プロセスに継承され、 B<execve> の前後で維持される。"
2014
2015 #. type: TP
2016 #: build/C/man2/prctl.2:471
2017 #, no-wrap
2018 msgid "B<PR_GET_THP_DISABLE> (since Linux 3.15)"
2019 msgstr "B<PR_GET_THP_DISABLE> (Linux 3.15 以降)"
2020
2021 #. type: Plain text
2022 #: build/C/man2/prctl.2:476
2023 msgid "Return (via the function result) the current setting of the \"THP disable\" flag for the calling thread: either 1, if the flag is set, or 0, if it is not."
2024 msgstr "呼び出し元スレッドの \"THP disable\" フラグの現在の設定を (関数の結果として) 返す。フラグがセットされている場合は 1 が、セットされていない場合は 0 が返る。"
2025
2026 #. type: TP
2027 #: build/C/man2/prctl.2:476
2028 #, no-wrap
2029 msgid "B<PR_GET_TID_ADDRESS> (since Linux 3.5)"
2030 msgstr "B<PR_GET_TID_ADDRESS> (Linux 3.5 以降)"
2031
2032 #.  commit 300f786b2683f8bb1ec0afb6e1851183a479c86d
2033 #. type: Plain text
2034 #: build/C/man2/prctl.2:491
2035 msgid "Retrieve the I<clear_child_tid> address set by B<set_tid_address>(2)  and the B<clone>(2)  B<CLONE_CHILD_CLEARTID> flag, in the location pointed to by I<(int\\ **)\\ arg2>.  This feature is available only if the kernel is built with the B<CONFIG_CHECKPOINT_RESTORE> option enabled."
2036 msgstr "B<set_tid_address>(2) や B<clone>(2) B<CLONE_CHILD_CLEARTID> フラグで設定された I<clear_child_tid> を取得し、 I<(int\\ **)\\ arg2> が指す場所に格納して返す。 この機能はカーネルが B<CONFIG_CHECKPOINT_RESTORE> オプションを有効にして作成されている場合にのみ利用できる。"
2037
2038 #. type: TP
2039 #: build/C/man2/prctl.2:491
2040 #, no-wrap
2041 msgid "B<PR_SET_TIMERSLACK> (since Linux 2.6.28)"
2042 msgstr "B<PR_SET_TIMERSLACK> (Linux 2.6.28 以降)"
2043
2044 #.  See https://lwn.net/Articles/369549/
2045 #.  commit 6976675d94042fbd446231d1bd8b7de71a980ada
2046 #.  It seems that it's not possible to set the timer slack to zero;
2047 #.  The minimum value is 1? Seems a little strange.
2048 #. type: Plain text
2049 #: build/C/man2/prctl.2:510
2050 msgid "Set the current timer slack for the calling thread to the nanosecond value supplied in I<arg2>.  If I<arg2> is less than or equal to zero, reset the current timer slack to the thread's default timer slack value.  The timer slack is used by the kernel to group timer expirations for the calling thread that are close to one another; as a consequence, timer expirations for the thread may be up to the specified number of nanoseconds late (but will never expire early).  Grouping timer expirations can help reduce system power consumption by minimizing CPU wake-ups."
2051 msgstr ""
2052
2053 #.  List obtained by grepping for futex usage in glibc source
2054 #. type: Plain text
2055 #: build/C/man2/prctl.2:530
2056 msgid "The timer expirations affected by timer slack are those set by B<select>(2), B<pselect>(2), B<poll>(2), B<ppoll>(2), B<epoll_wait>(2), B<epoll_pwait>(2), B<clock_nanosleep>(2), B<nanosleep>(2), and B<futex>(2)  (and thus the library functions implemented via futexes, including B<pthread_cond_timedwait>(3), B<pthread_mutex_timedlock>(3), B<pthread_rwlock_timedrdlock>(3), B<pthread_rwlock_timedwrlock>(3), and B<sem_timedwait>(3))."
2057 msgstr ""
2058
2059 #. type: Plain text
2060 #: build/C/man2/prctl.2:534
2061 msgid "Timer slack is not applied to threads that are scheduled under a real-time scheduling policy (see B<sched_setscheduler>(2))."
2062 msgstr ""
2063
2064 #. type: Plain text
2065 #: build/C/man2/prctl.2:551
2066 msgid "Each thread has two associated timer slack values: a \"default\" value, and a \"current\" value.  The current value is the one that governs grouping of timer expirations.  When a new thread is created, the two timer slack values are made the same as the current value of the creating thread.  Thereafter, a thread can adjust its current timer slack value via B<PR_SET_TIMERSLACK> (the default value can't be changed).  The timer slack values of I<init> (PID 1), the ancestor of all processes, are 50,000 nanoseconds (50 microseconds).  The timer slack values are preserved across B<execve>(2)."
2067 msgstr ""
2068
2069 #. type: TP
2070 #: build/C/man2/prctl.2:551
2071 #, no-wrap
2072 msgid "B<PR_GET_TIMERSLACK> (since Linux 2.6.28)"
2073 msgstr "B<PR_GET_TIMERSLACK> (Linux 2.6.28 以降)"
2074
2075 #. type: Plain text
2076 #: build/C/man2/prctl.2:555
2077 msgid "Return (as the function result)  the current timer slack value of the calling thread."
2078 msgstr "呼び出し元スレッドの現在のタイマーのスラック値を (関数の結果として) 返す。"
2079
2080 #. type: TP
2081 #: build/C/man2/prctl.2:555
2082 #, no-wrap
2083 msgid "B<PR_SET_TIMING> (since Linux 2.6.0-test4)"
2084 msgstr "B<PR_SET_TIMING> (Linux 2.6.0-test4 以降)"
2085
2086 #.  0
2087 #.  1
2088 #.  PR_TIMING_TIMESTAMP doesn't do anything in 2.6.26-rc8,
2089 #.  and looking at the patch history, it appears
2090 #.  that it never did anything.
2091 #. type: Plain text
2092 #: build/C/man2/prctl.2:572
2093 msgid "Set whether to use (normal, traditional) statistical process timing or accurate timestamp-based process timing, by passing B<PR_TIMING_STATISTICAL> or B<PR_TIMING_TIMESTAMP> to I<arg2>.  B<PR_TIMING_TIMESTAMP> is not currently implemented (attempting to set this mode will yield the error B<EINVAL>)."
2094 msgstr "(通常の、伝統的に使われてきた) 統計的なプロセスタイミングを使用するか、 正確なタイムスタンプに基づくプロセスタイミングを使用するかを設定する。 I<arg2> に指定できる値は B<PR_TIMING_STATISTICAL> か B<PR_TIMING_TIMESTAMP> である。 B<PR_TIMING_TIMESTAMP> は現在のところ実装されていない (このモードに設定しようとするとエラー B<EINVAL> が起こることだろう)。"
2095
2096 #. type: TP
2097 #: build/C/man2/prctl.2:572
2098 #, no-wrap
2099 msgid "B<PR_GET_TIMING> (since Linux 2.6.0-test4)"
2100 msgstr "B<PR_GET_TIMING> (Linux 2.6.0-test4 以降)"
2101
2102 #. type: Plain text
2103 #: build/C/man2/prctl.2:576
2104 msgid "Return (as the function result) which process timing method is currently in use."
2105 msgstr "現在使用中のプロセスタイミングを決める方法を (関数の結果として) 返す。"
2106
2107 #. type: TP
2108 #: build/C/man2/prctl.2:576
2109 #, no-wrap
2110 msgid "B<PR_TASK_PERF_EVENTS_DISABLE> (since Linux 2.6.31)"
2111 msgstr "B<PR_TASK_PERF_EVENTS_DISABLE> (Linux 2.6.31 以降)"
2112
2113 #. type: Plain text
2114 #: build/C/man2/prctl.2:585
2115 msgid "Disable all performance counters attached to the calling process, regardless of whether the counters were created by this process or another process.  Performance counters created by the calling process for other processes are unaffected.  For more information on performance counters, see the Linux kernel source file I<tools/perf/design.txt>."
2116 msgstr "呼び出したプロセスに接続されたすべての性能カウンターを無効にする。 カウンターがこのプロセスにより作成されたか他のプロセスにより作成されたかは関係ない。 呼び出したプロセスが他のプロセス用に作成した性能カウンターは影響を受けない。 性能カウンターの詳細については Linux カーネルソースの I<tools/perf/design.txt> を参照。"
2117
2118 #.  commit 1d1c7ddbfab358445a542715551301b7fc363e28
2119 #. type: Plain text
2120 #: build/C/man2/prctl.2:591
2121 msgid "Originally called B<PR_TASK_PERF_COUNTERS_DISABLE>; renamed (with same numerical value)  in Linux 2.6.32."
2122 msgstr "以前は B<PR_TASK_PERF_COUNTERS_DISABLE> と呼ばれていた。 Linux 2.6.32 で名前が変更された (数値は同じままである)。"
2123
2124 #. type: TP
2125 #: build/C/man2/prctl.2:591
2126 #, no-wrap
2127 msgid "B<PR_TASK_PERF_EVENTS_ENABLE> (since Linux 2.6.31)"
2128 msgstr "B<PR_TASK_PERF_EVENTS_ENABLE> (Linux 2.6.31 以降)"
2129
2130 #. type: Plain text
2131 #: build/C/man2/prctl.2:596
2132 msgid "The converse of B<PR_TASK_PERF_EVENTS_DISABLE>; enable performance counters attached to the calling process."
2133 msgstr "B<PR_TASK_PERF_EVENTS_DISABLE> の逆。 呼び出したプロセスに接続された性能カウンターを有効にする。"
2134
2135 #.  commit 1d1c7ddbfab358445a542715551301b7fc363e28
2136 #.  commit cdd6c482c9ff9c55475ee7392ec8f672eddb7be6
2137 #. type: Plain text
2138 #: build/C/man2/prctl.2:603
2139 msgid "Originally called B<PR_TASK_PERF_COUNTERS_ENABLE>; renamed in Linux 2.6.32."
2140 msgstr "以前は B<PR_TASK_PERF_COUNTERS_ENABLE> と呼ばれていた。 Linux 2.6.32 で名前が変更された。"
2141
2142 #. type: TP
2143 #: build/C/man2/prctl.2:603
2144 #, no-wrap
2145 msgid "B<PR_SET_TSC> (since Linux 2.6.26, x86 only)"
2146 msgstr "B<PR_SET_TSC> (Linux 2.6.26 以降, x86 のみ)"
2147
2148 #. type: Plain text
2149 #: build/C/man2/prctl.2:616
2150 msgid "Set the state of the flag determining whether the timestamp counter can be read by the process.  Pass B<PR_TSC_ENABLE> to I<arg2> to allow it to be read, or B<PR_TSC_SIGSEGV> to generate a B<SIGSEGV> when the process tries to read the timestamp counter."
2151 msgstr "そのプロセスがタイムスタンプカウンターを読み出せるかを決定する フラグの状態を設定する。 読み出しを許可する場合は I<arg2> に B<PR_TSC_ENABLE> を、そのプロセスがタイムスタンプカウンターを読み出そうとした際に B<SIGSEGV> を発生させる場合には B<PR_TSC_SIGSEGV> を渡す。"
2152
2153 #. type: TP
2154 #: build/C/man2/prctl.2:616
2155 #, no-wrap
2156 msgid "B<PR_GET_TSC> (since Linux 2.6.26, x86 only)"
2157 msgstr "B<PR_GET_TSC> (Linux 2.6.26 以降, x86 のみ)"
2158
2159 #. type: Plain text
2160 #: build/C/man2/prctl.2:622
2161 msgid "Return the state of the flag determining whether the timestamp counter can be read, in the location pointed to by I<(int\\ *) arg2>."
2162 msgstr "そのプロセスがタイムスタンプカウンターを読み出せるかを決定する フラグの状態を I<(int\\ *) arg2> が指す場所に格納して返す。"
2163
2164 #. type: TP
2165 #: build/C/man2/prctl.2:622
2166 #, no-wrap
2167 msgid "B<PR_SET_UNALIGN>"
2168 msgstr "B<PR_SET_UNALIGN>"
2169
2170 #. type: Plain text
2171 #: build/C/man2/prctl.2:632
2172 msgid "(Only on: ia64, since Linux 2.3.48; parisc, since Linux 2.6.15; PowerPC, since Linux 2.6.18; Alpha, since Linux 2.6.22)  Set unaligned access control bits to I<arg2>.  Pass B<PR_UNALIGN_NOPRINT> to silently fix up unaligned user accesses, or B<PR_UNALIGN_SIGBUS> to generate B<SIGBUS> on unaligned user access."
2173 msgstr "(ia64 では Linux 2.3.48 以降; parisc では Linux 2.6.15 以降; PowerPC では Linux 2.6.18 以降; Alpha では Linux 2.6.22 以降; これらのアーキテクチャーのみ)  unaligned アクセス制御ビットを I<arg2> で指定された値に設定する。 指定できる値は B<PR_UNALIGN_NOPRINT> (unaligned なユーザーアクセスを黙って 修正する) か B<PR_UNALIGN_SIGBUS> (unaligned なユーザーアクセスがあった場合 B<SIGBUS> を生成する) である。"
2174
2175 #. type: TP
2176 #: build/C/man2/prctl.2:632
2177 #, no-wrap
2178 msgid "B<PR_GET_UNALIGN>"
2179 msgstr "B<PR_GET_UNALIGN>"
2180
2181 #. type: Plain text
2182 #: build/C/man2/prctl.2:639
2183 msgid "(see B<PR_SET_UNALIGN> for information on versions and architectures)  Return unaligned access control bits, in the location pointed to by I<(int\\ *) arg2>."
2184 msgstr "(バージョンとアーキテクチャーの情報は B<PR_SET_UNALIGN> 参照)  unaligned アクセス制御ビットの値を I<(int\\ *) arg2> が指す場所に格納して返す。"
2185
2186 #. type: TP
2187 #: build/C/man2/prctl.2:639
2188 #, no-wrap
2189 msgid "B<PR_MCE_KILL> (since Linux 2.6.32)"
2190 msgstr "B<PR_MCE_KILL> (Linux 2.6.32 以降)"
2191
2192 #. type: Plain text
2193 #: build/C/man2/prctl.2:679
2194 msgid "Set the machine check memory corruption kill policy for the current thread.  If I<arg2> is B<PR_MCE_KILL_CLEAR>, clear the thread memory corruption kill policy and use the system-wide default.  (The system-wide default is defined by I</proc/sys/vm/memory_failure_early_kill>; see B<proc>(5).)  If I<arg2> is B<PR_MCE_KILL_SET>, use a thread-specific memory corruption kill policy.  In this case, I<arg3> defines whether the policy is I<early kill> (B<PR_MCE_KILL_EARLY>), I<late kill> (B<PR_MCE_KILL_LATE>), or the system-wide default (B<PR_MCE_KILL_DEFAULT>).  Early kill means that the thread receives a B<SIGBUS> signal as soon as hardware memory corruption is detected inside its address space.  In late kill mode, the process is killed only when it accesses a corrupted page.  See B<sigaction>(2)  for more information on the B<SIGBUS> signal.  The policy is inherited by children.  The remaining unused B<prctl>()  arguments must be zero for future compatibility."
2195 msgstr ""
2196
2197 #. type: TP
2198 #: build/C/man2/prctl.2:679
2199 #, no-wrap
2200 msgid "B<PR_MCE_KILL_GET> (since Linux 2.6.32)"
2201 msgstr "B<PR_MCE_KILL_GET> (Linux 2.6.32 以降)"
2202
2203 #. type: Plain text
2204 #: build/C/man2/prctl.2:685
2205 msgid "Return the current per-process machine check kill policy.  All unused B<prctl>()  arguments must be zero."
2206 msgstr ""
2207
2208 #. type: TP
2209 #: build/C/man2/prctl.2:685
2210 #, no-wrap
2211 msgid "B<PR_SET_MM> (since Linux 3.3)"
2212 msgstr "B<PR_SET_MM> (Linux 3.3 以降)"
2213
2214 #.  commit 028ee4be34a09a6d48bdf30ab991ae933a7bc036
2215 #. type: Plain text
2216 #: build/C/man2/prctl.2:706
2217 msgid "Modify certain kernel memory map descriptor fields of the calling process.  Usually these fields are set by the kernel and dynamic loader (see B<ld.so>(8)  for more information) and a regular application should not use this feature.  However, there are cases, such as self-modifying programs, where a program might find it useful to change its own memory map.  This feature is available only if the kernel is built with the B<CONFIG_CHECKPOINT_RESTORE> option enabled.  The calling process must have the B<CAP_SYS_RESOURCE> capability.  The value in I<arg2> is one of the options below, while I<arg3> provides a new value for the option."
2218 msgstr "呼び出したプロセスのカーネルメモリーマップディスクリプターのフィールドを変更する。 これらのフィールドは通常カーネルと動的リンカーにより設定される (詳しい情報は B<ld.so> を参照)。 通常のアプリケーションはこの機能を利用すべきではない。 しかしながら、自分を書き換えるプログラムなど、 プログラムが自分自身のメモリーマップを変更するのが有用な場面もある。 この機能はカーネルが B<CONFIG_CHECKPOINT_RESTORE> オプションを有効にして作成されている場合にのみ利用できる。 呼び出したプロセスは B<CAP_SYS_RESOURCE> ケーパビリティを持っていなければならない。 I<arg2> の値には以下のいずれかを指定し、 I<arg3> でそのオプションの新しい値を指定する。"
2219
2220 #. type: TP
2221 #: build/C/man2/prctl.2:707
2222 #, no-wrap
2223 msgid "B<PR_SET_MM_START_CODE>"
2224 msgstr "B<PR_SET_MM_START_CODE>"
2225
2226 #. type: Plain text
2227 #: build/C/man2/prctl.2:716
2228 msgid "Set the address above which the program text can run.  The corresponding memory area must be readable and executable, but not writable or sharable (see B<mprotect>(2)  and B<mmap>(2)  for more information)."
2229 msgstr "プログラムテキストを実行できるアドレスの上限を設定する。 対応するメモリー領域は読み出し可能で実行可能でなければならないが、 書き込み可能だったり共有可能だったりしてはならない (詳しい情報は B<mprotect>(2) と B<mmap>(2) 参照)。"
2230
2231 #. type: TP
2232 #: build/C/man2/prctl.2:716
2233 #, no-wrap
2234 msgid "B<PR_SET_MM_END_CODE>"
2235 msgstr "B<PR_SET_MM_END_CODE>"
2236
2237 #. type: Plain text
2238 #: build/C/man2/prctl.2:721
2239 msgid "Set the address below which the program text can run.  The corresponding memory area must be readable and executable, but not writable or sharable."
2240 msgstr "プログラムテキストを実行できるアドレスの下限を設定する。 対応するメモリー領域は読み出し可能で実行可能でなければならないが、 書き込み可能だったり共有可能だったりしてはならない。"
2241
2242 #. type: TP
2243 #: build/C/man2/prctl.2:721
2244 #, no-wrap
2245 msgid "B<PR_SET_MM_START_DATA>"
2246 msgstr "B<PR_SET_MM_START_DATA>"
2247
2248 #. type: Plain text
2249 #: build/C/man2/prctl.2:727
2250 msgid "Set the address above which initialized and uninitialized (bss) data are placed.  The corresponding memory area must be readable and writable, but not executable or sharable."
2251 msgstr "初期化済データや未初期化 (bss) データを配置する領域のアドレス上限を指定する。 対応するメモリー領域は読み書き可能でなければならないが、 実行可能だったり共有可能だったりしてはならない。"
2252
2253 #. type: TP
2254 #: build/C/man2/prctl.2:727
2255 #, no-wrap
2256 msgid "B<PR_SET_MM_END_DATA>"
2257 msgstr "B<PR_SET_MM_END_DATA>"
2258
2259 #. type: Plain text
2260 #: build/C/man2/prctl.2:733
2261 msgid "Set the address below which initialized and uninitialized (bss) data are placed.  The corresponding memory area must be readable and writable, but not executable or sharable."
2262 msgstr "初期化済データや未初期化 (bss) データを配置する領域のアドレス下限を指定する。 対応するメモリー領域は読み書き可能でなければならないが、 実行可能だったり共有可能だったりしてはならない。"
2263
2264 #. type: TP
2265 #: build/C/man2/prctl.2:733
2266 #, no-wrap
2267 msgid "B<PR_SET_MM_START_STACK>"
2268 msgstr "B<PR_SET_MM_START_STACK>"
2269
2270 #. type: Plain text
2271 #: build/C/man2/prctl.2:737
2272 msgid "Set the start address of the stack.  The corresponding memory area must be readable and writable."
2273 msgstr "スタックの開始アドレスを設定する。 対応するメモリー領域は読み書き可能でなければならない。"
2274
2275 #. type: TP
2276 #: build/C/man2/prctl.2:737
2277 #, no-wrap
2278 msgid "B<PR_SET_MM_START_BRK>"
2279 msgstr "B<PR_SET_MM_START_BRK>"
2280
2281 #. type: Plain text
2282 #: build/C/man2/prctl.2:749
2283 msgid "Set the address above which the program heap can be expanded with B<brk>(2)  call.  The address must be greater than the ending address of the current program data segment.  In addition, the combined size of the resulting heap and the size of the data segment can't exceed the B<RLIMIT_DATA> resource limit (see B<setrlimit>(2))."
2284 msgstr "B<brk>(2) コールで拡張できるプログラムのヒープ領域のアドレス上限を設定する。 このアドレスは、プログラムの現在のデータセグメントの最終アドレスより大きくなければならない。 また、 変更後のヒープとデータセグメントのサイズを合わせたサイズが B<RLIMIT_DATA> リソースリミットを超えることはできない (B<setrlimit>(2) 参照)。"
2285
2286 #. type: TP
2287 #: build/C/man2/prctl.2:749
2288 #, no-wrap
2289 msgid "B<PR_SET_MM_BRK>"
2290 msgstr "B<PR_SET_MM_BRK>"
2291
2292 #. type: Plain text
2293 #: build/C/man2/prctl.2:757
2294 msgid "Set the current B<brk>(2)  value.  The requirements for the address are the same as for the B<PR_SET_MM_START_BRK> option."
2295 msgstr "現在の B<brk>(2) 値を設定する。 このアドレスの要件は B<PR_SET_MM_START_BRK> オプションと同じである。"
2296
2297 #.  commit fe8c7f5cbf91124987106faa3bdf0c8b955c4cf7
2298 #. type: Plain text
2299 #: build/C/man2/prctl.2:760
2300 msgid "The following options are available since Linux 3.5."
2301 msgstr "以下のオプションは Linux 3.5 以降で利用できる。"
2302
2303 #. type: TP
2304 #: build/C/man2/prctl.2:760
2305 #, no-wrap
2306 msgid "B<PR_SET_MM_ARG_START>"
2307 msgstr "B<PR_SET_MM_ARG_START>"
2308
2309 #. type: Plain text
2310 #: build/C/man2/prctl.2:763
2311 msgid "Set the address above which the program command line is placed."
2312 msgstr "プログラムのコマンドラインを配置するアドレスの上限を設定する。"
2313
2314 #. type: TP
2315 #: build/C/man2/prctl.2:763
2316 #, no-wrap
2317 msgid "B<PR_SET_MM_ARG_END>"
2318 msgstr "B<PR_SET_MM_ARG_END>"
2319
2320 #. type: Plain text
2321 #: build/C/man2/prctl.2:766
2322 msgid "Set the address below which the program command line is placed."
2323 msgstr "プログラムのコマンドラインを配置するアドレスの下限を設定する。"
2324
2325 #. type: TP
2326 #: build/C/man2/prctl.2:766
2327 #, no-wrap
2328 msgid "B<PR_SET_MM_ENV_START>"
2329 msgstr "B<PR_SET_MM_ENV_START>"
2330
2331 #. type: Plain text
2332 #: build/C/man2/prctl.2:769
2333 msgid "Set the address above which the program environment is placed."
2334 msgstr "プログラムの環境情報 (environment) を配置するアドレスの上限を設定する。"
2335
2336 #. type: TP
2337 #: build/C/man2/prctl.2:769
2338 #, no-wrap
2339 msgid "B<PR_SET_MM_ENV_END>"
2340 msgstr "B<PR_SET_MM_ENV_END>"
2341
2342 #. type: Plain text
2343 #: build/C/man2/prctl.2:772
2344 msgid "Set the address below which the program environment is placed."
2345 msgstr "プログラムの環境情報 (environment) を配置するアドレスの下限を設定する。"
2346
2347 #. type: Plain text
2348 #: build/C/man2/prctl.2:785
2349 msgid "The address passed with B<PR_SET_MM_ARG_START>, B<PR_SET_MM_ARG_END>, B<PR_SET_MM_ENV_START>, and B<PR_SET_MM_ENV_END> should belong to a process stack area.  Thus, the corresponding memory area must be readable, writable, and (depending on the kernel configuration) have the B<MAP_GROWSDOWN> attribute set (see B<mmap>(2))."
2350 msgstr "B<PR_SET_MM_ARG_START>, B<PR_SET_MM_ARG_END>, B<PR_SET_MM_ENV_START>, B<PR_SET_MM_ENV_END> で指定されるアドレスはプロセスのスタック領域に属している必要がある。 したがって、これらのメモリー領域は読み書き可能でなければならない。 また、 (カーネル設定によっては) B<MAP_GROWSDOWN> 属性がセットされていなければならない (B<mmap>(2) 参照)。"
2351
2352 #. type: TP
2353 #: build/C/man2/prctl.2:785
2354 #, no-wrap
2355 msgid "B<PR_SET_MM_AUXV>"
2356 msgstr "B<PR_SET_MM_AUXV>"
2357
2358 #. type: Plain text
2359 #: build/C/man2/prctl.2:794
2360 msgid "Set a new auxiliary vector.  The I<arg3> argument should provide the address of the vector.  The I<arg4> is the size of the vector."
2361 msgstr "新しい補助ベクトル (auxiliary vector) を設定する。 I<arg3> 引き数はベクトルのアドレスを指定し、 I<arg4> はベクトルのサイズを指定する。"
2362
2363 #. type: TP
2364 #: build/C/man2/prctl.2:794
2365 #, no-wrap
2366 msgid "B<PR_SET_MM_EXE_FILE>"
2367 msgstr "B<PR_SET_MM_EXE_FILE>"
2368
2369 #.  commit b32dfe377102ce668775f8b6b1461f7ad428f8b6
2370 #. type: Plain text
2371 #: build/C/man2/prctl.2:806
2372 msgid "Supersede the I</proc/pid/exe> symbolic link with a new one pointing to a new executable file identified by the file descriptor provided in I<arg3> argument.  The file descriptor should be obtained with a regular B<open>(2)  call."
2373 msgstr "I</proc/pid/exe> シンボリックリンクを I<arg3> 引き数で渡された新しい実行可能なファイルディスクリプターを指すシンボリックリンクで置き換える。 ファイルディスクリプターは通常の B<open>(2) コールで取得すべきである。"
2374
2375 #. type: Plain text
2376 #: build/C/man2/prctl.2:813
2377 msgid "To change the symbolic link, one needs to unmap all existing executable memory areas, including those created by the kernel itself (for example the kernel usually creates at least one executable memory area for the ELF I<.text> section)."
2378 msgstr "シンボリックリンクを変更するには、 既存の実行可能なメモリー領域のすべてをアンマップする必要がある。これにはカーネル自身が作成した領域も含まれる (例えば、カーネルは通常 ELF I<.text> セクションに少なくとも一つの実行可能なメモリー領域を作成する)。"
2379
2380 #. type: Plain text
2381 #: build/C/man2/prctl.2:819
2382 msgid "The second limitation is that such transitions can be done only once in a process life time.  Any further attempts will be rejected.  This should help system administrators monitor unusual symbolic-link transitions over all processes running on a system."
2383 msgstr "二つ目の制限は、このような変更はプロセスの生存期間で一度だけ行うことができるという点である。 一度変更を行った後で変更を行おうとすると拒否される。 この動作は、 システム管理者が、 システムで動作するすべてのプロセスが行う、 普通でないシンボリックリンクの変更を監視するのを楽にする。"
2384
2385 #. type: TP
2386 #: build/C/man2/prctl.2:820
2387 #, no-wrap
2388 msgid "B<PR_MPX_ENABLE_MANAGEMENT>, B<PR_MPX_DISABLE_MANAGEMENT> (since Linux 3.19) "
2389 msgstr "B<PR_MPX_ENABLE_MANAGEMENT>, B<PR_MPX_DISABLE_MANAGEMENT> (Linux 3.19 以降) "
2390
2391 #.  commit fe3d197f84319d3bce379a9c0dc17b1f48ad358c
2392 #.  See also http://lwn.net/Articles/582712/
2393 #.  See also https://gcc.gnu.org/wiki/Intel%20MPX%20support%20in%20the%20GCC%20compiler
2394 #. type: Plain text
2395 #: build/C/man2/prctl.2:827
2396 msgid "Enable or disable kernel management of Memory Protection eXtensions (MPX)  bounds tables."
2397 msgstr ""
2398
2399 #. type: Plain text
2400 #: build/C/man2/prctl.2:840
2401 msgid "MPX is a hardware-assisted mechanism for performing bounds checking on pointers.  It consists of a set of registers storing bounds information and a set of special instruction prefixes that tell the CPU on which instructions it should do bounds enforcement.  There is a limited number of these registers and when there are more pointers than registers, their contents must be \"spilled\" into a set of tables.  These tables are called \"bounds tables\" and the MPX B<prctl>()  operations control whether the kernel manages their allocation and freeing."
2402 msgstr ""
2403
2404 #. type: Plain text
2405 #: build/C/man2/prctl.2:850
2406 msgid "When management is enabled, the kernel will take over allocation and freeing of the bounds tables.  It does this by trapping the #BR exceptions that result at first use of missing bounds tables and instead of delivering the exception to user space, it allocates the table and populates the bounds directory with the location of the new table.  For freeing, the kernel checks to see if bounds tables are present for memory which is not allocated, and frees them if so."
2407 msgstr ""
2408
2409 #. type: Plain text
2410 #: build/C/man2/prctl.2:857
2411 msgid "Before enabling MPX management using B<PR_MPX_ENABLE_MANAGEMENT>, the application must first have allocated a user-space buffer for the bounds directory and placed the location of that directory in the I<bndcfgu> register."
2412 msgstr ""
2413
2414 #. type: Plain text
2415 #: build/C/man2/prctl.2:864
2416 msgid "These calls will fail if the CPU or kernel does not support MPX.  Kernel support for MPX is enabled via the B<CONFIG_X86_INTEL_MPX> configuration option.  You can check whether the CPU supports MPX by looking for the 'mpx' CPUID bit, like with the following command:"
2417 msgstr ""
2418
2419 #. type: Plain text
2420 #: build/C/man2/prctl.2:866
2421 msgid "  cat /proc/cpuinfo | grep ' mpx '"
2422 msgstr "  cat /proc/cpuinfo | grep ' mpx '"
2423
2424 #. type: Plain text
2425 #: build/C/man2/prctl.2:869
2426 msgid "A thread may not switch in or out of long (64-bit) mode while MPX is enabled."
2427 msgstr ""
2428
2429 #. type: Plain text
2430 #: build/C/man2/prctl.2:871
2431 msgid "All threads in a process are affected by these calls."
2432 msgstr ""
2433
2434 #. type: Plain text
2435 #: build/C/man2/prctl.2:880
2436 msgid "The child of a B<fork>(2)  inherits the state of MPX management.  During B<execve>(2), MPX management is reset to a state as if B<PR_MPX_DISABLE_MANAGEMENT> had been called."
2437 msgstr ""
2438
2439 #. type: Plain text
2440 #: build/C/man2/prctl.2:884
2441 msgid "For further information on Intel MPX, see the kernel source file I<Documentation/x86/intel_mpx.txt>."
2442 msgstr "Intel MPX についての詳しい情報は、カーネルソースファイル I<Documentation/x86/intel_mpx.txt> を参照。"
2443
2444 #. type: Plain text
2445 #: build/C/man2/prctl.2:904
2446 msgid "On success, B<PR_GET_DUMPABLE>, B<PR_GET_KEEPCAPS>, B<PR_GET_NO_NEW_PRIVS>, B<PR_GET_THP_DISABLE>, B<PR_CAPBSET_READ>, B<PR_GET_TIMING>, B<PR_GET_TIMERSLACK>, B<PR_GET_SECUREBITS>, B<PR_MCE_KILL_GET>, and (if it returns)  B<PR_GET_SECCOMP> return the nonnegative values described above.  All other I<option> values return 0 on success.  On error, -1 is returned, and I<errno> is set appropriately."
2447 msgstr "成功すると、 B<PR_GET_DUMPABLE>, B<PR_GET_KEEPCAPS>, B<PR_GET_NO_NEW_PRIVS>, B<PR_GET_THP_DISABLE>, B<PR_CAPBSET_READ>, B<PR_GET_TIMING>, B<PR_GET_TIMERSLACK>, B<PR_GET_SECUREBITS>, B<PR_MCE_KILL_GET>, B<PR_GET_SECCOMP> は上述の負でない値を返す (なお、B<PR_GET_SECCOMP> は返らない場合もある)。 I<option> が他の値の場合は成功時に 0 を返す。 エラーの場合、-1 を返し、 I<errno> に適切な値を設定する。"
2448
2449 #. type: Plain text
2450 #: build/C/man2/prctl.2:909
2451 msgid "I<arg2> is an invalid address."
2452 msgstr "I<arg2> が不正なアドレスである。"
2453
2454 #. type: Plain text
2455 #: build/C/man2/prctl.2:922
2456 msgid "I<option> is B<PR_SET_SECCOMP>, I<arg2> is B<SECCOMP_MODE_FILTER>, the system was built with B<CONFIG_SECCOMP_FILTER>, and I<arg3> is an invalid address."
2457 msgstr "I<option> が B<PR_SET_SECCOMP> で、 I<arg2> が B<SECCOMP_MODE_FILTER> で、 カーネルが B<CONFIG_SECCOMP_FILTER> を有効にして作成されており、 I<arg3> が無効なアドレスである。"
2458
2459 #. type: Plain text
2460 #: build/C/man2/prctl.2:927
2461 msgid "The value of I<option> is not recognized."
2462 msgstr "I<option> の値が理解できない。"
2463
2464 #. type: Plain text
2465 #: build/C/man2/prctl.2:939
2466 msgid "I<option> is B<PR_MCE_KILL> or B<PR_MCE_KILL_GET> or B<PR_SET_MM>, and unused B<prctl>()  arguments were not specified as zero."
2467 msgstr "I<option> が B<PR_MCE_KILL>, B<PR_MCE_KILL_GET>, B<PR_SET_MM> のいずれかで、かつ未使用の B<prctl>() 引き数に 0 が指定されていなかった。"
2468
2469 #. type: Plain text
2470 #: build/C/man2/prctl.2:944
2471 msgid "I<arg2> is not valid value for this I<option>."
2472 msgstr "I<arg2> が指定された I<option> で有効な値ではない。"
2473
2474 #. type: Plain text
2475 #: build/C/man2/prctl.2:953
2476 msgid "I<option> is B<PR_SET_SECCOMP> or B<PR_GET_SECCOMP>, and the kernel was not configured with B<CONFIG_SECCOMP>."
2477 msgstr "I<option> が B<PR_SET_SECCOMP> か B<PR_GET_SECCOMP> だが、カーネルが B<CONFIG_SECCOMP> を有効にして作成されていなかった。"
2478
2479 #. type: Plain text
2480 #: build/C/man2/prctl.2:963
2481 msgid "I<option> is B<PR_SET_SECCOMP>, I<arg2> is B<SECCOMP_MODE_FILTER>, and the kernel was not configured with B<CONFIG_SECCOMP_FILTER>."
2482 msgstr "I<option> が B<PR_SET_SECCOMP> で、 I<arg2> が B<SECCOMP_MODE_FILTER> で、 カーネルが B<CONFIG_SECCOMP> を有効にして作成されていなかった。"
2483
2484 #. type: Plain text
2485 #: build/C/man2/prctl.2:969
2486 msgid "I<option> is B<PR_SET_MM>, and one of the following is true"
2487 msgstr "I<option> が B<PR_SET_MM> で、以下のいずれかが真である。"
2488
2489 #. type: Plain text
2490 #: build/C/man2/prctl.2:975
2491 msgid "I<arg4> or I<arg5> is nonzero;"
2492 msgstr "I<arg4> が I<arg5> で 0 以外である。"
2493
2494 #. type: Plain text
2495 #: build/C/man2/prctl.2:980
2496 msgid "I<arg3> is greater than B<TASK_SIZE> (the limit on the size of the user address space for this architecture);"
2497 msgstr "I<arg3> が B<TASK_SIZE> よりも大きい  (B<TASK_SIZE> はこのアーキテクチャーでユーザー空間アドレススペースの最大サイズである)。"
2498
2499 #. type: Plain text
2500 #: build/C/man2/prctl.2:990
2501 msgid "I<arg2> is B<PR_SET_MM_START_CODE>, B<PR_SET_MM_END_CODE>, B<PR_SET_MM_START_DATA>, B<PR_SET_MM_END_DATA>, or B<PR_SET_MM_START_STACK>, and the permissions of the corresponding memory area are not as required;"
2502 msgstr "I<arg2> が B<PR_SET_MM_START_CODE>, B<PR_SET_MM_END_CODE>, B<PR_SET_MM_START_DATA>, B<PR_SET_MM_END_DATA>, B<PR_SET_MM_START_STACK> のどれかで、対応するメモリー領域のアクセス許可が要件を満たしていない。"
2503
2504 #. type: Plain text
2505 #: build/C/man2/prctl.2:1002
2506 msgid "I<arg2> is B<PR_SET_MM_START_BRK> or B<PR_SET_MM_BRK>, and I<arg3> is less than or equal to the end of the data segment or specifies a value that would cause the B<RLIMIT_DATA> resource limit to be exceeded."
2507 msgstr "I<arg2> が B<PR_SET_MM_START_BRK> か B<PR_SET_MM_BRK> で、 I<arg3> データセグメントの末尾と同じかそれより前か、 I<arg3> に B<RLIMIT_DATA> リソースリミットを超えてしまうような値が指定されている。"
2508
2509 #. type: Plain text
2510 #: build/C/man2/prctl.2:1013
2511 msgid "I<option> is B<PR_SET_PTRACER> and I<arg2> is not 0, B<PR_SET_PTRACER_ANY>, or the PID of an existing process."
2512 msgstr "I<option> が B<PR_SET_PTRACER> で I<arg2> が 0, B<PR_SET_PTRACER_ANY>, 既存プロセスの PID のいずれでもない。"
2513
2514 #. type: Plain text
2515 #: build/C/man2/prctl.2:1021
2516 msgid "I<option> is B<PR_SET_PDEATHSIG> and I<arg2> is not a valid signal number."
2517 msgstr "I<option> が B<PR_SET_PDEATHSIG> で、 I<arg2> で指定された値は無効なシグナル番号である。"
2518
2519 #. type: Plain text
2520 #: build/C/man2/prctl.2:1032
2521 msgid "I<option> is B<PR_SET_DUMPABLE> and I<arg2> is neither B<SUID_DUMP_DISABLE> nor B<SUID_DUMP_USER>."
2522 msgstr "I<option> が B<PR_SET_DUMPABLE> で、 I<arg2> が B<SUID_DUMP_DISABLE> でも B<SUID_DUMP_USER> でもない。"
2523
2524 #. type: Plain text
2525 #: build/C/man2/prctl.2:1041
2526 msgid "I<option> is B<PR_SET_TIMING> and I<arg2> is not B<PR_TIMING_STATISTICAL>."
2527 msgstr "I<option> が B<PR_SET_TIMING> で、 I<arg2> が B<PR_TIMING_STATISTICAL> ではない。"
2528
2529 #. type: Plain text
2530 #: build/C/man2/prctl.2:1055
2531 msgid "I<option> is B<PR_SET_NO_NEW_PRIVS> and I<arg2> is not equal to 1 or I<arg3>, I<arg4>, or I<arg5> is nonzero."
2532 msgstr "I<option> が B<PR_SET_NO_NEW_PRIVS> で、 I<arg2> が 1 以外か、 I<arg3>, I<arg4>, I<arg5> のどれかが 0 ではない。"
2533
2534 #. type: Plain text
2535 #: build/C/man2/prctl.2:1067
2536 msgid "I<option> is B<PR_GET_NO_NEW_PRIVS> and I<arg2>, I<arg3>, I<arg4>, or I<arg5> is nonzero."
2537 msgstr "I<option> が B<PR_GET_NO_NEW_PRIVS> で、 I<arg2>, I<arg3>, I<arg4>, I<arg5> のどれかが 0 ではない。"
2538
2539 #. type: Plain text
2540 #: build/C/man2/prctl.2:1078
2541 msgid "I<option> is B<PR_SET_THP_DISABLE> and I<arg3>, I<arg4>, or I<arg5> is nonzero."
2542 msgstr "I<option> が B<PR_SET_THP_DISABLE> で I<arg3>, I<arg4>, I<arg5> のどれかが 0 ではない。"
2543
2544 #. type: Plain text
2545 #: build/C/man2/prctl.2:1090
2546 msgid "I<option> is B<PR_GET_THP_DISABLE> and I<arg2>, I<arg3>, I<arg4>, or I<arg5> is nonzero."
2547 msgstr "I<option> が B<PR_GET_THP_DISABLE> で I<arg2>, I<arg3>, I<arg4>, I<arg5> のいずれが 0 ではない。"
2548
2549 #. type: Plain text
2550 #: build/C/man2/prctl.2:1102
2551 msgid "I<option> is B<PR_SET_SECUREBITS>, and the caller does not have the B<CAP_SETPCAP> capability, or tried to unset a \"locked\" flag, or tried to set a flag whose corresponding locked flag was set (see B<capabilities>(7))."
2552 msgstr "I<option> が B<PR_SET_SECUREBITS> で、呼び出し元がケーパビリティ B<CAP_SETPCAP> を持っていない。 または、\"locked\" フラグを解除しようとした。 または、locked フラグがセットされているフラグをセットしようとした (B<capabilities>(7)  参照)。"
2553
2554 #. type: Plain text
2555 #: build/C/man2/prctl.2:1112
2556 msgid "I<option> is B<PR_SET_KEEPCAPS>, and the callers's B<SECURE_KEEP_CAPS_LOCKED> flag is set (see B<capabilities>(7))."
2557 msgstr "I<option> が B<PR_SET_KEEPCAPS> で、呼び出し元のフラグ B<SECURE_KEEP_CAPS_LOCKED> がセットされている (B<capabilities>(7)  参照)。"
2558
2559 #. type: Plain text
2560 #: build/C/man2/prctl.2:1120
2561 msgid "I<option> is B<PR_CAPBSET_DROP>, and the caller does not have the B<CAP_SETPCAP> capability."
2562 msgstr "I<option> が B<PR_CAPBSET_DROP> で、呼び出し元がケーパビリティ B<CAP_SETPCAP> を持っていない。"
2563
2564 #. type: Plain text
2565 #: build/C/man2/prctl.2:1128
2566 msgid "I<option> is B<PR_SET_MM>, and the caller does not have the B<CAP_SYS_RESOURCE> capability."
2567 msgstr "I<option> が B<PR_SET_MM> で、呼び出し元がケーパビリティ B<CAP_SYS_RESOURCE> を持っていない。"
2568
2569 #. type: TP
2570 #: build/C/man2/prctl.2:1128
2571 #, no-wrap
2572 msgid "B<EACCES>"
2573 msgstr "B<EACCES>"
2574
2575 #. type: Plain text
2576 #: build/C/man2/prctl.2:1138
2577 msgid "I<option> is B<PR_SET_MM>, and I<arg3> is B<PR_SET_MM_EXE_FILE>, the file is not executable."
2578 msgstr "I<option> が B<PR_SET_MM>、かつ I<arg3> が B<PR_SET_MM_EXE_FILE> で、ファイルが実行可能ではない。"
2579
2580 #. type: TP
2581 #: build/C/man2/prctl.2:1138
2582 #, no-wrap
2583 msgid "B<EBUSY>"
2584 msgstr "B<EBUSY>"
2585
2586 #. type: Plain text
2587 #: build/C/man2/prctl.2:1149
2588 msgid "I<option> is B<PR_SET_MM>, I<arg3> is B<PR_SET_MM_EXE_FILE>, and this the second attempt to change the I</proc/pid/exe> symbolic link, which is prohibited."
2589 msgstr "I<option> が B<PR_SET_MM> で、 I<arg3> が B<PR_SET_MM_EXE_FILE> で、 I</proc/pid/exe> シンボリックリンクを変更しようとしたが、 禁止されている。"
2590
2591 #. type: TP
2592 #: build/C/man2/prctl.2:1149 build/C/man2/signalfd.2:266
2593 #: build/C/man2/timerfd_create.2:345
2594 #, no-wrap
2595 msgid "B<EBADF>"
2596 msgstr "B<EBADF>"
2597
2598 #.  The following can't actually happen, because prctl() in
2599 #.  seccomp mode will cause SIGKILL.
2600 #.  .TP
2601 #.  .B EPERM
2602 #.  .I option
2603 #.  is
2604 #.  .BR PR_SET_SECCOMP ,
2605 #.  and secure computing mode is already 1.
2606 #. type: Plain text
2607 #: build/C/man2/prctl.2:1168
2608 msgid "I<option> is B<PR_SET_MM>, I<arg3> is B<PR_SET_MM_EXE_FILE>, and the file descriptor passed in I<arg4> is not valid."
2609 msgstr "I<option> が B<PR_SET_MM> で、 I<arg3> が B<PR_SET_MM_EXE_FILE> で、 I<arg4> で渡されたファイルディスクリプターが有効ではない。"
2610
2611 #. type: TP
2612 #: build/C/man2/prctl.2:1168
2613 #, no-wrap
2614 msgid "B<ENXIO>"
2615 msgstr "B<ENXIO>"
2616
2617 #. type: Plain text
2618 #: build/C/man2/prctl.2:1177
2619 msgid "I<option> was B<PR_MPX_ENABLE_MANAGEMENT> or B<PR_MPX_DISABLE_MANAGEMENT> and the kernel or the CPU does not support MPX management.  Check that the kernel and processor have MPX support."
2620 msgstr "I<option> が B<PR_MPX_ENABLE_MANAGEMENT> か B<PR_MPX_DISABLE_MANAGEMENT> で、 カーネルか CPU が MPX の管理をサポートしていない。 カーネルとプロセスが MPX をサポートしているか確認すること。"
2621
2622 #.  The library interface was added in glibc 2.0.6
2623 #. type: Plain text
2624 #: build/C/man2/prctl.2:1182
2625 msgid "The B<prctl>()  system call was introduced in Linux 2.1.57."
2626 msgstr "B<prctl>()  システムコールは Linux 2.1.57 で導入された。"
2627
2628 #. type: Plain text
2629 #: build/C/man2/prctl.2:1189
2630 msgid "This call is Linux-specific.  IRIX has a B<prctl>()  system call (also introduced in Linux 2.1.44 as irix_prctl on the MIPS architecture), with prototype"
2631 msgstr "このコールは Linux 特有である。 IRIX には B<prctl>()  システムコールがあるが (MIPS アーキテクチャーにおいて irix_prctl として Linux 2.1.44 で同様に導入された)、 そのプロトタイプは"
2632
2633 #. type: Plain text
2634 #: build/C/man2/prctl.2:1191
2635 msgid "B<ptrdiff_t prctl(int >I<option>B<, int >I<arg2>B<, int >I<arg3>B<);>"
2636 msgstr "B<ptrdiff_t prctl(int >I<option>B<, int >I<arg2>B<, int >I<arg3>B<);>"
2637
2638 #. type: Plain text
2639 #: build/C/man2/prctl.2:1196
2640 msgid "and options to get the maximum number of processes per user, get the maximum number of processors the calling process can use, find out whether a specified process is currently blocked, get or set the maximum stack size, and so on."
2641 msgstr "である。ユーザー当りのプロセス最大数を取得するオプション、 プロセスの使用できる最大プロッサー数を取得するオプション、 現在特定のプロセスが停止(block)させられているかどうか調べるオプション、 スタックサイズの最大値の取得や設定を行なうオプションなどがある。"
2642
2643 #. type: Plain text
2644 #: build/C/man2/prctl.2:1199
2645 msgid "B<signal>(2), B<core>(5)"
2646 msgstr "B<signal>(2), B<core>(5)"
2647
2648 #. type: TH
2649 #: build/C/man3/profil.3:28
2650 #, no-wrap
2651 msgid "PROFIL"
2652 msgstr "PROFIL"
2653
2654 #. type: Plain text
2655 #: build/C/man3/profil.3:31
2656 msgid "profil - execution time profile"
2657 msgstr "profil - 実行時間プロファイル (profile)"
2658
2659 #. type: Plain text
2660 #: build/C/man3/profil.3:34
2661 #, no-wrap
2662 msgid "B<#include E<lt>unistd.hE<gt>>\n"
2663 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
2664
2665 #. type: Plain text
2666 #: build/C/man3/profil.3:37
2667 #, no-wrap
2668 msgid ""
2669 "B<int profil(unsigned short *>I<buf>B<, size_t >I<bufsiz>B<,>\n"
2670 "B<           size_t >I<offset>B<, unsigned int >I<scale>B<);>\n"
2671 msgstr ""
2672 "B<int profil(unsigned short *>I<buf>B<, size_t >I<bufsiz>B<,>\n"
2673 "B<           size_t >I<offset>B<, unsigned int >I<scale>B<);>\n"
2674
2675 #. type: Plain text
2676 #: build/C/man3/profil.3:46
2677 msgid "B<profil>(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
2678 msgstr "B<profil>(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
2679
2680 #. type: Plain text
2681 #: build/C/man3/profil.3:68
2682 msgid "This routine provides a means to find out in what areas your program spends most of its time.  The argument I<buf> points to I<bufsiz> bytes of core.  Every virtual 10 milliseconds, the user's program counter (PC)  is examined: I<offset> is subtracted and the result is multiplied by I<scale> and divided by 65536.  If the resulting value is less than I<bufsiz>, then the corresponding entry in I<buf> is incremented.  If I<buf> is NULL, profiling is disabled."
2683 msgstr "このルーティンはプログラムのどこの部分で時間を費やしているかを調べる 手段を提供する。引き数 I<buf> は I<bufsiz> バイトのメモリーを指している。仮想の 10 ミリ秒ごとに、ユーザーの プログラムカウンター (PC) が検査される: I<offset> が引かれ、その結果が I<scale> 倍され 65536 で割られる。 結果が I<bufsiz> より小さい場合は I<buf> の対応するエントリがインクリメントされる。 I<buf> が NULL ならば、プロファイル (profile) は無効にされる。"
2684
2685 #. type: Plain text
2686 #: build/C/man3/profil.3:70
2687 msgid "Zero is always returned."
2688 msgstr "常に 0 が返される。"
2689
2690 #. type: Plain text
2691 #: build/C/man3/profil.3:72
2692 msgid "Similar to a call in SVr4 (but not POSIX.1-2001)."
2693 msgstr "SVr4 のコールに似ている (しかし POSIX.1-2001 ではない)。"
2694
2695 #. type: Plain text
2696 #: build/C/man3/profil.3:78
2697 msgid "B<profil>()  cannot be used on a program that also uses B<ITIMER_PROF> interval timers (see B<setitimer>(2))."
2698 msgstr "B<profil>()  は B<ITIMER_PROF> インターバルタイマーも使用しているプログラムでは使用できない (B<setitimer>(2)  参照)。"
2699
2700 #. type: Plain text
2701 #: build/C/man3/profil.3:81
2702 msgid "True kernel profiling provides more accurate results.  Libc 4.4 contained a kernel patch providing a system call profil."
2703 msgstr "本当のカーネルプロファイルはより正確な結果を与える。 libc 4.4 にはシステムコール profil を提供するための カーネルパッチが含まれていた。"
2704
2705 #. type: Plain text
2706 #: build/C/man3/profil.3:87
2707 msgid "B<gprof>(1), B<sprof>(1), B<setitimer>(2), B<sigaction>(2), B<signal>(2)"
2708 msgstr "B<gprof>(1), B<sprof>(1), B<setitimer>(2), B<sigaction>(2), B<signal>(2)"
2709
2710 #. type: TH
2711 #: build/C/man3/psignal.3:30
2712 #, no-wrap
2713 msgid "PSIGNAL"
2714 msgstr "PSIGNAL"
2715
2716 #. type: TH
2717 #: build/C/man3/psignal.3:30
2718 #, no-wrap
2719 msgid "2010-10-06"
2720 msgstr "2010-10-06"
2721
2722 #. type: TH
2723 #: build/C/man3/psignal.3:30 build/C/man3/raise.3:29
2724 #: build/C/man7/sigevent.7:26
2725 #, no-wrap
2726 msgid "GNU"
2727 msgstr "GNU"
2728
2729 #. type: Plain text
2730 #: build/C/man3/psignal.3:33
2731 msgid "psignal, psiginfo - print signal message"
2732 msgstr "psignal, psiginfo - シグナルメッセージを表示"
2733
2734 #. type: Plain text
2735 #: build/C/man3/psignal.3:39
2736 #, no-wrap
2737 msgid ""
2738 "B<void psignal(int >I<sig>B<, const char *>I<s>B<);>\n"
2739 "B<void psiginfo(const siginfo_t *>I<pinfo>B<, const char *>I<s>B<);>\n"
2740 msgstr ""
2741 "B<void psignal(int >I<sig>B<, const char *>I<s>B<);>\n"
2742 "B<void psiginfo(const siginfo_t *>I<pinfo>B<, const char *>I<s>B<);>\n"
2743
2744 #. type: Plain text
2745 #: build/C/man3/psignal.3:41
2746 #, no-wrap
2747 msgid "B<extern const char *const >I<sys_siglist>B<[];>\n"
2748 msgstr "B<extern const char *const >I<sys_siglist>B<[];>\n"
2749
2750 #. type: Plain text
2751 #: build/C/man3/psignal.3:50
2752 msgid "B<psignal>(): _SVID_SOURCE || _BSD_SOURCE"
2753 msgstr "B<psignal>(): _SVID_SOURCE || _BSD_SOURCE"
2754
2755 #. type: Plain text
2756 #: build/C/man3/psignal.3:53
2757 msgid "B<psiginfo>(): _XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
2758 msgstr "B<psiginfo>(): _XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
2759
2760 #. type: Plain text
2761 #: build/C/man3/psignal.3:56
2762 msgid "I<sys_siglist>: _BSD_SOURCE"
2763 msgstr "I<sys_siglist>: _BSD_SOURCE"
2764
2765 #. type: Plain text
2766 #: build/C/man3/psignal.3:65
2767 msgid "The B<psignal>()  function displays a message on I<stderr> consisting of the string I<s>, a colon, a space, a string describing the signal number I<sig>, and a trailing newline.  If the string I<s> is NULL or empty, the colon and space are omitted.  If I<sig> is invalid, the message displayed will indicate an unknown signal."
2768 msgstr "B<psignal>() 関数は、文字列 I<s>、コロン、スペース、シグナル番号 I<sig> を説明する文字列、終端の改行から構成されるメッセージを I<stderr> に表示する。 文字列 I<s> が NULL か空の場合、コロンとスペースは省略される。 I<sig> が不正ならば、表示される メッセージは未知のシグナルを示す。"
2769
2770 #. type: Plain text
2771 #: build/C/man3/psignal.3:86
2772 msgid "The B<psiginfo>()  function is like B<psignal>(), except that it displays information about the signal described by I<pinfo>, which should point to a valid I<siginfo_t> structure.  As well as the signal description, B<psiginfo>()  displays information about the origin of the signal, and other information relevant to the signal (e.g., the relevant memory address for hardware-generated signals, the child process ID for B<SIGCHLD>, and the user ID and process ID of the sender, for signals set using B<kill>(2)  or B<sigqueue>(3))."
2773 msgstr "B<psiginfo>() 関数は B<psignal>() と同じだが、 I<pinfo> に書かれたシグナルの情報を表示する点が異なる。 I<pinfo> は有効な I<siginfo_t> 構造体を指している必要がある。 B<psiginfo>() は、 シグナルの説明だけでなく、 シグナルの送信元やそのシグナルに関連するその他の情報も表示する (例えば、ハードウェアが発生したシグナルの関連メモリーアドレス、 B<SIGCHLD> の子プロセス ID、 I<kill>(2) や B<sigqueue>(3) を使って送信されたシグナルの送信元プロセスのユーザー ID とプロセス ID など)。"
2774
2775 #. type: Plain text
2776 #: build/C/man3/psignal.3:89
2777 msgid "The array I<sys_siglist> holds the signal description strings indexed by signal number."
2778 msgstr "配列 I<sys_siglist> はシグナルを説明する文字列を保持しており、 配列へのアクセスにはシグナル番号を添え字として用いる事ができる。"
2779
2780 #. type: Plain text
2781 #: build/C/man3/psignal.3:95
2782 msgid "The B<psignal>()  and B<psiginfo>()  functions return no value."
2783 msgstr "関数 B<psignal>() と B<psiginfo>() は、値を返さない。"
2784
2785 #. type: Plain text
2786 #: build/C/man3/psignal.3:99
2787 msgid "The B<psiginfo>()  function was added to glibc in version 2.10."
2788 msgstr "B<psiginfo>() 関数は glibc バージョン 2.10 で追加された。"
2789
2790 #. type: Plain text
2791 #: build/C/man3/psignal.3:101
2792 msgid "POSIX.1-2008, 4.3BSD."
2793 msgstr "POSIX.1-2008, 4.3BSD."
2794
2795 #. type: Plain text
2796 #: build/C/man3/psignal.3:105
2797 msgid "In glibc versions up to 2.12, B<psiginfo>()  had the following bugs:"
2798 msgstr "バージョン 2.12 までの glibc では B<psiginfo>() には以下のバグがあった。"
2799
2800 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12107
2801 #.  Reportedly now fixed; check glibc 2.13
2802 #. type: Plain text
2803 #: build/C/man3/psignal.3:109
2804 msgid "In some circumstances, a trailing newline is not printed."
2805 msgstr "特定の状況で、末尾の改行が出力されない。"
2806
2807 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12108
2808 #.  Reportedly now fixed; check glibc 2.13
2809 #. type: Plain text
2810 #: build/C/man3/psignal.3:113
2811 msgid "Additional details are not displayed for real-time signals."
2812 msgstr "リアルタイムシグナルの場合に、追加の詳細情報が表示されない。"
2813
2814 #. type: Plain text
2815 #: build/C/man3/psignal.3:118
2816 msgid "B<sigaction>(2), B<perror>(3), B<strsignal>(3), B<signal>(7)"
2817 msgstr "B<sigaction>(2), B<perror>(3), B<strsignal>(3), B<signal>(7)"
2818
2819 #. type: TH
2820 #: build/C/man3/raise.3:29
2821 #, no-wrap
2822 msgid "RAISE"
2823 msgstr "RAISE"
2824
2825 #. type: TH
2826 #: build/C/man3/raise.3:29
2827 #, no-wrap
2828 msgid "2014-03-10"
2829 msgstr "2014-03-10"
2830
2831 #. type: Plain text
2832 #: build/C/man3/raise.3:32
2833 msgid "raise - send a signal to the caller"
2834 msgstr "raise - 呼び出し元にシグナルを送る"
2835
2836 #. type: Plain text
2837 #: build/C/man3/raise.3:37
2838 #, no-wrap
2839 msgid "B<int raise(int >I<sig>B<);>\n"
2840 msgstr "B<int raise(int >I<sig>B<);>\n"
2841
2842 #. type: Plain text
2843 #: build/C/man3/raise.3:43
2844 msgid "The B<raise>()  function sends a signal to the calling process or thread.  In a single-threaded program it is equivalent to"
2845 msgstr "B<raise>()  関数は、呼び出し元のプロセスもしくはスレッドにシグナルを送る。 シングルスレッドのプログラムでは、以下と等価である。"
2846
2847 #. type: Plain text
2848 #: build/C/man3/raise.3:47
2849 #, no-wrap
2850 msgid "kill(getpid(), sig);\n"
2851 msgstr "kill(getpid(), sig);\n"
2852
2853 #. type: Plain text
2854 #: build/C/man3/raise.3:51
2855 msgid "In a multithreaded program it is equivalent to"
2856 msgstr "マルチスレッドのプログラムでは、以下と等価である。"
2857
2858 #. type: Plain text
2859 #: build/C/man3/raise.3:55
2860 #, no-wrap
2861 msgid "pthread_kill(pthread_self(), sig);\n"
2862 msgstr "pthread_kill(pthread_self(), sig);\n"
2863
2864 #. type: Plain text
2865 #: build/C/man3/raise.3:61
2866 msgid "If the signal causes a handler to be called, B<raise>()  will return only after the signal handler has returned."
2867 msgstr "シグナルに起因してシグナルハンドラーが呼び出される場合には、 B<raise>()  が返るのは必ずシグナルハンドラーが返った後になる。"
2868
2869 #. type: Plain text
2870 #: build/C/man3/raise.3:64
2871 msgid "B<raise>()  returns 0 on success, and nonzero for failure."
2872 msgstr "成功した場合は 0 を、失敗した場合は 0 以外の値を返す。"
2873
2874 #. type: Plain text
2875 #: build/C/man3/raise.3:69
2876 msgid "The B<raise>()  function is thread-safe."
2877 msgstr "B<raise>() 関数はスレッドセーフである。"
2878
2879 #. type: Plain text
2880 #: build/C/man3/raise.3:71 build/C/man2/signal.2:112
2881 msgid "C89, C99, POSIX.1-2001."
2882 msgstr "C89, C99, POSIX.1-2001."
2883
2884 #.  2.3.2 used the obsolete tkill(), if available.
2885 #. type: Plain text
2886 #: build/C/man3/raise.3:82
2887 msgid "Since version 2.3.3, glibc implements B<raise>()  by calling B<tgkill>(2), if the kernel supports that system call.  Older glibc versions implemented B<raise>()  using B<kill>(2)."
2888 msgstr "glibc バージョン 2.3.3 以降では、カーネルが B<tgkill>(2) システムコールをサポートしている場合はB<raise>() は B<tgkill>(2) を使って実装されている。古いバージョンの glibc では、B<raise>() は B<kill>(2) を使って実装されている。"
2889
2890 #. type: Plain text
2891 #: build/C/man3/raise.3:89
2892 msgid "B<getpid>(2), B<kill>(2), B<sigaction>(2), B<signal>(2), B<pthread_kill>(3), B<signal>(7)"
2893 msgstr "B<getpid>(2), B<kill>(2), B<sigaction>(2), B<signal>(2), B<pthread_kill>(3), B<signal>(7)"
2894
2895 #. type: TH
2896 #: build/C/man2/restart_syscall.2:33
2897 #, no-wrap
2898 msgid "RESTART_SYSCALL"
2899 msgstr ""
2900
2901 #. type: Plain text
2902 #: build/C/man2/restart_syscall.2:36
2903 msgid "restart_syscall - restart a system call after interruption by a stop signal"
2904 msgstr "restart_syscall - 一時停止シグナルによる割り込み後にシステムコールを再開する"
2905
2906 #. type: Plain text
2907 #: build/C/man2/restart_syscall.2:38
2908 msgid "B<int restart_syscall(void);>"
2909 msgstr "B<int restart_syscall(void);>"
2910
2911 #. type: Plain text
2912 #: build/C/man2/restart_syscall.2:41
2913 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
2914 msgstr "I<注>: このシステムコールには、glibc のラッパー関数はない。「注意」の節を参照。"
2915
2916 #. type: Plain text
2917 #: build/C/man2/restart_syscall.2:53
2918 msgid "The B<restart_syscall>()  system call is used to restart certain system calls after a process that was stopped by a signal (e.g., B<SIGSTOP> or B<SIGTSTP>)  is later resumed after receiving a B<SIGCONT> signal.  This system call is designed only for internal use by the kernel."
2919 msgstr ""
2920
2921 #.  These system calls correspond to the special internal errno value
2922 #.  ERESTART_RESTARTBLOCK. Each of the system calls has a "restart"
2923 #.  helper function that is invoked by restart_syscall().
2924 #.  Notable (as at Linux 3.17) is that poll() has such a "restart"
2925 #.  function, but ppoll(), select(), and pselect() do not.
2926 #.  This means that the latter system calls do not take account of the
2927 #.  time spent in the stopped state when restarting.
2928 #. type: Plain text
2929 #: build/C/man2/restart_syscall.2:88
2930 msgid "B<restart_syscall>()  is used for restarting only those system calls that, when restarted, should adjust their time-related parameters\\(emnamely B<poll>(2)  (since Linux 2.6.24), B<nanosleep>(2)  (since Linux 2.6), B<clock_nanosleep>(2)  (since Linux 2.6), and B<futex>(2), when employed with the B<FUTEX_WAIT> (since Linux 2.6.22)  and B<FUTEX_WAIT_BITSET> (since Linux 2.6.31)  operations.  B<restart_syscall>()  restarts the interrupted system call with a time argument that is suitably adjusted to account for the time that has already elapsed (including the time where the process was stopped by a signal).  Without the B<restart_syscall>()  mechanism, restarting these system calls would not correctly deduct the already elapsed time when the process continued execution."
2931 msgstr ""
2932
2933 #. type: Plain text
2934 #: build/C/man2/restart_syscall.2:92
2935 msgid "The return value of B<restart_syscall>()  is the return value of whatever system call is being restarted."
2936 msgstr ""
2937
2938 #. type: Plain text
2939 #: build/C/man2/restart_syscall.2:96
2940 msgid "I<errno> is set as per the errors for whatever system call is being restarted by B<restart_syscall>()."
2941 msgstr ""
2942
2943 #. type: Plain text
2944 #: build/C/man2/restart_syscall.2:100
2945 msgid "The B<restart_syscall>()  system call is present since Linux 2.6."
2946 msgstr "B<restart_syscall>() システムコールは Linux 2.6 以降に存在する。"
2947
2948 #. type: Plain text
2949 #: build/C/man2/restart_syscall.2:102
2950 msgid "This system call is Linux-specific."
2951 msgstr "このシステムコールは Linux 固有である。"
2952
2953 #. type: Plain text
2954 #: build/C/man2/restart_syscall.2:106
2955 msgid "There is no glibc wrapper for this system call, because it is intended for use only by the kernel and should never be called by applications."
2956 msgstr ""
2957
2958 #. type: Plain text
2959 #: build/C/man2/restart_syscall.2:128
2960 msgid "The kernel uses B<restart_syscall>()  to ensure that when a system call is restarted after a process has been stopped by a signal and then resumed by B<SIGCONT>, then the time that the process spent in the stopped state is counted against the timeout interval specified in the original system call.  In the case of system calls that take a timeout argument and automatically restart after a stop signal plus B<SIGCONT>, but which do not have the B<restart_syscall>(2)  mechanism built in, then, after the process resumes execution, the time that the process spent in the stop state is I<not> counted against the timeout value.  Notable examples of system calls that suffer this problem are B<ppoll>(2), B<select>(2), and B<pselect>(2)."
2961 msgstr ""
2962
2963 #
2964 #. type: Plain text
2965 #: build/C/man2/restart_syscall.2:135
2966 msgid "From user space, the operation of B<restart_syscall>(2)  is largely invisible: to the process that made the system call that is restarted, it appears as though that system call executed and returned in the usual fashion."
2967 msgstr ""
2968
2969 #.  FIXME . ppoll(2), select(2), and pselect(2)
2970 #.      should probably get the restart_syscall() treatment:
2971 #.      If a select() call is suspended by stop-sig+SIGCONT, the time
2972 #.      spent suspended is *not* deducted when the select() is restarted.
2973 #.  FIXME . check whether recvmmsg() handles stop-sig+SIGCONT properly.
2974 #. type: Plain text
2975 #: build/C/man2/restart_syscall.2:144
2976 msgid "B<sigaction>(2), B<sigreturn>(2), B<signal>(7)"
2977 msgstr "B<sigaction>(2), B<sigreturn>(2), B<signal>(7)"
2978
2979 #. type: TH
2980 #: build/C/man2/rt_sigqueueinfo.2:25
2981 #, no-wrap
2982 msgid "RT_SIGQUEUEINFO"
2983 msgstr "RT_SIGQUEUEINFO"
2984
2985 #. type: TH
2986 #: build/C/man2/rt_sigqueueinfo.2:25
2987 #, no-wrap
2988 msgid "2012-07-13"
2989 msgstr "2012-07-13"
2990
2991 #. type: Plain text
2992 #: build/C/man2/rt_sigqueueinfo.2:28
2993 msgid "rt_sigqueueinfo, rt_tgsigqueueinfo - queue a signal and data"
2994 msgstr ""
2995
2996 #. type: Plain text
2997 #: build/C/man2/rt_sigqueueinfo.2:31
2998 #, no-wrap
2999 msgid "B<int rt_sigqueueinfo(pid_t >I<tgid>B<, int >I<sig>B<, siginfo_t *>I<uinfo>B<);>\n"
3000 msgstr "B<int rt_sigqueueinfo(pid_t >I<tgid>B<, int >I<sig>B<, siginfo_t *>I<uinfo>B<);>\n"
3001
3002 #. type: Plain text
3003 #: build/C/man2/rt_sigqueueinfo.2:34
3004 #, no-wrap
3005 msgid ""
3006 "B<int rt_tgsigqueueinfo(pid_t >I<tgid>B<, pid_t >I<tid>B<, int >I<sig>B<,>\n"
3007 "B<                      siginfo_t *>I<uinfo>B<);>\n"
3008 msgstr ""
3009 "B<int rt_tgsigqueueinfo(pid_t >I<tgid>B<, pid_t >I<tid>B<, int >I<sig>B<,>\n"
3010 "B<                      siginfo_t *>I<uinfo>B<);>\n"
3011
3012 #. type: Plain text
3013 #: build/C/man2/rt_sigqueueinfo.2:38 build/C/man2/sgetmask.2:36
3014 #: build/C/man2/tkill.2:41
3015 msgid "I<Note>: There are no glibc wrappers for these system calls; see NOTES."
3016 msgstr "I<注>: これらのシステムコールには、glibc のラッパー関数はない。「注意」の節を参照。"
3017
3018 #. type: Plain text
3019 #: build/C/man2/rt_sigqueueinfo.2:50
3020 msgid "The B<rt_sigqueueinfo>()  and B<rt_tgsigqueueinfo>()  system calls are the low-level interfaces used to send a signal plus data to a process or thread.  The receiver of the signal can obtain the accompanying data by establishing a signal handler with the B<sigaction>(2)  B<SA_SIGINFO> flag."
3021 msgstr ""
3022
3023 #. type: Plain text
3024 #: build/C/man2/rt_sigqueueinfo.2:56
3025 msgid "These system calls are not intended for direct application use; they are provided to allow the implementation of B<sigqueue>(3)  and B<pthread_sigqueue>(3)."
3026 msgstr ""
3027
3028 #. type: Plain text
3029 #: build/C/man2/rt_sigqueueinfo.2:68
3030 msgid "The B<rt_sigqueueinfo>()  system call sends the signal I<sig> to the thread group with the ID I<tgid>.  (The term \"thread group\" is synonymous with \"process\", and I<tid> corresponds to the traditional UNIX process ID.)  The signal will be delivered to an arbitrary member of the thread group (i.e., one of the threads that is not currently blocking the signal)."
3031 msgstr ""
3032
3033 #. type: Plain text
3034 #: build/C/man2/rt_sigqueueinfo.2:79
3035 msgid "The I<uinfo> argument specifies the data to accompany the signal.  This argument is a pointer to a structure of type I<siginfo_t>, described in B<sigaction>(2)  (and defined by including I<E<lt>sigaction.hE<gt>>).  The caller should set the following fields in this structure:"
3036 msgstr ""
3037
3038 #. type: TP
3039 #: build/C/man2/rt_sigqueueinfo.2:79 build/C/man7/sigevent.7:88
3040 #: build/C/man2/wait.2:316
3041 #, no-wrap
3042 msgid "I<si_code>"
3043 msgstr "I<si_code>"
3044
3045 #.  tkill(2) or
3046 #. type: Plain text
3047 #: build/C/man2/rt_sigqueueinfo.2:95
3048 msgid "This must be one of the B<SI_*> codes in the Linux kernel source file I<include/asm-generic/siginfo.h>, with the restriction that the code must be negative (i.e., cannot be B<SI_USER>, which is used by the kernel to indicate a signal sent by B<kill>(2))  and cannot (since Linux 2.6.39) be B<SI_TKILL> (which is used by the kernel to indicate a signal sent using B<tgkill>(2))."
3049 msgstr ""
3050
3051 #. type: TP
3052 #: build/C/man2/rt_sigqueueinfo.2:95 build/C/man2/wait.2:295
3053 #, no-wrap
3054 msgid "I<si_pid>"
3055 msgstr "I<si_pid>"
3056
3057 #. type: Plain text
3058 #: build/C/man2/rt_sigqueueinfo.2:99
3059 msgid "This should be set to a process ID, typically the process ID of the sender."
3060 msgstr ""
3061
3062 #. type: TP
3063 #: build/C/man2/rt_sigqueueinfo.2:99 build/C/man2/wait.2:298
3064 #, no-wrap
3065 msgid "I<si_uid>"
3066 msgstr "I<si_uid>"
3067
3068 #. type: Plain text
3069 #: build/C/man2/rt_sigqueueinfo.2:103
3070 msgid "This should be set to a user ID, typically the real user ID of the sender."
3071 msgstr ""
3072
3073 #. type: TP
3074 #: build/C/man2/rt_sigqueueinfo.2:103 build/C/man7/sigevent.7:96
3075 #, no-wrap
3076 msgid "I<si_value>"
3077 msgstr "I<si_value>"
3078
3079 #. type: Plain text
3080 #: build/C/man2/rt_sigqueueinfo.2:110
3081 msgid "This field contains the user data to accompany the signal.  For more information, see the description of the last (I<union sigval>)  argument of B<sigqueue>(3)."
3082 msgstr ""
3083
3084 #. type: Plain text
3085 #: build/C/man2/rt_sigqueueinfo.2:117
3086 msgid "Internally, the kernel sets the I<si_signo> field to the value specified in I<sig>, so that the receiver of the signal can also obtain the signal number via that field."
3087 msgstr ""
3088
3089 #. type: Plain text
3090 #: build/C/man2/rt_sigqueueinfo.2:129
3091 msgid "The B<rt_tgsigqueueinfo>()  system call is like B<rt_sigqueueinfo>(), but sends the signal and data to the single thread specified by the combination of I<tgid>, a thread group ID, and I<tid>, a thread in that thread group."
3092 msgstr ""
3093
3094 #. type: Plain text
3095 #: build/C/man2/rt_sigqueueinfo.2:134
3096 msgid "On success, these system calls return 0.  On error, they return -1 and I<errno> is set to indicate the error."
3097 msgstr ""
3098
3099 #. type: TP
3100 #: build/C/man2/rt_sigqueueinfo.2:135 build/C/man3/sigqueue.3:92
3101 #: build/C/man2/sigwaitinfo.2:115 build/C/man2/timer_create.2:178
3102 #, no-wrap
3103 msgid "B<EAGAIN>"
3104 msgstr "B<EAGAIN>"
3105
3106 #. type: Plain text
3107 #: build/C/man2/rt_sigqueueinfo.2:141 build/C/man3/sigqueue.3:98
3108 msgid "The limit of signals which may be queued has been reached.  (See B<signal>(7)  for further information.)"
3109 msgstr "待ち行列に入れられるシグナルの最大数に達した (より詳しい情報は B<signal>(7)  を参照すること)。"
3110
3111 #. type: Plain text
3112 #: build/C/man2/rt_sigqueueinfo.2:148
3113 msgid "I<sig>, I<tgid>, or I<tid> was invalid."
3114 msgstr ""
3115
3116 #. type: Plain text
3117 #: build/C/man2/rt_sigqueueinfo.2:156
3118 msgid "The caller does not have permission to send the signal to the target.  For the required permissions, see B<kill>(2).  Or: I<uinfo-E<gt>si_code> is invalid."
3119 msgstr ""
3120
3121 #. type: Plain text
3122 #: build/C/man2/rt_sigqueueinfo.2:162
3123 msgid "B<rt_sigqueueinfo>(): No thread group matching I<tgid> was found."
3124 msgstr ""
3125
3126 #. type: Plain text
3127 #: build/C/man2/rt_sigqueueinfo.2:169
3128 msgid "B<rt_tgsigqueinfo>(): No thread matching I<tgid> and I<tid> was found."
3129 msgstr ""
3130
3131 #. type: Plain text
3132 #: build/C/man2/rt_sigqueueinfo.2:176
3133 msgid "The B<rt_sigqueueinfo>()  system call was added to Linux in version 2.2.  The B<rt_tgsigqueueinfo>()  system call was added to Linux in version 2.6.31."
3134 msgstr ""
3135
3136 #. type: Plain text
3137 #: build/C/man2/rt_sigqueueinfo.2:178 build/C/man2/sgetmask.2:75
3138 #: build/C/man2/timerfd_create.2:380
3139 msgid "These system calls are Linux-specific."
3140 msgstr "これらのシステムコールは Linux 固有である。"
3141
3142 #. type: Plain text
3143 #: build/C/man2/rt_sigqueueinfo.2:183
3144 msgid "Since these system calls are not intended for application use, there are no glibc wrapper functions; use B<syscall>(2)  in the unlikely case that you want to call them directly."
3145 msgstr "これらのシステムコールはアプリケーションでの使用を目的として用意されたわけではないので、 glibc のラッパー関数は存在しない。おそらくないと思うが、このシステムコールを直接呼び出したい場合は B<syscall>(2) を使うこと。"
3146
3147 #. type: Plain text
3148 #: build/C/man2/rt_sigqueueinfo.2:188
3149 msgid "As with B<kill>(2), the null signal (0) can be used to check if the specified process or thread exists."
3150 msgstr ""
3151
3152 #. type: Plain text
3153 #: build/C/man2/rt_sigqueueinfo.2:196
3154 msgid "B<kill>(2), B<sigaction>(2), B<sigprocmask>(2), B<tgkill>(2), B<pthread_sigqueue>(3), B<sigqueue>(3), B<signal>(7)"
3155 msgstr "B<kill>(2), B<sigaction>(2), B<sigprocmask>(2), B<tgkill>(2), B<pthread_sigqueue>(3), B<sigqueue>(3), B<signal>(7)"
3156
3157 #. type: TH
3158 #: build/C/man2/s390_runtime_instr.2:25
3159 #, no-wrap
3160 msgid "S390_RUNTIME_INSTR"
3161 msgstr ""
3162
3163 #. type: TH
3164 #: build/C/man2/s390_runtime_instr.2:25
3165 #, no-wrap
3166 msgid "2012-12-17"
3167 msgstr "2012-12-17"
3168
3169 #. type: Plain text
3170 #: build/C/man2/s390_runtime_instr.2:28
3171 msgid "s390_runtime_instr - enable/disable s390 CPU run-time instrumentation"
3172 msgstr ""
3173
3174 #. type: Plain text
3175 #: build/C/man2/s390_runtime_instr.2:31
3176 #, no-wrap
3177 msgid "B<#include E<lt>asm/runtime_instr.hE<gt>>\n"
3178 msgstr "B<#include E<lt>asm/runtime_instr.hE<gt>>\n"
3179
3180 #. type: Plain text
3181 #: build/C/man2/s390_runtime_instr.2:33
3182 #, no-wrap
3183 msgid "B<int s390_runtime_instr(int >I<command>B<, int >I<signum>B<);>\n"
3184 msgstr "B<int s390_runtime_instr(int >I<command>B<, int >I<signum>B<);>\n"
3185
3186 #. type: Plain text
3187 #: build/C/man2/s390_runtime_instr.2:39
3188 msgid "The B<s390_runtime_instr>()  system call starts or stops CPU run-time instrumentation for the calling thread."
3189 msgstr ""
3190
3191 #. type: Plain text
3192 #: build/C/man2/s390_runtime_instr.2:47
3193 msgid "The I<command> argument controls whether run-time instrumentation is started (B<S390_RUNTIME_INSTR_START>, 1) or stopped (B<S390_RUNTIME_INSTR_STOP>, 2) for the calling thread."
3194 msgstr ""
3195
3196 #. type: Plain text
3197 #: build/C/man2/s390_runtime_instr.2:54
3198 msgid "The I<signum> argument specifies the number of a real-time signal.  The real-time signal is sent to the thread if the run-time instrumentation buffer is full or if the run-time-instrumentation-halted interrupt occurred."
3199 msgstr ""
3200
3201 #. type: Plain text
3202 #: build/C/man2/s390_runtime_instr.2:65
3203 msgid "On success, B<s390_runtime_instr>()  returns 0 and enables the thread for run-time instrumentation by assigning the thread a default run-time instrumentation control block.  The caller can then read and modify the control block and start the run-time instrumentation.  On error, -1 is returned and I<errno> is set to one of the error codes listed below."
3204 msgstr ""
3205
3206 #. type: Plain text
3207 #: build/C/man2/s390_runtime_instr.2:73
3208 msgid "The value specified in I<command> is not a valid command or the value specified in I<signum> is not a real-time signal number."
3209 msgstr ""
3210
3211 #. type: Plain text
3212 #: build/C/man2/s390_runtime_instr.2:76
3213 msgid "Allocating memory for the run-time instrumentation control block failed."
3214 msgstr ""
3215
3216 #. type: TP
3217 #: build/C/man2/s390_runtime_instr.2:76
3218 #, no-wrap
3219 msgid "B<EOPNOTSUPP>"
3220 msgstr ""
3221
3222 #. type: Plain text
3223 #: build/C/man2/s390_runtime_instr.2:79
3224 msgid "The run-time instrumentation facility is not available."
3225 msgstr ""
3226
3227 #. type: Plain text
3228 #: build/C/man2/s390_runtime_instr.2:81
3229 msgid "This system call is available since Linux 3.7."
3230 msgstr "このシステムコールは Linux 3.7 で初めて登場した。"
3231
3232 #. type: Plain text
3233 #: build/C/man2/s390_runtime_instr.2:84
3234 msgid "This Linux-specific system call is available only on the s390 architecture.  The run-time instrumentation facility is available beginning with System z EC12."
3235 msgstr ""
3236
3237 #. type: Plain text
3238 #: build/C/man2/s390_runtime_instr.2:88
3239 msgid "Glibc does not provide a wrapper for this system call, use B<syscall>(2)  to call it."
3240 msgstr "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>(2) を使用すること。"
3241
3242 #. type: Plain text
3243 #: build/C/man2/s390_runtime_instr.2:91
3244 msgid "B<syscall>(2), B<signal>(7)"
3245 msgstr "B<syscall>(2), B<signal>(7)"
3246
3247 #. type: TH
3248 #: build/C/man2/sgetmask.2:26
3249 #, no-wrap
3250 msgid "SGETMASK"
3251 msgstr "SGETMASK"
3252
3253 #. type: Plain text
3254 #: build/C/man2/sgetmask.2:29
3255 msgid "sgetmask, ssetmask - manipulation of signal mask (obsolete)"
3256 msgstr "sgetmask, ssetmask - シグナルマスクの操作 (廃止予定)"
3257
3258 #. type: Plain text
3259 #: build/C/man2/sgetmask.2:31
3260 msgid "B<long sgetmask(void);>"
3261 msgstr "B<long sgetmask(void);>"
3262
3263 #. type: Plain text
3264 #: build/C/man2/sgetmask.2:33
3265 msgid "B<long ssetmask(long >I<newmask>B<);>"
3266 msgstr "B<long ssetmask(long >I<newmask>B<);>"
3267
3268 #. type: Plain text
3269 #: build/C/man2/sgetmask.2:42
3270 msgid "These system calls are obsolete.  I<Do not use them>; use B<sigprocmask>(2)  instead."
3271 msgstr "これらのシステムコールは廃止予定であり、 「使用しないこと」。 代わりに B<sigprocmask>(2)  を使用すること。"
3272
3273 #. type: Plain text
3274 #: build/C/man2/sgetmask.2:45
3275 msgid "B<sgetmask>()  returns the signal mask of the calling process."
3276 msgstr "B<sgetmask>()  は、呼び出し元プロセスのシグナルマスクを返す。"
3277
3278 #. type: Plain text
3279 #: build/C/man2/sgetmask.2:50
3280 msgid "B<ssetmask>()  sets the signal mask of the calling process to the value given in I<newmask>.  The previous signal mask is returned."
3281 msgstr "B<ssetmask>()  は、呼び出し元プロセスのシグナルマスクを I<newmask> で指定された値に設定し、変更前のシグナルマスクを返す。"
3282
3283 #. type: Plain text
3284 #: build/C/man2/sgetmask.2:59
3285 msgid "The signal masks dealt with by these two system calls are plain bit masks (unlike the I<sigset_t> used by B<sigprocmask>(2)); use B<sigmask>(3)  to create and inspect these masks."
3286 msgstr "これら二つのシステムコールが扱うシグナルマスクは、 単純なビットマスクである (この点が B<sigprocmask>(2)  で使用される I<sigset_t> と異なる)。 これらのマスクを作成したり検査するには B<sigmask>(3)  を使用すること。"
3287
3288 #. type: Plain text
3289 #: build/C/man2/sgetmask.2:64
3290 msgid "B<sgetmask>()  always successfully returns the signal mask.  B<ssetmask>()  always succeeds, and returns the previous signal mask."
3291 msgstr "B<sgetmask>()  は常に成功し、シグナルマスクを返す。 B<ssetmask>()  は常に成功し、直前のシグナルマスクを返す。"
3292
3293 #. type: Plain text
3294 #: build/C/man2/sgetmask.2:66
3295 msgid "These system calls always succeed."
3296 msgstr "これらのシステムコールは常に成功する。"
3297
3298 #.  f6187769dae48234f3877df3c4d99294cc2254fa
3299 #. type: Plain text
3300 #: build/C/man2/sgetmask.2:73
3301 msgid "Since Linux 3.16, support for these system calls is optional, depending on whether the kernel was built with the B<CONFIG_SGETMASK_SYSCALL> option."
3302 msgstr "Linux 3.16 以降では、これらのシステムコールのサポートは任意となり、利用できるかはカーネルが B<CONFIG_SGETMASK_SYSCALL> オプションを有効にしてコンパイルされているかに依存する。"
3303
3304 #. type: Plain text
3305 #: build/C/man2/sgetmask.2:79
3306 msgid "Glibc does not provide wrappers for these obsolete system calls; in the unlikely event that you want to call them, use B<syscall>(2)."
3307 msgstr "glibc はこれらの古いシステムコールに対するラッパー関数を提供していない。 あまりないと思うが、これらを呼び出したい場合には B<syscall>(2) を使うこと。"
3308
3309 #. type: Plain text
3310 #: build/C/man2/sgetmask.2:82
3311 msgid "These system calls are unaware of signal numbers greater than 31 (i.e., real-time signals)."
3312 msgstr "これらのシステムコールは、 31 より大きいシグナル番号 (つまり、リアルタイムシグナル) を扱えない。"
3313
3314 #. type: Plain text
3315 #: build/C/man2/sgetmask.2:84
3316 msgid "These system calls do not exist on x86-64."
3317 msgstr "これらのシステムコールは x86-64 には存在しない。"
3318
3319 #. type: Plain text
3320 #: build/C/man2/sgetmask.2:89
3321 msgid "It is not possible to block B<SIGSTOP> or B<SIGKILL>."
3322 msgstr "B<SIGSTOP> や B<SIGKILL> をブロックすることはできない。"
3323
3324 #. type: Plain text
3325 #: build/C/man2/sgetmask.2:92
3326 msgid "B<sigprocmask>(2), B<signal>(7)"
3327 msgstr "B<sigprocmask>(2), B<signal>(7)"
3328
3329 #. type: TH
3330 #: build/C/man2/sigaction.2:49
3331 #, no-wrap
3332 msgid "SIGACTION"
3333 msgstr "SIGACTION"
3334
3335 #. type: TH
3336 #: build/C/man2/sigaction.2:49
3337 #, no-wrap
3338 msgid "2015-01-22"
3339 msgstr "2015-01-22"
3340
3341 #. type: Plain text
3342 #: build/C/man2/sigaction.2:52
3343 msgid "sigaction - examine and change a signal action"
3344 msgstr "sigaction - シグナルの動作の確認と変更"
3345
3346 #. type: Plain text
3347 #: build/C/man2/sigaction.2:58
3348 #, no-wrap
3349 msgid ""
3350 "B<int sigaction(int >I<signum>B<, const struct sigaction *>I<act>B<,>\n"
3351 "B<              struct sigaction *>I<oldact>B<);>\n"
3352 msgstr ""
3353 "B<int sigaction(int >I<signum>B<, const struct sigaction *>I<act>B<,>\n"
3354 "B<              struct sigaction *>I<oldact>B<);>\n"
3355
3356 #. type: Plain text
3357 #: build/C/man2/sigaction.2:68
3358 msgid "B<sigaction>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
3359 msgstr "B<sigaction>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
3360
3361 #. type: Plain text
3362 #: build/C/man2/sigaction.2:71
3363 msgid "I<siginfo_t>: _POSIX_C_SOURCE E<gt>= 199309L"
3364 msgstr "I<siginfo_t>: _POSIX_C_SOURCE E<gt>= 199309L"
3365
3366 #. type: Plain text
3367 #: build/C/man2/sigaction.2:80
3368 msgid "The B<sigaction>()  system call is used to change the action taken by a process on receipt of a specific signal.  (See B<signal>(7)  for an overview of signals.)"
3369 msgstr "B<sigaction>()  システムコールは、特定のシグナルを受信した際の プロセスの動作を変更するのに使用される (シグナルの概要については B<signal>(7)  を参照)。"
3370
3371 #. type: Plain text
3372 #: build/C/man2/sigaction.2:86
3373 msgid "I<signum> specifies the signal and can be any valid signal except B<SIGKILL> and B<SIGSTOP>."
3374 msgstr "I<signum> には、 B<SIGKILL> と B<SIGSTOP> 以外の有効なシグナルをどれでも指定できる。"
3375
3376 #. type: Plain text
3377 #: build/C/man2/sigaction.2:97
3378 msgid "If I<act> is non-NULL, the new action for signal I<signum> is installed from I<act>.  If I<oldact> is non-NULL, the previous action is saved in I<oldact>."
3379 msgstr "I<act> が NULL 以外であれば、シグナル I<signum> の新しい動作 (action) として I<act> が設定される。 I<oldact> が NULL でなければ、今までの動作が I<oldact> に格納される。"
3380
3381 #. type: Plain text
3382 #: build/C/man2/sigaction.2:101
3383 msgid "The I<sigaction> structure is defined as something like:"
3384 msgstr "I<sigaction> 構造体は以下のような感じに定義される。"
3385
3386 #. type: Plain text
3387 #: build/C/man2/sigaction.2:111
3388 #, no-wrap
3389 msgid ""
3390 "struct sigaction {\n"
3391 "    void     (*sa_handler)(int);\n"
3392 "    void     (*sa_sigaction)(int, siginfo_t *, void *);\n"
3393 "    sigset_t   sa_mask;\n"
3394 "    int        sa_flags;\n"
3395 "    void     (*sa_restorer)(void);\n"
3396 "};\n"
3397 msgstr ""
3398 "struct sigaction {\n"
3399 "    void     (*sa_handler)(int);\n"
3400 "    void     (*sa_sigaction)(int, siginfo_t *, void *);\n"
3401 "    sigset_t   sa_mask;\n"
3402 "    int        sa_flags;\n"
3403 "    void     (*sa_restorer)(void);\n"
3404 "};\n"
3405
3406 #. type: Plain text
3407 #: build/C/man2/sigaction.2:118
3408 msgid "On some architectures a union is involved: do not assign to both I<sa_handler> and I<sa_sigaction>."
3409 msgstr "アーキテクチャーによっては共用体 (union) が用いられており、その場合には I<sa_handler> と I<sa_sigaction> の両方を同時に割り当てることはできない。"
3410
3411 #. type: Plain text
3412 #: build/C/man2/sigaction.2:127
3413 msgid "The I<sa_restorer> field is not intended for application use.  (POSIX does not specify a I<sa_restorer> field.)  Some further details of purpose of this field can be found in B<sigreturn>(2)."
3414 msgstr "I<sa_restorer> はアプリケーションが使用することを意図したフィールドではない (POSIX は I<sa_restorer> フィールドを規定していない)。 このフィールドの詳細な目的については B<sigreturn>(2) に書かれている。"
3415
3416 #. type: Plain text
3417 #: build/C/man2/sigaction.2:137
3418 msgid "I<sa_handler> specifies the action to be associated with I<signum> and may be B<SIG_DFL> for the default action, B<SIG_IGN> to ignore this signal, or a pointer to a signal handling function.  This function receives the signal number as its only argument."
3419 msgstr "I<sa_handler> は I<signum> に対応する動作を指定するもので、 デフォルトの動作を行う B<SIG_DFL>、 そのシグナルを無視する B<SIG_IGN>、 シグナルハンドラー関数へのポインターが設定できる。 シグナルハンドラー関数の引き数は一つであり、シグナル番号が引き数として 渡される。"
3420
3421 #. type: Plain text
3422 #: build/C/man2/sigaction.2:159
3423 msgid "If B<SA_SIGINFO> is specified in I<sa_flags>, then I<sa_sigaction> (instead of I<sa_handler>)  specifies the signal-handling function for I<signum>.  This function receives the signal number as its first argument, a pointer to a I<siginfo_t> as its second argument and a pointer to a I<ucontext_t> (cast to I<void\\ *>) as its third argument.  (Commonly, the handler function doesn't make any use of the third argument.  See B<getcontext>(3)  for further information about I<ucontext_t>.)"
3424 msgstr "I<sa_flags> に B<SA_SIGINFO> が指定された場合、 (I<sa_handler> ではなく) I<sa_sigaction> により I<signum> に対応するシグナルハンドラー関数が指定される。指定される関数は、最初の引き数としてシグナル番号を、二番目の引き数として I<siginfo_t> へのポインターを、三番目の引き数として (I<void\\ *> にキャストした) I<ucontext_t> へのポインターを受けとる。 (一般的には、ハンドラー関数の三番目の引き数が使用されない。I<ucontext_t> についての詳しい情報は B<getcontext>(3) を参照。)"
3425
3426 #. type: Plain text
3427 #: build/C/man2/sigaction.2:169
3428 msgid "I<sa_mask> specifies a mask of signals which should be blocked (i.e., added to the signal mask of the thread in which the signal handler is invoked)  during execution of the signal handler.  In addition, the signal which triggered the handler will be blocked, unless the B<SA_NODEFER> flag is used."
3429 msgstr "I<sa_mask> は、シグナルハンドラー実行中に禁止 (block) すべきシグナルのマスクを指定する (ハンドラー実行中のシグナルの禁止は、シグナルハンドラーが起動されたスレッド のシグナルのマスクに追加することで行われる)。 さらに、 B<SA_NODEFER> フラグが指定されていない場合は、ハンドラーを起動するきっかけとなる シグナルにも I<sa_mask> が適用される。"
3430
3431 #. type: Plain text
3432 #: build/C/man2/sigaction.2:173
3433 msgid "I<sa_flags> specifies a set of flags which modify the behavior of the signal.  It is formed by the bitwise OR of zero or more of the following:"
3434 msgstr "I<sa_flags> はシグナルハンドラーの動作を変更するためのフラグの集合を指定する。 I<sa_flags> には、以下に示すフラグの (0 個以上の) 論理和をとったものを指定する。"
3435
3436 #. type: TP
3437 #: build/C/man2/sigaction.2:174
3438 #, no-wrap
3439 msgid "B<SA_NOCLDSTOP>"
3440 msgstr "B<SA_NOCLDSTOP>"
3441
3442 #. type: Plain text
3443 #: build/C/man2/sigaction.2:191
3444 msgid "If I<signum> is B<SIGCHLD>, do not receive notification when child processes stop (i.e., when they receive one of B<SIGSTOP>, B<SIGTSTP>, B<SIGTTIN>, or B<SIGTTOU>)  or resume (i.e., they receive B<SIGCONT>)  (see B<wait>(2)).  This flag is meaningful only when establishing a handler for B<SIGCHLD>."
3445 msgstr "I<signum> が B<SIGCHLD> の場合、 子プロセスが停止したり (子プロセスが B<SIGSTOP>, B<SIGTSTP>, B<SIGTTIN>, B<SIGTTOU> を受けたとき) 再開したり (子プロセスが B<SIGCONT> を受けたとき) したときに B<SIGCHLD> の通知を受けない。 このフラグは、 B<SIGCHLD> に対してハンドラーを設定する際にのみ意味を持つ。"
3446
3447 #. type: TP
3448 #: build/C/man2/sigaction.2:191
3449 #, no-wrap
3450 msgid "B<SA_NOCLDWAIT> (since Linux 2.6)"
3451 msgstr "B<SA_NOCLDWAIT> (Linux 2.6 以降)"
3452
3453 #.  To be precise: Linux 2.5.60 -- MTK
3454 #. type: Plain text
3455 #: build/C/man2/sigaction.2:205
3456 msgid "If I<signum> is B<SIGCHLD>, do not transform children into zombies when they terminate.  See also B<waitpid>(2).  This flag is meaningful only when establishing a handler for B<SIGCHLD>, or when setting that signal's disposition to B<SIG_DFL>."
3457 msgstr "(Linux 2.6 以降)  I<signum> が B<SIGCHLD> の場合、子プロセスが終了したときに 子プロセスをゾンビプロセスに変化させない (B<waitpid>(2)  も参照)。 このフラグは、 B<SIGCHLD> に対してハンドラーを設定する際、もしくはそのシグナルの処理方法を B<SIG_DFL> に設定する際にのみ意味を持つ。"
3458
3459 #. type: Plain text
3460 #: build/C/man2/sigaction.2:217
3461 msgid "If the B<SA_NOCLDWAIT> flag is set when establishing a handler for B<SIGCHLD>, POSIX.1 leaves it unspecified whether a B<SIGCHLD> signal is generated when a child process terminates.  On Linux, a B<SIGCHLD> signal is generated in this case; on some other implementations, it is not."
3462 msgstr "B<SIGCHLD> に対してハンドラーを設定する際に B<SA_NOCLDWAIT> フラグをセットした場合、 子プロセスが終了した際に B<SIGCHLD> シグナルが生成されるかどうかは、 POSIX.1 では規定されていない。 Linux では、この状況で B<SIGCHLD> シグナルは生成される。 いくつかの他の実装では生成されない。"
3463
3464 #. type: TP
3465 #: build/C/man2/sigaction.2:217
3466 #, no-wrap
3467 msgid "B<SA_NODEFER>"
3468 msgstr "B<SA_NODEFER>"
3469
3470 #. type: Plain text
3471 #: build/C/man2/sigaction.2:224
3472 msgid "Do not prevent the signal from being received from within its own signal handler.  This flag is meaningful only when establishing a signal handler.  B<SA_NOMASK> is an obsolete, nonstandard synonym for this flag."
3473 msgstr "それ自身のシグナルハンドラーの内部にいる時でも そのシグナルをマスクしないようにする。 このフラグはシグナルハンドラーを設定する際にのみ意味を持つ。 B<SA_NOMASK> はこのフラグと同じ意味だが、廃止されており、非標準である。"
3474
3475 #. type: TP
3476 #: build/C/man2/sigaction.2:224
3477 #, no-wrap
3478 msgid "B<SA_ONSTACK>"
3479 msgstr "B<SA_ONSTACK>"
3480
3481 #. type: Plain text
3482 #: build/C/man2/sigaction.2:230
3483 msgid "Call the signal handler on an alternate signal stack provided by B<sigaltstack>(2).  If an alternate stack is not available, the default stack will be used.  This flag is meaningful only when establishing a signal handler."
3484 msgstr "B<sigaltstack>(2)  で提供される別のシグナルスタックでシグナルハンドラーを呼び出す。 別のシグナルスタックが利用可能でなければ、デフォルトのスタックが 使用される。 このフラグはシグナルハンドラーを設定する際にのみ意味を持つ。"
3485
3486 #. type: TP
3487 #: build/C/man2/sigaction.2:230
3488 #, no-wrap
3489 msgid "B<SA_RESETHAND>"
3490 msgstr "B<SA_RESETHAND>"
3491
3492 #. type: Plain text
3493 #: build/C/man2/sigaction.2:236
3494 msgid "Restore the signal action to the default upon entry to the signal handler.  This flag is meaningful only when establishing a signal handler.  B<SA_ONESHOT> is an obsolete, nonstandard synonym for this flag."
3495 msgstr "シグナルハンドラーを設定する際に、シグナルの動作をデフォルトに戻す。 このフラグはシグナルハンドラーを設定する際にのみ意味を持つ。 B<SA_ONESHOT> はこのフラグと同じ意味だが、廃止されており、非標準である。"
3496
3497 #. type: TP
3498 #: build/C/man2/sigaction.2:236
3499 #, no-wrap
3500 msgid "B<SA_RESTART>"
3501 msgstr "B<SA_RESTART>"
3502
3503 #. type: Plain text
3504 #: build/C/man2/sigaction.2:244
3505 msgid "Provide behavior compatible with BSD signal semantics by making certain system calls restartable across signals.  This flag is meaningful only when establishing a signal handler.  See B<signal>(7)  for a discussion of system call restarting."
3506 msgstr "いくつかのシステムコールをシグナルの通知の前後で再開できるようにして、 BSD シグナル方式 (semantics) と互換性のある動作を提供する。 このフラグはシグナルハンドラーを設定する際にのみ意味を持つ。 B<signal>(7)  に書かれているシステムコールの再開に関する議論を参照のこと。"
3507
3508 #. type: TP
3509 #: build/C/man2/sigaction.2:244
3510 #, no-wrap
3511 msgid "B<SA_RESTORER>"
3512 msgstr "B<SA_RESTORER>"
3513
3514 #. type: Plain text
3515 #: build/C/man2/sigaction.2:253
3516 msgid "I<Not intended for application use>.  This flag is used by C libraries to indicate that the I<sa_restorer> field contains the address of a \"signal trampoline\".  See B<sigreturn>(2)  for more details."
3517 msgstr "I<アプリケーションでの使用を意図したものではない>。 このフラグは C ライブラリが I<sa_restorer> フィールドに \"signal trampoline\" のアドレスが入っていることを示すために使用される。 詳細は B<sigreturn>(2) を参照。"
3518
3519 #. type: TP
3520 #: build/C/man2/sigaction.2:253
3521 #, no-wrap
3522 msgid "B<SA_SIGINFO> (since Linux 2.2)"
3523 msgstr "B<SA_SIGINFO> (Linux 2.2 以降)"
3524
3525 #.  (The
3526 #.  .I sa_sigaction
3527 #.  field was added in Linux 2.1.86.)
3528 #. type: Plain text
3529 #: build/C/man2/sigaction.2:264
3530 msgid "The signal handler takes three arguments, not one.  In this case, I<sa_sigaction> should be set instead of I<sa_handler>.  This flag is meaningful only when establishing a signal handler."
3531 msgstr "シグナルハンドラーは一つではなく、三つの引き数を持つ。この場合は I<sa_handler> のかわりに I<sa_sigaction> を設定しなければならない このフラグはシグナルハンドラーを設定する際にのみ意味を持つ。"
3532
3533 #. type: Plain text
3534 #: build/C/man2/sigaction.2:271
3535 msgid "The I<siginfo_t> argument to I<sa_sigaction> is a struct with the following fields:"
3536 msgstr "I<sa_sigaction> のパラメーター I<siginfo_t> は以下のフィールドを持つ構造体である:"
3537
3538 #.  FIXME
3539 #.  The siginfo_t 'si_trapno' field seems to be used only on SPARC and Alpha;
3540 #.  this page could use a little more detail on its purpose there.
3541 #.  In the kernel: si_tid
3542 #. type: Plain text
3543 #: build/C/man2/sigaction.2:309
3544 #, no-wrap
3545 msgid ""
3546 "siginfo_t {\n"
3547 "    int      si_signo;     /* Signal number */\n"
3548 "    int      si_errno;     /* An errno value */\n"
3549 "    int      si_code;      /* Signal code */\n"
3550 "    int      si_trapno;    /* Trap number that caused\n"
3551 "                              hardware-generated signal\n"
3552 "                              (unused on most architectures) */\n"
3553 "    pid_t    si_pid;       /* Sending process ID */\n"
3554 "    uid_t    si_uid;       /* Real user ID of sending process */\n"
3555 "    int      si_status;    /* Exit value or signal */\n"
3556 "    clock_t  si_utime;     /* User time consumed */\n"
3557 "    clock_t  si_stime;     /* System time consumed */\n"
3558 "    sigval_t si_value;     /* Signal value */\n"
3559 "    int      si_int;       /* POSIX.1b signal */\n"
3560 "    void    *si_ptr;       /* POSIX.1b signal */\n"
3561 "    int      si_overrun;   /* Timer overrun count;\n"
3562 "                              POSIX.1b timers */\n"
3563 "    int      si_timerid;   /* Timer ID; POSIX.1b timers */\n"
3564 "    void    *si_addr;      /* Memory location which caused fault */\n"
3565 "    long     si_band;      /* Band event (was I<int> in\n"
3566 "                              glibc 2.3.2 and earlier) */\n"
3567 "    int      si_fd;        /* File descriptor */\n"
3568 "    short    si_addr_lsb;  /* Least significant bit of address\n"
3569 "                              (since Linux 2.6.32) */\n"
3570 "    void    *si_call_addr; /* Address of system call instruction\n"
3571 "                              (since Linux 3.5) */\n"
3572 "    int      si_syscall;   /* Number of attempted system call\n"
3573 "                              (since Linux 3.5) */\n"
3574 "    unsigned int si_arch;  /* Architecture of attempted system call\n"
3575 "                              (since Linux 3.5) */\n"
3576 "}\n"
3577 msgstr ""
3578 "siginfo_t {\n"
3579 "    int      si_signo;     /* Signal number */\n"
3580 "    int      si_errno;     /* An errno value */\n"
3581 "    int      si_code;      /* Signal code */\n"
3582 "    int      si_trapno;    /* Trap number that caused\n"
3583 "                              hardware-generated signal\n"
3584 "                              (unused on most architectures) */\n"
3585 "    pid_t    si_pid;       /* Sending process ID */\n"
3586 "    uid_t    si_uid;       /* Real user ID of sending process */\n"
3587 "    int      si_status;    /* Exit value or signal */\n"
3588 "    clock_t  si_utime;     /* User time consumed */\n"
3589 "    clock_t  si_stime;     /* System time consumed */\n"
3590 "    sigval_t si_value;     /* Signal value */\n"
3591 "    int      si_int;       /* POSIX.1b signal */\n"
3592 "    void    *si_ptr;       /* POSIX.1b signal */\n"
3593 "    int      si_overrun;   /* Timer overrun count;\n"
3594 "                              POSIX.1b timers */\n"
3595 "    int      si_timerid;   /* Timer ID; POSIX.1b timers */\n"
3596 "    void    *si_addr;      /* Memory location which caused fault */\n"
3597 "    long     si_band;      /* Band event (was I<int> in\n"
3598 "                              glibc 2.3.2 and earlier) */\n"
3599 "    int      si_fd;        /* File descriptor */\n"
3600 "    short    si_addr_lsb;  /* Least significant bit of address\n"
3601 "                              (since Linux 2.6.32) */\n"
3602 "    void    *si_call_addr; /* Address of system call instruction\n"
3603 "                              (since Linux 3.5) */\n"
3604 "    int      si_syscall;   /* Number of attempted system call\n"
3605 "                              (since Linux 3.5) */\n"
3606 "    unsigned int si_arch;  /* Architecture of attempted system call\n"
3607 "                              (since Linux 3.5) */\n"
3608 "}\n"
3609
3610 #. type: Plain text
3611 #: build/C/man2/sigaction.2:318
3612 msgid "I<si_signo>, I<si_errno> and I<si_code> are defined for all signals.  (I<si_errno> is generally unused on Linux.)  The rest of the struct may be a union, so that one should read only the fields that are meaningful for the given signal:"
3613 msgstr "I<si_signo>, I<si_errno>, I<si_code> は全てのシグナルに対して定義されている (I<si_errno> は Linux では一般的には使用されない)。 構造体の残りの部分は、共用体 (union) になっているかもしれない。 その場合は該当するシグナルにおいて意味のあるフィールドのみを読み込む ことができる。"
3614
3615 #. type: Plain text
3616 #: build/C/man2/sigaction.2:333
3617 msgid "Signals sent with B<kill>(2)  and B<sigqueue>(3)  fill in I<si_pid> and I<si_uid>.  In addition, signals sent with B<sigqueue>(3)  fill in I<si_int> and I<si_ptr> with the values specified by the sender of the signal; see B<sigqueue>(3)  for more details."
3618 msgstr "B<kill>(2) や B<sigqueue>(3) で送信されたシグナルでは I<si_pid> と I<si_uid> が設定される。 さらに、 B<sigqueue>(3) で送信されたシグナルでは I<si_int> と I<si_pid> にシグナルの送信者により指定された値が設定される。詳細は B<sigqueue>(3) を参照。"
3619
3620 #. type: Plain text
3621 #: build/C/man2/sigaction.2:349
3622 msgid "Signals sent by POSIX.1b timers (since Linux 2.6) fill in I<si_overrun> and I<si_timerid>.  The I<si_timerid> field is an internal ID used by the kernel to identify the timer; it is not the same as the timer ID returned by B<timer_create>(2).  The I<si_overrun> field is the timer overrun count; this is the same information as is obtained by a call to B<timer_getoverrun>(2).  These fields are nonstandard Linux extensions."
3623 msgstr "POSIX.1b タイマー (Linux 2.6 以降) は I<si_overrun> と I<si_timerid> を設定する。 I<si_timerid> フィールドはカーネルがタイマーを特定するのに使用する内部 ID であり、 B<timer_create>(2) が返すタイマー ID と同じではない。 I<si_overrun> フィールドはタイマーが回り切った回数である。 これは B<timer_getoverrun>(2) の呼び出しで取得できる情報と同じである。 これらのフィールドは非標準で Linux による拡張である。"
3624
3625 #. type: Plain text
3626 #: build/C/man2/sigaction.2:364
3627 msgid "Signals sent for message queue notification (see the description of B<SIGEV_SIGNAL> in B<mq_notify>(3))  fill in I<si_int>/I<si_ptr>, with the I<sigev_value> supplied to B<mq_notify>(3); I<si_pid>, with the process ID of the message sender; and I<si_uid>, with the real user ID of the message sender."
3628 msgstr "メッセージキューの通知用に送信されたシグナル (B<mq_notify>(3) の B<SIGEV_SIGNAL> の説明を参照) では、 I<si_int>/I<si_ptr> に B<mq_notify>(3) に渡された I<sigev_value> が設定される。 I<si_pid> にはメッセージ送信者のプロセス ID が設定され、 I<si_uid> にはメッセージ送信者の実ユーザー ID が設定される。"
3629
3630 #.  FIXME .
3631 #.  When si_utime and si_stime where originally implemented, the
3632 #.  measurement unit was HZ, which was the same as clock ticks
3633 #.  (sysconf(_SC_CLK_TCK)).  In 2.6, HZ became configurable, and
3634 #.  was *still* used as the unit to return the info these fields,
3635 #.  with the result that the field values depended on the the
3636 #.  configured HZ.  Of course, the should have been measured in
3637 #.  USER_HZ instead, so that sysconf(_SC_CLK_TCK) could be used to
3638 #.  convert to seconds.  I have a queued patch to fix this:
3639 #.  http://thread.gmane.org/gmane.linux.kernel/698061/ .
3640 #.  This patch made it into 2.6.27.
3641 #.  But note that these fields still don't return the times of
3642 #.  waited-for children (as is done by getrusage() and times()
3643 #.  and wait4()).  Solaris 8 does include child times.
3644 #. type: Plain text
3645 #: build/C/man2/sigaction.2:411
3646 msgid "B<SIGCHLD> fills in I<si_pid>, I<si_uid>, I<si_status>, I<si_utime>, and I<si_stime>, providing information about the child.  The I<si_pid> field is the process ID of the child; I<si_uid> is the child's real user ID.  The I<si_status> field contains the exit status of the child (if I<si_code> is B<CLD_EXITED>), or the signal number that caused the process to change state.  The I<si_utime> and I<si_stime> contain the user and system CPU time used by the child process; these fields do not include the times used by waited-for children (unlike B<getrusage>(2)  and B<times>(2)).  In kernels up to 2.6, and since 2.6.27, these fields report CPU time in units of I<sysconf(_SC_CLK_TCK)>.  In 2.6 kernels before 2.6.27, a bug meant that these fields reported time in units of the (configurable) system jiffy (see B<time>(7))."
3647 msgstr "B<SIGCHLD> は I<si_pid>, I<si_uid>, I<si_status>, I<si_utime>, I<si_stime> を設定し、子プロセスに関する情報を提供する。 I<si_pid> フィールドは子プロセスのプロセス ID で、 I<si_uid> フィールドは子プロセスの実ユーザー ID である。 I<si_stime> フィールドには、 (I<si_code> が B<CLD_EXITED> の場合は) 子プロセスの終了ステータスが、それ以外の場合は状態が変化する原因となったシグナル番号が格納される。 I<si_utime> と I<si_stime> には子プロセスが使用したユーザー CPU 時間とシステム CPU 時間がそれぞれ格納される。(B<getrusage>(2) や B<times>(2) と異なり) これらのフィールドには wait 待ちの子プロセスにより使用された時間は含まれない。 2.6 より前と 2.6.27 以降のカーネルでは、 これらのフィールドに格納される CPU 時間の単位は I<sysconf(_SC_CLK_TCK)> である。 2.6.27 より前の 2.6 系のカーネルでは、バグがあり、 これらのフィールドの CPU 時間の単位が (カーネルのコンフィグで指定される) システムの jiffy であった (B<time>(7) 参照)。"
3648
3649 #. type: Plain text
3650 #: build/C/man2/sigaction.2:458
3651 msgid "B<SIGILL>, B<SIGFPE>, B<SIGSEGV>, B<SIGBUS>, and B<SIGTRAP> fill in I<si_addr> with the address of the fault.  On some architectures, these signals also fill in the I<si_trapno> field.  Some suberrors of B<SIGBUS>, in particular B<BUS_MCEERR_AO> and B<BUS_MCEERR_AR>, also fill in I<si_addr_lsb>.  This field indicates the least significant bit of the reported address and therefore the extent of the corruption.  For example, if a full page was corrupted, I<si_addr_lsb> contains I<log2(sysconf(_SC_PAGESIZE))>.  When B<SIGTRAP> is delivered in response to a B<ptrace>(2)  event (PTRACE_EVENT_foo), I<si_addr> is not populated, but I<si_pid> and I<si_uid> are populated with the respective process ID and user ID responsible for delivering the trap.  In the case of B<seccomp>(2), the tracee will be shown as delivering the event.  B<BUS_MCEERR_*> and I<si_addr_lsb> are Linux-specific extensions."
3652 msgstr "B<SIGILL>, B<SIGFPE>, B<SIGSEGV>, B<SIGBUS>, B<SIGTRAP> では、 I<si_addr> に fault が発生したアドレスが設定される。 いくつかのアーキテクチャーでは、 これらのシグナルは I<si_trapno> フィールドにも設定される。 B<SIGBUS> が発生するエラーのいくつか、特に B<BUS_MCEERR_AO> と B<BUS_MCEERR_AR> では、 I<si_addr_lsb> も設定される。 このフィールドは報告されるアドレスの最下位ビットを示し、 これによりメモリー破壊の程度を知ることができる。 例えば、ページ全体が壊れている場合には I<si_addr_lsb> には I<log2(sysconf(_SC_PAGESIZE))> が入る。 B<SIGTRAP> が B<ptrace>(2) イベント (PTRACE_EVENT_foo) に対応して配送される際、 I<si_addr> は設定されないが、 I<si_pid> と I<si_uid> にはトラップの配送に責任を負うプロセス ID とユーザー ID がそれぞれ格納される。 B<seccomp>(2) の場合、 トレース対象はイベントを配送した元として示される。 B<BUS_MCEERR_*> と I<si_addr_lsb> は Linux 固有の拡張である。"
3653
3654 #. type: Plain text
3655 #: build/C/man2/sigaction.2:472
3656 msgid "B<SIGIO>/B<SIGPOLL> (the two names are synonyms on Linux)  fills in I<si_band> and I<si_fd>.  The I<si_band> event is a bit mask containing the same values as are filled in the I<revents> field by B<poll>(2).  The I<si_fd> field indicates the file descriptor for which the I/O event occurred."
3657 msgstr "B<SIGIO>/B<SIGPOLL> (2 つの名前は Linux では同義語) では I<si_band> と I<si_fd> が設定される。 I<si_band> イベントは、 B<poll>(2) が I<revents> フィールドに設定するのと同じ値が入ったビットマスクである。 I<si_fd> フィールドは I/O イベントが発生したファイルディスクリプターを示す。"
3658
3659 #.  commit a0727e8ce513fe6890416da960181ceb10fbfae6
3660 #. type: Plain text
3661 #: build/C/man2/sigaction.2:485
3662 msgid "B<SIGSYS>, generated (since Linux 3.5)  when a seccomp filter returns B<SECCOMP_RET_TRAP>, fills in I<si_call_addr>, I<si_syscall>, I<si_arch>, I<si_errno>, and other fields as described in B<seccomp>(2)."
3663 msgstr "seccomp フィルターが B<SECCOMP_RET_TRAP> を返す際に (Linux 3.5 以降で) 生成される B<SIGSYS> シグナルでは、 I<si_call_addr>, I<si_syscall>, I<si_arch>, I<si_arch> や B<seccomp>(2) で説明されている他のフィールドが設定される。"
3664
3665 #. type: Plain text
3666 #: build/C/man2/sigaction.2:495
3667 msgid "I<si_code> is a value (not a bit mask) indicating why this signal was sent.  For a B<ptrace>(2)  event, I<si_code> will contain B<SIGTRAP> and have the ptrace event in the high byte:"
3668 msgstr "I<si_code> は、そのシグナルが送信された理由を示す値である (ビットマスクではない)。 B<ptrace>(2) イベントでは、 I<si_code> には B<SIGTRAP> が入り、 上位バイトには ptrace イベントが入る。"
3669
3670 #. type: Plain text
3671 #: build/C/man2/sigaction.2:498
3672 #, no-wrap
3673 msgid "    (SIGTRAP | PTRACE_EVENT_foo E<lt>E<lt> 8).\n"
3674 msgstr "    (SIGTRAP | PTRACE_EVENT_foo E<lt>E<lt> 8).\n"
3675
3676 #. type: Plain text
3677 #: build/C/man2/sigaction.2:504
3678 msgid "For a regular signal, the following list shows the values which can be placed in I<si_code> for any signal, along with reason that the signal was generated."
3679 msgstr "通常のシグナルの場合には、 以下のリストに示す値がどのシグナルの場合でも I<si_code> に入りうる。シグナルが生成された理由も記載している。"
3680
3681 #. type: TP
3682 #: build/C/man2/sigaction.2:505
3683 #, no-wrap
3684 msgid "B<SI_USER>"
3685 msgstr "B<SI_USER>"
3686
3687 #. type: Plain text
3688 #: build/C/man2/sigaction.2:508
3689 msgid "B<kill>(2)."
3690 msgstr "B<kill>(2)"
3691
3692 #. type: TP
3693 #: build/C/man2/sigaction.2:508
3694 #, no-wrap
3695 msgid "B<SI_KERNEL>"
3696 msgstr "B<SI_KERNEL>"
3697
3698 #. type: Plain text
3699 #: build/C/man2/sigaction.2:511
3700 msgid "Sent by the kernel."
3701 msgstr "カーネルにより送信された"
3702
3703 #. type: TP
3704 #: build/C/man2/sigaction.2:511
3705 #, no-wrap
3706 msgid "B<SI_QUEUE>"
3707 msgstr "B<SI_QUEUE>"
3708
3709 #. type: Plain text
3710 #: build/C/man2/sigaction.2:514
3711 msgid "B<sigqueue>(3)."
3712 msgstr "B<sigqueue>(3)"
3713
3714 #. type: TP
3715 #: build/C/man2/sigaction.2:514
3716 #, no-wrap
3717 msgid "B<SI_TIMER>"
3718 msgstr "B<SI_TIMER>"
3719
3720 #. type: Plain text
3721 #: build/C/man2/sigaction.2:517
3722 msgid "POSIX timer expired."
3723 msgstr "POSIX タイマーが満了した"
3724
3725 #. type: TP
3726 #: build/C/man2/sigaction.2:517
3727 #, no-wrap
3728 msgid "B<SI_MESGQ> (since Linux 2.6.6)"
3729 msgstr "B<SI_MESGQ> (Linux 2.6.6 以降)"
3730
3731 #. type: Plain text
3732 #: build/C/man2/sigaction.2:521
3733 msgid "POSIX message queue state changed; see B<mq_notify>(3)."
3734 msgstr "POSIX メッセージキューの状態が変化した; B<mq_notify>(3) 参照"
3735
3736 #. type: TP
3737 #: build/C/man2/sigaction.2:521
3738 #, no-wrap
3739 msgid "B<SI_ASYNCIO>"
3740 msgstr "B<SI_ASYNCIO>"
3741
3742 #. type: Plain text
3743 #: build/C/man2/sigaction.2:524
3744 msgid "AIO completed."
3745 msgstr "非同期 IO (AIO) が完了した"
3746
3747 #. type: TP
3748 #: build/C/man2/sigaction.2:524
3749 #, no-wrap
3750 msgid "B<SI_SIGIO>"
3751 msgstr "B<SI_SIGIO>"
3752
3753 #. type: Plain text
3754 #: build/C/man2/sigaction.2:533
3755 msgid "Queued B<SIGIO> (only in kernels up to Linux 2.2; from Linux 2.4 onward B<SIGIO>/B<SIGPOLL> fills in I<si_code> as described below)."
3756 msgstr "B<SIGIO> がキューイングされた (Linux 2.2 以下のカーネルのみ; Linux 2.4 以降では以下で説明する B<SIGIO>/B<SIGPOLL> の I<si_code> が入る)"
3757
3758 #. type: TP
3759 #: build/C/man2/sigaction.2:533
3760 #, no-wrap
3761 msgid "B<SI_TKILL> (since Linux 2.4.19)"
3762 msgstr "B<SI_TKILL> (Linux 2.4.19 以降)"
3763
3764 #.  SI_DETHREAD is defined in 2.6.9 sources, but isn't implemented
3765 #.  It appears to have been an idea that was tried during 2.5.6
3766 #.  through to 2.5.24 and then was backed out.
3767 #. type: Plain text
3768 #: build/C/man2/sigaction.2:541
3769 msgid "B<tkill>(2)  or B<tgkill>(2)."
3770 msgstr "B<tkill>(2) または B<tgkill>(2)"
3771
3772 #. type: Plain text
3773 #: build/C/man2/sigaction.2:548
3774 msgid "The following values can be placed in I<si_code> for a B<SIGILL> signal:"
3775 msgstr "B<SIGILL> シグナルの場合、 I<si_code> には以下の値が入る可能性がある:"
3776
3777 #. type: TP
3778 #: build/C/man2/sigaction.2:549
3779 #, no-wrap
3780 msgid "B<ILL_ILLOPC>"
3781 msgstr "B<ILL_ILLOPC>"
3782
3783 #. type: Plain text
3784 #: build/C/man2/sigaction.2:552
3785 msgid "Illegal opcode."
3786 msgstr "不正な命令コード"
3787
3788 #. type: TP
3789 #: build/C/man2/sigaction.2:552
3790 #, no-wrap
3791 msgid "B<ILL_ILLOPN>"
3792 msgstr "B<ILL_ILLOPN>"
3793
3794 #. type: Plain text
3795 #: build/C/man2/sigaction.2:555
3796 msgid "Illegal operand."
3797 msgstr "不正なオペランド"
3798
3799 #. type: TP
3800 #: build/C/man2/sigaction.2:555
3801 #, no-wrap
3802 msgid "B<ILL_ILLADR>"
3803 msgstr "B<ILL_ILLADR>"
3804
3805 #. type: Plain text
3806 #: build/C/man2/sigaction.2:558
3807 msgid "Illegal addressing mode."
3808 msgstr "不正なアドレッシングモード"
3809
3810 #. type: TP
3811 #: build/C/man2/sigaction.2:558
3812 #, no-wrap
3813 msgid "B<ILL_ILLTRP>"
3814 msgstr "B<ILL_ILLTRP>"
3815
3816 #. type: Plain text
3817 #: build/C/man2/sigaction.2:561
3818 msgid "Illegal trap."
3819 msgstr "不正なトラップ"
3820
3821 #. type: TP
3822 #: build/C/man2/sigaction.2:561
3823 #, no-wrap
3824 msgid "B<ILL_PRVOPC>"
3825 msgstr "B<ILL_PRVOPC>"
3826
3827 #. type: Plain text
3828 #: build/C/man2/sigaction.2:564
3829 msgid "Privileged opcode."
3830 msgstr "特権が必要な命令コード"
3831
3832 #. type: TP
3833 #: build/C/man2/sigaction.2:564
3834 #, no-wrap
3835 msgid "B<ILL_PRVREG>"
3836 msgstr "B<ILL_PRVREG>"
3837
3838 #. type: Plain text
3839 #: build/C/man2/sigaction.2:567
3840 msgid "Privileged register."
3841 msgstr "特権が必要なレジスター"
3842
3843 #. type: TP
3844 #: build/C/man2/sigaction.2:567
3845 #, no-wrap
3846 msgid "B<ILL_COPROC>"
3847 msgstr "B<ILL_COPROC>"
3848
3849 #. type: Plain text
3850 #: build/C/man2/sigaction.2:570
3851 msgid "Coprocessor error."
3852 msgstr "コプロセッサのエラー"
3853
3854 #. type: TP
3855 #: build/C/man2/sigaction.2:570
3856 #, no-wrap
3857 msgid "B<ILL_BADSTK>"
3858 msgstr "B<ILL_BADSTK>"
3859
3860 #. type: Plain text
3861 #: build/C/man2/sigaction.2:573
3862 msgid "Internal stack error."
3863 msgstr "内部スタックエラー"
3864
3865 #. type: Plain text
3866 #: build/C/man2/sigaction.2:580
3867 msgid "The following values can be placed in I<si_code> for a B<SIGFPE> signal:"
3868 msgstr "B<SIGFPE> シグナルの場合、 I<si_code> には以下の値が入る可能性がある:"
3869
3870 #. type: TP
3871 #: build/C/man2/sigaction.2:581
3872 #, no-wrap
3873 msgid "B<FPE_INTDIV>"
3874 msgstr "B<FPE_INTDIV>"
3875
3876 #. type: Plain text
3877 #: build/C/man2/sigaction.2:584
3878 msgid "Integer divide by zero."
3879 msgstr "整数の 0 による除算"
3880
3881 #. type: TP
3882 #: build/C/man2/sigaction.2:584
3883 #, no-wrap
3884 msgid "B<FPE_INTOVF>"
3885 msgstr "B<FPE_INTOVF>"
3886
3887 #. type: Plain text
3888 #: build/C/man2/sigaction.2:587
3889 msgid "Integer overflow."
3890 msgstr "整数のオーバーフロー"
3891
3892 #. type: TP
3893 #: build/C/man2/sigaction.2:587
3894 #, no-wrap
3895 msgid "B<FPE_FLTDIV>"
3896 msgstr "B<FPE_FLTDIV>"
3897
3898 #. type: Plain text
3899 #: build/C/man2/sigaction.2:590
3900 msgid "Floating-point divide by zero."
3901 msgstr "浮動小数点の 0 による除算"
3902
3903 #. type: TP
3904 #: build/C/man2/sigaction.2:590
3905 #, no-wrap
3906 msgid "B<FPE_FLTOVF>"
3907 msgstr "B<FPE_FLTOVF>"
3908
3909 #. type: Plain text
3910 #: build/C/man2/sigaction.2:593
3911 msgid "Floating-point overflow."
3912 msgstr "浮動小数点のオーバーフロー"
3913
3914 #. type: TP
3915 #: build/C/man2/sigaction.2:593
3916 #, no-wrap
3917 msgid "B<FPE_FLTUND>"
3918 msgstr "B<FPE_FLTUND>"
3919
3920 #. type: Plain text
3921 #: build/C/man2/sigaction.2:596
3922 msgid "Floating-point underflow."
3923 msgstr "浮動小数点のアンダーフロー"
3924
3925 #. type: TP
3926 #: build/C/man2/sigaction.2:596
3927 #, no-wrap
3928 msgid "B<FPE_FLTRES>"
3929 msgstr "B<FPE_FLTRES>"
3930
3931 #. type: Plain text
3932 #: build/C/man2/sigaction.2:599
3933 msgid "Floating-point inexact result."
3934 msgstr "浮動小数点の不正確な演算結果 (inexact result)"
3935
3936 #. type: TP
3937 #: build/C/man2/sigaction.2:599
3938 #, no-wrap
3939 msgid "B<FPE_FLTINV>"
3940 msgstr "B<FPE_FLTINV>"
3941
3942 #. type: Plain text
3943 #: build/C/man2/sigaction.2:602
3944 msgid "Floating-point invalid operation."
3945 msgstr "浮動小数点の不正な操作"
3946
3947 #. type: TP
3948 #: build/C/man2/sigaction.2:602
3949 #, no-wrap
3950 msgid "B<FPE_FLTSUB>"
3951 msgstr "B<FPE_FLTSUB>"
3952
3953 #. type: Plain text
3954 #: build/C/man2/sigaction.2:605
3955 msgid "Subscript out of range."
3956 msgstr "範囲外の添字 (subscript)"
3957
3958 #. type: Plain text
3959 #: build/C/man2/sigaction.2:612
3960 msgid "The following values can be placed in I<si_code> for a B<SIGSEGV> signal:"
3961 msgstr "B<SIGSEGV> シグナルの場合、 I<si_code> には以下の値が入る可能性がある:"
3962
3963 #. type: TP
3964 #: build/C/man2/sigaction.2:613
3965 #, no-wrap
3966 msgid "B<SEGV_MAPERR>"
3967 msgstr "B<SEGV_MAPERR>"
3968
3969 #. type: Plain text
3970 #: build/C/man2/sigaction.2:616
3971 msgid "Address not mapped to object."
3972 msgstr "オブジェクトにマッピングされていないアドレス"
3973
3974 #. type: TP
3975 #: build/C/man2/sigaction.2:616
3976 #, no-wrap
3977 msgid "B<SEGV_ACCERR>"
3978 msgstr "B<SEGV_ACCERR>"
3979
3980 #. type: Plain text
3981 #: build/C/man2/sigaction.2:619
3982 msgid "Invalid permissions for mapped object."
3983 msgstr "マッピングされたオブジェクトに対するアクセス許可がない"
3984
3985 #. type: Plain text
3986 #: build/C/man2/sigaction.2:626
3987 msgid "The following values can be placed in I<si_code> for a B<SIGBUS> signal:"
3988 msgstr "B<SIGBUS> シグナルの場合、 I<si_code> には以下の値が入る可能性がある:"
3989
3990 #. type: TP
3991 #: build/C/man2/sigaction.2:627
3992 #, no-wrap
3993 msgid "B<BUS_ADRALN>"
3994 msgstr "B<BUS_ADRALN>"
3995
3996 #. type: Plain text
3997 #: build/C/man2/sigaction.2:630
3998 msgid "Invalid address alignment."
3999 msgstr "不正なアドレスアライメント (alignment)"
4000
4001 #. type: TP
4002 #: build/C/man2/sigaction.2:630
4003 #, no-wrap
4004 msgid "B<BUS_ADRERR>"
4005 msgstr "B<BUS_ADRERR>"
4006
4007 #. type: Plain text
4008 #: build/C/man2/sigaction.2:633
4009 msgid "Nonexistent physical address."
4010 msgstr "存在しない物理アドレス"
4011
4012 #. type: TP
4013 #: build/C/man2/sigaction.2:633
4014 #, no-wrap
4015 msgid "B<BUS_OBJERR>"
4016 msgstr "B<BUS_OBJERR>"
4017
4018 #. type: Plain text
4019 #: build/C/man2/sigaction.2:636
4020 msgid "Object-specific hardware error."
4021 msgstr "オブジェクト固有のハードウェアエラー"
4022
4023 #. type: TP
4024 #: build/C/man2/sigaction.2:636
4025 #, no-wrap
4026 msgid "B<BUS_MCEERR_AR> (since Linux 2.6.32)"
4027 msgstr "B<BUS_MCEERR_AR> (Linux 2.6.32 以降)"
4028
4029 #. type: Plain text
4030 #: build/C/man2/sigaction.2:639
4031 msgid "Hardware memory error consumed on a machine check; action required."
4032 msgstr "マシンチェックで使用中のハードウェアメモリーのエラーが検出された。対応が必須。"
4033
4034 #. type: TP
4035 #: build/C/man2/sigaction.2:639
4036 #, no-wrap
4037 msgid "B<BUS_MCEERR_AO> (since Linux 2.6.32)"
4038 msgstr "B<BUS_MCEERR_AO> (Linux 2.6.32  以降)"
4039
4040 #. type: Plain text
4041 #: build/C/man2/sigaction.2:642
4042 msgid "Hardware memory error detected in process but not consumed; action optional."
4043 msgstr "実行中にハードウェアメモリーエラーが検出されたが、使用中のメモリーではない。対応は必須ではない。"
4044
4045 #. type: Plain text
4046 #: build/C/man2/sigaction.2:649
4047 msgid "The following values can be placed in I<si_code> for a B<SIGTRAP> signal:"
4048 msgstr "B<SIGTRAP> シグナルの場合、 I<si_code> には以下の値が入る可能性がある:"
4049
4050 #. type: TP
4051 #: build/C/man2/sigaction.2:650
4052 #, no-wrap
4053 msgid "B<TRAP_BRKPT>"
4054 msgstr "B<TRAP_BRKPT>"
4055
4056 #. type: Plain text
4057 #: build/C/man2/sigaction.2:653
4058 msgid "Process breakpoint."
4059 msgstr "プロセスのブレークポイント"
4060
4061 #. type: TP
4062 #: build/C/man2/sigaction.2:653
4063 #, no-wrap
4064 msgid "B<TRAP_TRACE>"
4065 msgstr "B<TRAP_TRACE>"
4066
4067 #. type: Plain text
4068 #: build/C/man2/sigaction.2:656
4069 msgid "Process trace trap."
4070 msgstr "プロセスのトレーストラップ"
4071
4072 #. type: TP
4073 #: build/C/man2/sigaction.2:656
4074 #, no-wrap
4075 msgid "B<TRAP_BRANCH> (since Linux 2.4)"
4076 msgstr "B<TRAP_BRANCH> (Linux 2.4 以降)"
4077
4078 #. type: Plain text
4079 #: build/C/man2/sigaction.2:659
4080 msgid "Process taken branch trap."
4081 msgstr "プロセスのブランチトラップ"
4082
4083 #. type: TP
4084 #: build/C/man2/sigaction.2:659
4085 #, no-wrap
4086 msgid "B<TRAP_HWBKPT> (since Linux 2.4)"
4087 msgstr "B<TRAP_HWBKPT> (Linux 2.4 以降)"
4088
4089 #. type: Plain text
4090 #: build/C/man2/sigaction.2:662
4091 msgid "Hardware breakpoint/watchpoint."
4092 msgstr "ハードウェアのブレークポイント/ウォッチポイント"
4093
4094 #. type: Plain text
4095 #: build/C/man2/sigaction.2:669
4096 msgid "The following values can be placed in I<si_code> for a B<SIGCHLD> signal:"
4097 msgstr "B<SIGCHLD> シグナルの場合、 I<si_code> には以下の値が入る可能性がある:"
4098
4099 #. type: TP
4100 #: build/C/man2/sigaction.2:670
4101 #, no-wrap
4102 msgid "B<CLD_EXITED>"
4103 msgstr "B<CLD_EXITED>"
4104
4105 #. type: Plain text
4106 #: build/C/man2/sigaction.2:673
4107 msgid "Child has exited."
4108 msgstr "子プロセスが終了した (exited)"
4109
4110 #. type: TP
4111 #: build/C/man2/sigaction.2:673
4112 #, no-wrap
4113 msgid "B<CLD_KILLED>"
4114 msgstr "B<CLD_KILLED>"
4115
4116 #. type: Plain text
4117 #: build/C/man2/sigaction.2:676
4118 msgid "Child was killed."
4119 msgstr "子プロセスが kill された"
4120
4121 #. type: TP
4122 #: build/C/man2/sigaction.2:676
4123 #, no-wrap
4124 msgid "B<CLD_DUMPED>"
4125 msgstr "B<CLD_DUMPED>"
4126
4127 #. type: Plain text
4128 #: build/C/man2/sigaction.2:679
4129 msgid "Child terminated abnormally."
4130 msgstr "子プロセスが異常終了した"
4131
4132 #. type: TP
4133 #: build/C/man2/sigaction.2:679
4134 #, no-wrap
4135 msgid "B<CLD_TRAPPED>"
4136 msgstr "B<CLD_TRAPPED>"
4137
4138 #. type: Plain text
4139 #: build/C/man2/sigaction.2:682
4140 msgid "Traced child has trapped."
4141 msgstr "トレース対象の子プロセスがトラップを上げた"
4142
4143 #. type: TP
4144 #: build/C/man2/sigaction.2:682
4145 #, no-wrap
4146 msgid "B<CLD_STOPPED>"
4147 msgstr "B<CLD_STOPPED>"
4148
4149 #. type: Plain text
4150 #: build/C/man2/sigaction.2:685
4151 msgid "Child has stopped."
4152 msgstr "子プロセスが停止 (stop) した"
4153
4154 #. type: TP
4155 #: build/C/man2/sigaction.2:685
4156 #, no-wrap
4157 msgid "B<CLD_CONTINUED> (since Linux 2.6.9)"
4158 msgstr "B<CLD_CONTINUED> (Linux 2.6.9 以降)"
4159
4160 #. type: Plain text
4161 #: build/C/man2/sigaction.2:688
4162 msgid "Stopped child has continued."
4163 msgstr "停止していた子プロセスが再開した"
4164
4165 #. type: Plain text
4166 #: build/C/man2/sigaction.2:695
4167 msgid "The following values can be placed in I<si_code> for a B<SIGIO>/B<SIGPOLL> signal:"
4168 msgstr "B<SIGIO>/B<SIGPOLL> シグナルの場合、 I<si_code> には以下の値が入る可能性がある:"
4169
4170 #. type: TP
4171 #: build/C/man2/sigaction.2:696
4172 #, no-wrap
4173 msgid "B<POLL_IN>"
4174 msgstr "B<POLL_IN>"
4175
4176 #. type: Plain text
4177 #: build/C/man2/sigaction.2:699
4178 msgid "Data input available."
4179 msgstr "入力データが利用可能"
4180
4181 #. type: TP
4182 #: build/C/man2/sigaction.2:699
4183 #, no-wrap
4184 msgid "B<POLL_OUT>"
4185 msgstr "B<POLL_OUT>"
4186
4187 #. type: Plain text
4188 #: build/C/man2/sigaction.2:702
4189 msgid "Output buffers available."
4190 msgstr "出力バッファーが利用可能"
4191
4192 #. type: TP
4193 #: build/C/man2/sigaction.2:702
4194 #, no-wrap
4195 msgid "B<POLL_MSG>"
4196 msgstr "B<POLL_MSG>"
4197
4198 #. type: Plain text
4199 #: build/C/man2/sigaction.2:705
4200 msgid "Input message available."
4201 msgstr "入力メッセージが利用可能"
4202
4203 #. type: TP
4204 #: build/C/man2/sigaction.2:705
4205 #, no-wrap
4206 msgid "B<POLL_ERR>"
4207 msgstr "B<POLL_ERR>"
4208
4209 #. type: Plain text
4210 #: build/C/man2/sigaction.2:708
4211 msgid "I/O error."
4212 msgstr "I/O エラー"
4213
4214 #. type: TP
4215 #: build/C/man2/sigaction.2:708
4216 #, no-wrap
4217 msgid "B<POLL_PRI>"
4218 msgstr "B<POLL_PRI>"
4219
4220 #. type: Plain text
4221 #: build/C/man2/sigaction.2:711
4222 msgid "High priority input available."
4223 msgstr "高優先の入力が利用可能"
4224
4225 #. type: TP
4226 #: build/C/man2/sigaction.2:711
4227 #, no-wrap
4228 msgid "B<POLL_HUP>"
4229 msgstr "B<POLL_HUP>"
4230
4231 #. type: Plain text
4232 #: build/C/man2/sigaction.2:714
4233 msgid "Device disconnected."
4234 msgstr "デバイスが接続されていない"
4235
4236 #. type: Plain text
4237 #: build/C/man2/sigaction.2:721
4238 msgid "The following value can be placed in I<si_code> for a B<SIGSYS> signal:"
4239 msgstr "B<SIGSYS> シグナルの場合、 I<si_code> には以下の値が入る可能性がある:"
4240
4241 #. type: TP
4242 #: build/C/man2/sigaction.2:722
4243 #, no-wrap
4244 msgid "B<SYS_SECCOMP> (since Linux 3.5)"
4245 msgstr "B<SYS_SECCOMP> (Linux 3.5 以降)"
4246
4247 #. type: Plain text
4248 #: build/C/man2/sigaction.2:727
4249 msgid "Triggered by a B<seccomp>(2)  filter rule."
4250 msgstr "B<seccomp>(2) のフィルタールールによる配送された"
4251
4252 #. type: Plain text
4253 #: build/C/man2/sigaction.2:733
4254 msgid "B<sigaction>()  returns 0 on success; on error, -1 is returned, and I<errno> is set to indicate the error."
4255 msgstr "B<sigaction>() 関数は成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエラーを示す値をセットする。"
4256
4257 #. type: Plain text
4258 #: build/C/man2/sigaction.2:738
4259 msgid "I<act> or I<oldact> points to memory which is not a valid part of the process address space."
4260 msgstr "I<act> か I<oldact> が指しているメモリーが正しいプロセスのアドレス空間にない。"
4261
4262 #. type: Plain text
4263 #: build/C/man2/sigaction.2:745
4264 msgid "An invalid signal was specified.  This will also be generated if an attempt is made to change the action for B<SIGKILL> or B<SIGSTOP>, which cannot be caught or ignored."
4265 msgstr "無効なシグナルが指定された。補足 (catch) したり無視したりできない シグナルである B<SIGKILL> や B<SIGSTOP> に対する動作を変更しようとした場合にも発生する。"
4266
4267 #.  SVr4 does not document the EINTR condition.
4268 #. type: Plain text
4269 #: build/C/man2/sigaction.2:748
4270 msgid "POSIX.1-2001, SVr4."
4271 msgstr "POSIX.1-2001, SVr4."
4272
4273 #. type: Plain text
4274 #: build/C/man2/sigaction.2:756 build/C/man7/signal.7:105
4275 msgid "A child created via B<fork>(2)  inherits a copy of its parent's signal dispositions.  During an B<execve>(2), the dispositions of handled signals are reset to the default; the dispositions of ignored signals are left unchanged."
4276 msgstr "B<fork>(2) 経由で作成された子プロセスは、親プロセスのシグナルの処理方法の コピーを継承する。 B<execve>(2) の前後で、ハンドラーが設定されているシグナルの処理方法はデフォルトにリセットされ、 無視が設定されているシグナルの処理方法は変更されずそのままとなる。"
4277
4278 #. type: Plain text
4279 #: build/C/man2/sigaction.2:774 build/C/man2/signal.2:134
4280 msgid "According to POSIX, the behavior of a process is undefined after it ignores a B<SIGFPE>, B<SIGILL>, or B<SIGSEGV> signal that was not generated by B<kill>(2)  or B<raise>(3).  Integer division by zero has undefined result.  On some architectures it will generate a B<SIGFPE> signal.  (Also dividing the most negative integer by -1 may generate B<SIGFPE>.)  Ignoring this signal might lead to an endless loop."
4281 msgstr "POSIX では、 B<kill>(2)  や B<raise>(3)  で生成できないシグナル B<SIGFPE>, B<SIGILL>, B<SIGSEGV> を無視 (ignore) した場合、その後の動作は未定義である。 ゼロによる整数割り算の結果は未定義となる。 アーキテクチャーによっては、このとき B<SIGFPE> シグナルが生成される。 (同様に負の最大整数を -1 で割ると B<SIGFPE> が生成されるかもしれない)  このシグナルを無視すると無限ループに陥るかもしれない。"
4282
4283 #. type: Plain text
4284 #: build/C/man2/sigaction.2:791
4285 msgid "POSIX.1-1990 disallowed setting the action for B<SIGCHLD> to B<SIG_IGN>.  POSIX.1-2001 allows this possibility, so that ignoring B<SIGCHLD> can be used to prevent the creation of zombies (see B<wait>(2)).  Nevertheless, the historical BSD and System\\ V behaviors for ignoring B<SIGCHLD> differ, so that the only completely portable method of ensuring that terminated children do not become zombies is to catch the B<SIGCHLD> signal and perform a B<wait>(2)  or similar."
4286 msgstr "POSIX.1-1990 では B<SIGCHLD> に B<SIG_IGN> を設定することを認めていない。 POSIX.1-2001 では認められており、 B<SIGCHLD> を無視することでゾンビプロセスの生成を防止することができる (B<wait>(2)  を参照)。 さらに、BSD と System\\ V では B<SIGCHLD> を無視した際の動作が異なっている。 そのため、完全に移植性がある方法で、終了した子プロセスがゾンビにならないこと を保証するには、 B<SIGCHLD> シグナルを補足し、 B<wait>(2)  などを実行するしかない。"
4287
4288 #. type: Plain text
4289 #: build/C/man2/sigaction.2:804
4290 msgid "POSIX.1-1990 specified only B<SA_NOCLDSTOP>.  POSIX.1-2001 added B<SA_NOCLDWAIT>, B<SA_RESETHAND>, B<SA_NODEFER>, and B<SA_SIGINFO>.  Use of these latter values in I<sa_flags> may be less portable in applications intended for older UNIX implementations."
4291 msgstr "POSIX.1-1990 の仕様では B<SA_NOCLDSTOP> のみが定義されている。 POSIX.1-2001 では B<SA_NOCLDWAIT>, B<SA_RESETHAND>, B<SA_NODEFER>, B<SA_SIGINFO> が追加された。 UNIX の古い実装で動かすアプリケーションで、 他の I<sa_flags> フラグを使用すると移植性が下がる。"
4292
4293 #. type: Plain text
4294 #: build/C/man2/sigaction.2:808
4295 msgid "The B<SA_RESETHAND> flag is compatible with the SVr4 flag of the same name."
4296 msgstr "B<SA_RESETHAND> フラグは SVr4 の同じ名前のフラグと互換性がある。"
4297
4298 #. type: Plain text
4299 #: build/C/man2/sigaction.2:818
4300 msgid "The B<SA_NODEFER> flag is compatible with the SVr4 flag of the same name under kernels 1.3.9 and newer.  On older kernels the Linux implementation allowed the receipt of any signal, not just the one we are installing (effectively overriding any I<sa_mask> settings)."
4301 msgstr "B<SA_NODEFER> フラグは 1.3.9 以降のカーネルでは同じ名前の SVr4 のフラグと互換性がある。 ぞれ以前の Linux カーネルの実装では、このフラグを設定しているシグナル だけでなく、どのシグナルでも受けることを許していた (実際には I<sa_mask> の設定により無効にできる)。"
4302
4303 #. type: Plain text
4304 #: build/C/man2/sigaction.2:824
4305 msgid "B<sigaction>()  can be called with a NULL second argument to query the current signal handler.  It can also be used to check whether a given signal is valid for the current machine by calling it with NULL second and third arguments."
4306 msgstr "B<sigaction>()  の二番目の引き数に NULL を指定して呼び出すと、現在のシグナルハンドラーを確認する ことができる。また、二番目と三番目の引き数を NULL にて呼び出すことで、 指定されたシグナルが現在のマシンで使えるかどうかチェックできる。"
4307
4308 #. type: Plain text
4309 #: build/C/man2/sigaction.2:830
4310 msgid "It is not possible to block B<SIGKILL> or B<SIGSTOP> (by specifying them in I<sa_mask>).  Attempts to do so are silently ignored."
4311 msgstr "B<SIGKILL> や B<SIGSTOP> を (I<sa_mask> に指定して) 禁止することはできない。 禁止しようとしても黙って無視される。"
4312
4313 #. type: Plain text
4314 #: build/C/man2/sigaction.2:834 build/C/man2/sigpending.2:70
4315 #: build/C/man2/sigprocmask.2:144 build/C/man2/sigsuspend.2:108
4316 msgid "See B<sigsetops>(3)  for details on manipulating signal sets."
4317 msgstr "シグナル集合の操作に関する詳細は B<sigsetops>(3)  を参照のこと。"
4318
4319 #. type: Plain text
4320 #: build/C/man2/sigaction.2:839
4321 msgid "See B<signal>(7)  for a list of the async-signal-safe functions that can be safely called inside from inside a signal handler."
4322 msgstr "シグナルハンドラー内から安全に呼び出すことができる、 async-signal-safe functions (非同期シングルで安全な関数) の リストについては B<signal>(7)  を参照。"
4323
4324 #. type: SS
4325 #: build/C/man2/sigaction.2:839
4326 #, no-wrap
4327 msgid "Undocumented"
4328 msgstr "非公式"
4329
4330 #. type: Plain text
4331 #: build/C/man2/sigaction.2:849
4332 msgid "Before the introduction of B<SA_SIGINFO> it was also possible to get some additional information, namely by using a I<sa_handler> with second argument of type I<struct sigcontext>.  See the relevant Linux kernel sources for details.  This use is obsolete now."
4333 msgstr "B<SA_SIGINFO> が導入される前は、 I<struct sigcontext> 型の二番目の引き数と一緒に I<sa_handler> を使用することで、 いくつかの追加の情報を入手することができた。 詳細については Linux カーネルソースの関連部分を見てほしい。 現在はこの使用法は廃止されている。"
4334
4335 #. type: Plain text
4336 #: build/C/man2/sigaction.2:858
4337 msgid "In kernels up to and including 2.6.13, specifying B<SA_NODEFER> in I<sa_flags> prevents not only the delivered signal from being masked during execution of the handler, but also the signals specified in I<sa_mask>.  This bug was fixed in kernel 2.6.14."
4338 msgstr "2.6.13 以前のカーネルでは、 I<sa_flags> に B<SA_NODEFER> を指定した場合、 ハンドラーが実行中に配送されたシグナル自身がマスクされなくなるだけでなく、 I<sa_mask> に指定されたシグナルもマスクされなくなる。 このバグは、カーネル 2.6.14 で修正された。"
4339
4340 #. type: Plain text
4341 #: build/C/man2/sigaction.2:861
4342 msgid "See B<mprotect>(2)."
4343 msgstr "B<mprotect>(2)  参照。"
4344
4345 #. type: Plain text
4346 #: build/C/man2/sigaction.2:883
4347 msgid "B<kill>(1), B<kill>(2), B<killpg>(2), B<pause>(2), B<restart_syscall>(2), B<seccomp>(2)  B<sigaltstack>(2), B<signal>(2), B<signalfd>(2), B<sigpending>(2), B<sigreturn>(2), B<sigprocmask>(2), B<sigsuspend>(2), B<wait>(2), B<raise>(3), B<siginterrupt>(3), B<sigqueue>(3), B<sigsetops>(3), B<sigvec>(3), B<core>(5), B<signal>(7)"
4348 msgstr "B<kill>(1), B<kill>(2), B<killpg>(2), B<pause>(2), B<restart_syscall>(2), B<seccomp>(2)  B<sigaltstack>(2), B<signal>(2), B<signalfd>(2), B<sigpending>(2), B<sigreturn>(2), B<sigprocmask>(2), B<sigsuspend>(2), B<wait>(2), B<raise>(3), B<siginterrupt>(3), B<sigqueue>(3), B<sigsetops>(3), B<sigvec>(3), B<core>(5), B<signal>(7)"
4349
4350 #. type: TH
4351 #: build/C/man2/sigaltstack.2:27
4352 #, no-wrap
4353 msgid "SIGALTSTACK"
4354 msgstr "SIGALTSTACK"
4355
4356 #. type: TH
4357 #: build/C/man2/sigaltstack.2:27
4358 #, no-wrap
4359 msgid "2010-09-26"
4360 msgstr "2010-09-26"
4361
4362 #. type: Plain text
4363 #: build/C/man2/sigaltstack.2:30
4364 msgid "sigaltstack - set and/or get signal stack context"
4365 msgstr "sigaltstack - シグナルスタックのコンテキストを設定・取得する"
4366
4367 #. type: Plain text
4368 #: build/C/man2/sigaltstack.2:34
4369 msgid "B<int sigaltstack(const stack_t *>I<ss>B<, stack_t *>I<oss>B<);>"
4370 msgstr "B<int sigaltstack(const stack_t *>I<ss>B<, stack_t *>I<oss>B<);>"
4371
4372 #. type: Plain text
4373 #: build/C/man2/sigaltstack.2:41
4374 msgid "B<sigaltstack>():"
4375 msgstr "B<sigaltstack>():"
4376
4377 #. type: Plain text
4378 #: build/C/man2/sigaltstack.2:48 build/C/man3/siginterrupt.3:53
4379 #: build/C/man2/wait.2:80
4380 msgid "|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
4381 msgstr "|| /* glibc 2.12 以降: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
4382
4383 #. type: Plain text
4384 #: build/C/man2/sigaltstack.2:60
4385 msgid "B<sigaltstack>()  allows a process to define a new alternate signal stack and/or retrieve the state of an existing alternate signal stack.  An alternate signal stack is used during the execution of a signal handler if the establishment of that handler (see B<sigaction>(2))  requested it."
4386 msgstr "B<sigaltstack>()  を使うと、 プロセスは新しい代替シグナルスタックを定義したり、 既存の代替シグナルスタックの状態を取得できる。 シグナルハンドラーが代替シグナルスタックを要求するように設定されていると (B<sigaction>(2)  参照)、ハンドラーの実行中はそのシグナルスタックが使われる。"
4387
4388 #. type: Plain text
4389 #: build/C/man2/sigaltstack.2:63
4390 msgid "The normal sequence of events for using an alternate signal stack is the following:"
4391 msgstr "代替シグナルスタックを使う際の一般的な手順は、以下の通りである:"
4392
4393 #. type: IP
4394 #: build/C/man2/sigaltstack.2:63 build/C/man7/signal.7:387
4395 #, no-wrap
4396 msgid "1."
4397 msgstr "1."
4398
4399 #. type: Plain text
4400 #: build/C/man2/sigaltstack.2:67
4401 msgid "Allocate an area of memory to be used for the alternate signal stack."
4402 msgstr "代替シグナルスタックで使うメモリー領域を確保する。"
4403
4404 #. type: IP
4405 #: build/C/man2/sigaltstack.2:67 build/C/man7/signal.7:391
4406 #, no-wrap
4407 msgid "2."
4408 msgstr "2."
4409
4410 #. type: Plain text
4411 #: build/C/man2/sigaltstack.2:73
4412 msgid "Use B<sigaltstack>()  to inform the system of the existence and location of the alternate signal stack."
4413 msgstr "B<sigaltstack>()  を使って、 代替シグナルスタックの存在と場所をシステムに知らせる。"
4414
4415 #. type: IP
4416 #: build/C/man2/sigaltstack.2:73 build/C/man7/signal.7:411
4417 #, no-wrap
4418 msgid "3."
4419 msgstr "3."
4420
4421 #. type: Plain text
4422 #: build/C/man2/sigaltstack.2:80
4423 msgid "When establishing a signal handler using B<sigaction>(2), inform the system that the signal handler should be executed on the alternate signal stack by specifying the B<SA_ONSTACK> flag."
4424 msgstr "B<sigaction>(2)  を使ってシグナルハンドラーを確立する際、 B<SA_ONSTACK> フラグを指定することにより、 そのシグナルハンドラーを代替シグナルスタック上で実行することを システムに知らせる。"
4425
4426 #. type: Plain text
4427 #: build/C/man2/sigaltstack.2:88
4428 msgid "The I<ss> argument is used to specify a new alternate signal stack, while the I<oss> argument is used to retrieve information about the currently established signal stack.  If we are interested in performing just one of these tasks, then the other argument can be specified as NULL.  Each of these arguments is a structure of the following type:"
4429 msgstr "I<ss> 引き数は、新しいシグナルスタックを指定するために使う。 また I<oss> 引き数は、現在確立されている シグナルスタックの情報を取得するために使う。 この操作のうち 1 つだけを実行させるには、 使用しない引き数を NULL に指定すればよい。 引き数となる構造体は、以下のような型である:"
4430
4431 #. type: Plain text
4432 #: build/C/man2/sigaltstack.2:96
4433 #, no-wrap
4434 msgid ""
4435 "typedef struct {\n"
4436 "    void  *ss_sp;     /* Base address of stack */\n"
4437 "    int    ss_flags;  /* Flags */\n"
4438 "    size_t ss_size;   /* Number of bytes in stack */\n"
4439 "} stack_t;\n"
4440 msgstr ""
4441 "typedef struct {\n"
4442 "    void  *ss_sp;     /* スタックのベースアドレス */\n"
4443 "    int    ss_flags;  /* フラグ */\n"
4444 "    size_t ss_size;   /* スタックのバイト数 */\n"
4445 "} stack_t;\n"
4446
4447 #. type: Plain text
4448 #: build/C/man2/sigaltstack.2:107
4449 msgid "To establish a new alternate signal stack, I<ss.ss_flags> is set to zero, and I<ss.ss_sp> and I<ss.ss_size> specify the starting address and size of the stack.  The constant B<SIGSTKSZ> is defined to be large enough to cover the usual size requirements for an alternate signal stack, and the constant B<MINSIGSTKSZ> defines the minimum size required to execute a signal handler."
4450 msgstr "新規の代替シグナルスタックを確立するには、 I<ss.ss_flags> を 0 に設定し、 I<ss.ss_sp> と I<ss.ss_size> に スタックの開始アドレスとスタックサイズを指定する。 定数 B<SIGSTKSZ> は、代替シグナルスタックが通常必要する サイズよりも充分大きく定義されている。 また定数 B<MINSIGSTKSZ> は、 シグナルハンドラーの実行に必要な最小サイズに定義されている。"
4451
4452 #. type: Plain text
4453 #: build/C/man2/sigaltstack.2:111
4454 msgid "When a signal handler is invoked on the alternate stack, the kernel automatically aligns the address given in I<ss.ss_sp> to a suitable address boundary for the underlying hardware architecture."
4455 msgstr "代替スタックでシグナルハンドラーが起動された場合には、 カーネルにより自動的に、I<ss.ss_sp> で指定されたアドレスは 動作しているハードウェアアーキテクチャーに適したアドレス境界に 調整される。"
4456
4457 #. type: Plain text
4458 #: build/C/man2/sigaltstack.2:116
4459 msgid "To disable an existing stack, specify I<ss.ss_flags> as B<SS_DISABLE>.  In this case, the remaining fields in I<ss> are ignored."
4460 msgstr "既存のスタックを無効にするには、 I<ss.ss_flags> を B<SS_DISABLE> に指定する。 この場合、I<ss> の他のフィールドは無視される。"
4461
4462 #. type: Plain text
4463 #: build/C/man2/sigaltstack.2:124
4464 msgid "If I<oss> is not NULL, then it is used to return information about the alternate signal stack which was in effect prior to the call to B<sigaltstack>().  The I<oss.ss_sp> and I<oss.ss_size> fields return the starting address and size of that stack.  The I<oss.ss_flags> may return either of the following values:"
4465 msgstr "I<oss> が NULL 以外の場合、 I<oss> に代替シグナルスタックの情報が返される。 これは (実質的に)  B<sigaltstack>()  の呼び出しより先に行われる。 I<oss.ss_sp> と I<oss.ss_size> フィールドに スタックの開始アドレスとスタックサイズが返される。 I<oss.ss_flags> には以下のどちらかの値が返される:"
4466
4467 #. type: TP
4468 #: build/C/man2/sigaltstack.2:124
4469 #, no-wrap
4470 msgid "B<SS_ONSTACK>"
4471 msgstr "B<SS_ONSTACK>"
4472
4473 #. type: Plain text
4474 #: build/C/man2/sigaltstack.2:130
4475 msgid "The process is currently executing on the alternate signal stack.  (Note that it is not possible to change the alternate signal stack if the process is currently executing on it.)"
4476 msgstr "プロセスが代替シグナルスタック上で実行されている (プロセスが既にそのシグナルスタック上で実行されている場合は、 それと同じシグナルスタックには変更できない点に注意すること)。"
4477
4478 #. type: TP
4479 #: build/C/man2/sigaltstack.2:130
4480 #, no-wrap
4481 msgid "B<SS_DISABLE>"
4482 msgstr "B<SS_DISABLE>"
4483
4484 #. type: Plain text
4485 #: build/C/man2/sigaltstack.2:133
4486 msgid "The alternate signal stack is currently disabled."
4487 msgstr "代替シグナルスタックが現在無効になっている。"
4488
4489 #. type: Plain text
4490 #: build/C/man2/sigaltstack.2:137
4491 msgid "B<sigaltstack>()  returns 0 on success, or -1 on failure with I<errno> set to indicate the error."
4492 msgstr "B<sigaltstack>()  は成功した場合 0 を返す。 失敗した場合は -1 を返して、 エラーを示す値に I<errno> を設定する。"
4493
4494 #. type: Plain text
4495 #: build/C/man2/sigaltstack.2:142
4496 msgid "Either I<ss> or I<oss> is not NULL and points to an area outside of the process's address space."
4497 msgstr "I<ss> または I<oss> のどちらが、NULL 以外で、 かつプロセスのアドレス空間の外を指している。"
4498
4499 #. type: Plain text
4500 #: build/C/man2/sigaltstack.2:147
4501 msgid "I<ss> is not NULL and the I<ss_flags> field contains a nonzero value other than B<SS_DISABLE>."
4502 msgstr "I<ss> が NULL 以外で、I<ss_flags> フィールドが B<SS_DISABLE> 以外の 0 でない値になっている。"
4503
4504 #. type: Plain text
4505 #: build/C/man2/sigaltstack.2:153
4506 msgid "The specified size of the new alternate signal stack I<ss.ss_size> was less than B<MINSTKSZ>."
4507 msgstr "新しい代替シグナルスタック (I<ss.ss_size>) に指定したサイズが B<MINSTKSZ> より小さかった。"
4508
4509 #. type: Plain text
4510 #: build/C/man2/sigaltstack.2:158
4511 msgid "An attempt was made to change the alternate signal stack while it was active (i.e., the process was already executing on the current alternate signal stack)."
4512 msgstr "代替シグナルスタックが有効であるときに変更を行おうとした (つまり、プロセスが既に現在の代替シグナルスタック上で実行されていた)。"
4513
4514 #. type: Plain text
4515 #: build/C/man2/sigaltstack.2:160
4516 msgid "SUSv2, SVr4, POSIX.1-2001."
4517 msgstr "SUSv2, SVr4, POSIX.1-2001."
4518
4519 #. type: Plain text
4520 #: build/C/man2/sigaltstack.2:168
4521 msgid "The most common usage of an alternate signal stack is to handle the B<SIGSEGV> signal that is generated if the space available for the normal process stack is exhausted: in this case, a signal handler for B<SIGSEGV> cannot be invoked on the process stack; if we wish to handle it, we must use an alternate signal stack."
4522 msgstr "代替シグナルスタックを使用する最もよくある場面は、 B<SIGSEGV> シグナルを扱うときである。 B<SIGSEGV> はプロセスの通常のスタックが利用できる空間が使い果たされた際に 生成されるシグナルである。この場合には、 B<SIGSEGV> 用のシグナルハンドラーをプロセスのスタック上では起動することができない。 そのため、このシグナルを扱おうとする場合には、 代替シグナルスタックを使用しなければならない。"
4523
4524 #. type: Plain text
4525 #: build/C/man2/sigaltstack.2:178
4526 msgid "Establishing an alternate signal stack is useful if a process expects that it may exhaust its standard stack.  This may occur, for example, because the stack grows so large that it encounters the upwardly growing heap, or it reaches a limit established by a call to B<setrlimit(RLIMIT_STACK, &rlim)>.  If the standard stack is exhausted, the kernel sends the process a B<SIGSEGV> signal.  In these circumstances the only way to catch this signal is on an alternate signal stack."
4527 msgstr "プロセスが標準のシグナルスタックを使い果たすことが予想される場合は、 代替シグナルスタックを確立すると便利である。 例えば、スタックが最上位アドレスから 下位アドレス方向に非常にたくさん積まれてしまうことで、 最下位アドレスから上位アドレス方向に積まれるヒープとぶつかってしまう場合や、 B<setrlimit(RLIMIT_STACK, &rlim)> の呼び出しで確立された 制限に達してしまった場合に、この様な事が起こる。 標準のスタックを使い果たしてしまうと、 カーネルはプロセスに B<SIGSEGV> シグナルを送る。 このような状況では、代替シグナルスタック上でしかシグナルをキャッチできない。"
4528
4529 #. type: Plain text
4530 #: build/C/man2/sigaltstack.2:184
4531 msgid "On most hardware architectures supported by Linux, stacks grow downward.  B<sigaltstack>()  automatically takes account of the direction of stack growth."
4532 msgstr "Linux がサポートする多くのハードウェアアーキテクチャーでは、 スタックは下位アドレス方向に積まれる。 B<sigaltstack>()  はスタックが積まれる方向を自動的に決定する。"
4533
4534 #. type: Plain text
4535 #: build/C/man2/sigaltstack.2:193
4536 msgid "Functions called from a signal handler executing on an alternate signal stack will also use the alternate signal stack.  (This also applies to any handlers invoked for other signals while the process is executing on the alternate signal stack.)  Unlike the standard stack, the system does not automatically extend the alternate signal stack.  Exceeding the allocated size of the alternate signal stack will lead to unpredictable results."
4537 msgstr "代替シグナルスタック上で実行されている シグナルハンドラーから呼ばれる関数も、代替シグナルハンドラーを使う (プロセスが代替シグナルスタック上で実行されている場合、 他のシグナルで呼び出されるハンドラーもこの代替シグナルハンドラーを使う)。 標準のスタックとは異なり、 システムは代替シグナルスタックを自動的に拡張しない。 代替シグナルスタック用に確保したサイズを越えた場合、 結果は予想できない。"
4538
4539 #. type: Plain text
4540 #: build/C/man2/sigaltstack.2:201
4541 msgid "A successful call to B<execve>(2)  removes any existing alternate signal stack.  A child process created via B<fork>(2)  inherits a copy of its parent's alternate signal stack settings."
4542 msgstr "B<execve>(2)  の呼び出しが成功すると、 既存の全ての代替シグナルスタックが削除される。 B<fork>(2)  経由で作成された子プロセスは、親プロセスの代替シグナルスタックの 設定のコピーを継承する。"
4543
4544 #. type: Plain text
4545 #: build/C/man2/sigaltstack.2:210
4546 msgid "B<sigaltstack>()  supersedes the older B<sigstack>()  call.  For backward compatibility, glibc also provides B<sigstack>().  All new applications should be written using B<sigaltstack>()."
4547 msgstr "B<sigaltstack>()  は以前の B<sigstack>()  を置き換えるものである。 過去プログラムとの互換性のため、glibc では B<sigstack>()  も提供している。 新しいのアプリケーションは全て B<sigaltstack>()  を使って書くべきである。"
4548
4549 #. type: SS
4550 #: build/C/man2/sigaltstack.2:210 build/C/man3/sigpause.3:66
4551 #, no-wrap
4552 msgid "History"
4553 msgstr "歴史"
4554
4555 #. type: Plain text
4556 #: build/C/man2/sigaltstack.2:217
4557 msgid "4.2BSD had a B<sigstack>()  system call.  It used a slightly different struct, and had the major disadvantage that the caller had to know the direction of stack growth."
4558 msgstr "4.2BSD には B<sigstack>()  システムコールがあった。 この関数は少し異なった構造体を使っており、 呼び出した側がスタックの積まれる方向を知っていなければならないという 大きな欠点があった。"
4559
4560 #. type: Plain text
4561 #: build/C/man2/sigaltstack.2:220
4562 msgid "The following code segment demonstrates the use of B<sigaltstack>():"
4563 msgstr "以下のコードで B<sigaltstack>()  の使用法の一部を示す:"
4564
4565 #. type: Plain text
4566 #: build/C/man2/sigaltstack.2:224
4567 #, no-wrap
4568 msgid "stack_t ss;\n"
4569 msgstr "stack_t ss;\n"
4570
4571 #. type: Plain text
4572 #: build/C/man2/sigaltstack.2:232
4573 #, no-wrap
4574 msgid ""
4575 "ss.ss_sp = malloc(SIGSTKSZ);\n"
4576 "if (ss.ss_sp == NULL)\n"
4577 "    /* Handle error */;\n"
4578 "ss.ss_size = SIGSTKSZ;\n"
4579 "ss.ss_flags = 0;\n"
4580 "if (sigaltstack(&ss, NULL) == -1)\n"
4581 "    /* Handle error */;\n"
4582 msgstr ""
4583 "ss.ss_sp = malloc(SIGSTKSZ);\n"
4584 "if (ss.ss_sp == NULL)\n"
4585 "    /* ハンドルエラー */;\n"
4586 "ss.ss_size = SIGSTKSZ;\n"
4587 "ss.ss_flags = 0;\n"
4588 "if (sigaltstack(&ss, NULL) == -1)\n"
4589 "    /* ハンドルエラー */;\n"
4590
4591 #. type: Plain text
4592 #: build/C/man2/sigaltstack.2:241
4593 msgid "B<execve>(2), B<setrlimit>(2), B<sigaction>(2), B<siglongjmp>(3), B<sigsetjmp>(3), B<signal>(7)"
4594 msgstr "B<execve>(2), B<setrlimit>(2), B<sigaction>(2), B<siglongjmp>(3), B<sigsetjmp>(3), B<signal>(7)"
4595
4596 #. type: TH
4597 #: build/C/man7/sigevent.7:26
4598 #, no-wrap
4599 msgid "SIGEVENT"
4600 msgstr "SIGEVENT"
4601
4602 #. type: TH
4603 #: build/C/man7/sigevent.7:26
4604 #, no-wrap
4605 msgid "2011-09-09"
4606 msgstr "2011-09-09"
4607
4608 #. type: Plain text
4609 #: build/C/man7/sigevent.7:29
4610 msgid "sigevent - structure for notification from asynchronous routines"
4611 msgstr "sigevent - 非同期ルーチンからの通知用の構造体"
4612
4613 #. type: Plain text
4614 #: build/C/man7/sigevent.7:36
4615 #, no-wrap
4616 msgid ""
4617 "union sigval {          /* Data passed with notification */\n"
4618 "    int     sival_int;         /* Integer value */\n"
4619 "    void   *sival_ptr;         /* Pointer value */\n"
4620 "};\n"
4621 msgstr ""
4622 "union sigval {          /* Data passed with notification */\n"
4623 "    int     sival_int;         /* Integer value */\n"
4624 "    void   *sival_ptr;         /* Pointer value */\n"
4625 "};\n"
4626
4627 #. type: Plain text
4628 #: build/C/man7/sigevent.7:51
4629 #, no-wrap
4630 msgid ""
4631 "struct sigevent {\n"
4632 "    int          sigev_notify; /* Notification method */\n"
4633 "    int          sigev_signo;  /* Notification signal */\n"
4634 "    union sigval sigev_value;  /* Data passed with\n"
4635 "                                  notification */\n"
4636 "    void       (*sigev_notify_function) (union sigval);\n"
4637 "                     /* Function used for thread\n"
4638 "                        notification (SIGEV_THREAD) */\n"
4639 "    void        *sigev_notify_attributes;\n"
4640 "                     /* Attributes for notification thread\n"
4641 "                        (SIGEV_THREAD) */\n"
4642 "    pid_t        sigev_notify_thread_id;\n"
4643 "                     /* ID of thread to signal (SIGEV_THREAD_ID) */\n"
4644 "};\n"
4645 msgstr ""
4646 "struct sigevent {\n"
4647 "    int          sigev_notify; /* Notification method */\n"
4648 "    int          sigev_signo;  /* Notification signal */\n"
4649 "    union sigval sigev_value;  /* Data passed with\n"
4650 "                                  notification */\n"
4651 "    void       (*sigev_notify_function) (union sigval);\n"
4652 "                     /* Function used for thread\n"
4653 "                        notification (SIGEV_THREAD) */\n"
4654 "    void        *sigev_notify_attributes;\n"
4655 "                     /* Attributes for notification thread\n"
4656 "                        (SIGEV_THREAD) */\n"
4657 "    pid_t        sigev_notify_thread_id;\n"
4658 "                     /* ID of thread to signal (SIGEV_THREAD_ID) */\n"
4659 "};\n"
4660
4661 #. type: Plain text
4662 #: build/C/man7/sigevent.7:60
4663 msgid "The I<sigevent> structure is used by various APIs to describe the way a process is to be notified about an event (e.g., completion of an asynchronous request, expiration of a timer, or the arrival of a message)."
4664 msgstr "I<sigevent> 構造体は、イベントに関する情報をプロセスに通知するために様々な API で使用される (イベントの例としては、 非同期処理要求の完了、 タイマーの満了、 メッセージの到着など)。"
4665
4666 #. type: Plain text
4667 #: build/C/man7/sigevent.7:68
4668 msgid "The definition shown in the SYNOPSIS is approximate: some of the fields in the I<sigevent> structure may be defined as part of a union.  Programs should employ only those fields relevant to the value specified in I<sigev_notify>."
4669 msgstr "「書式」に記載されている定義はおおよそのものである。 I<sigevent> 構造体のいくつかのフィールドは、 共用体の一部として定義されているものもある。 プログラムは、 I<sigev_notify> で指定された値に応じたフィールドだけを利用すべきである。"
4670
4671 #. type: Plain text
4672 #: build/C/man7/sigevent.7:73
4673 msgid "The I<sigev_notify> field specifies how notification is to be performed.  This field can have one of the following values:"
4674 msgstr "I<sigev_notify> フィールドは、通知をどのように処理すべきかを指定する。 このフィールドは、以下のいずれかの値である。"
4675
4676 #. type: TP
4677 #: build/C/man7/sigevent.7:73 build/C/man2/timer_create.2:109
4678 #, no-wrap
4679 msgid "B<SIGEV_NONE>"
4680 msgstr "B<SIGEV_NONE>"
4681
4682 #. type: Plain text
4683 #: build/C/man7/sigevent.7:76
4684 msgid "A \"null\" notification: don't do anything when the event occurs."
4685 msgstr "「空 (null)」の通知。 イベントが発生時には何もしないこと。"
4686
4687 #. type: TP
4688 #: build/C/man7/sigevent.7:76 build/C/man2/timer_create.2:114
4689 #, no-wrap
4690 msgid "B<SIGEV_SIGNAL>"
4691 msgstr "B<SIGEV_SIGNAL>"
4692
4693 #. type: Plain text
4694 #: build/C/man7/sigevent.7:80
4695 msgid "Notify the process by sending the signal specified in I<sigev_signo>."
4696 msgstr "I<sigev_signo> で指定されたシグナルを送信することで、プロセスへの通知を行う。"
4697
4698 #. type: Plain text
4699 #: build/C/man7/sigevent.7:87
4700 msgid "If the signal is caught with a signal handler that was registered using the B<sigaction>(2)  B<SA_SIGINFO> flag, then the following fields are set in the I<siginfo_t> structure that is passed as the second argument of the handler:"
4701 msgstr "B<sigaction>(2) の B<SA_SIGINFO> フラグを使った登録されたシグナルハンドラーによりシグナルが捕捉されると、 シグナルハンドラーの 2 番目の引き数として渡された I<siginfo_t> 構造体の以下のフィールドが設定される。"
4702
4703 #. type: Plain text
4704 #: build/C/man7/sigevent.7:92
4705 msgid "This field is set to a value that depends on the API delivering the notification."
4706 msgstr "このフィールドには通知を配送した API に応じた決まる値が設定される。"
4707
4708 #. type: TP
4709 #: build/C/man7/sigevent.7:92 build/C/man2/wait.2:302
4710 #, no-wrap
4711 msgid "I<si_signo>"
4712 msgstr "I<si_signo>"
4713
4714 #. type: Plain text
4715 #: build/C/man7/sigevent.7:96
4716 msgid "This field is set to the signal number (i.e., the same value as in I<sigev_signo>)."
4717 msgstr "このフィールドにはシグナル番号 (すなわち I<sigev_signo> と同じ値) が設定される。"
4718
4719 #. type: Plain text
4720 #: build/C/man7/sigevent.7:100
4721 msgid "This field is set to the value specified in I<sigev_value>."
4722 msgstr "このフィールドには I<sigev_value> で指定された値が設定される。"
4723
4724 #. type: Plain text
4725 #: build/C/man7/sigevent.7:105
4726 msgid "Depending on the API, other fields may also be set in the I<siginfo_t> structure."
4727 msgstr "API によっては I<siginfo_t> 構造体の他のフィールドが設定される場合もある。"
4728
4729 #. type: Plain text
4730 #: build/C/man7/sigevent.7:108
4731 msgid "The same information is also available if the signal is accepted using B<sigwaitinfo>(2)."
4732 msgstr "シグナルを受け取ったときには B<sigwaitinfo>(2) でも同じ情報が得られる。"
4733
4734 #. type: TP
4735 #: build/C/man7/sigevent.7:108 build/C/man2/timer_create.2:132
4736 #, no-wrap
4737 msgid "B<SIGEV_THREAD>"
4738 msgstr "B<SIGEV_THREAD>"
4739
4740 #. type: Plain text
4741 #: build/C/man7/sigevent.7:125
4742 msgid "Notify the process by invoking I<sigev_notify_function> \"as if\" it were the start function of a new thread.  (Among the implementation possibilities here are that each timer notification could result in the creation of a new thread, or that a single thread is created to receive all notifications.)  The function is invoked with I<sigev_value> as its sole argument.  If I<sigev_notify_attributes> is not NULL, it should point to a I<pthread_attr_t> structure that defines attributes for the new thread (see B<pthread_attr_init>(3))."
4743 msgstr "「あたかも」新しいスレッドセーフの開始関数であるかのように I<sigev_notify_function> を起動することで、 プロセスへの通知を行う (実装の可能性としては、 タイマー通知の度に新しいスレッドセーフが作成される場合も、 一つのスレッドを作成してすべての通知を受信する場合もある)。 この関数は I<sigev_value> を唯一の引き数として起動される。 I<sigev_notify_attributes> は、 NULL 以外の場合は、 新しいスレッドセーフの属性を定義する I<pthread_attr_t> 構造体を指していなければならない (B<pthread_attr_init>(3) 参照)。"
4744
4745 #. type: TP
4746 #: build/C/man7/sigevent.7:125 build/C/man2/timer_create.2:140
4747 #, no-wrap
4748 msgid "B<SIGEV_THREAD_ID> (Linux-specific)"
4749 msgstr "B<SIGEV_THREAD_ID> (Linux 固有)"
4750
4751 #.  | SIGEV_SIGNAL vs not?
4752 #. type: Plain text
4753 #: build/C/man7/sigevent.7:130
4754 msgid "Currently used only by POSIX timers; see B<timer_create>(2)."
4755 msgstr "現在のところ POSIX でのみ使用されている。 B<timer_create>(2) 参照。"
4756
4757 #. type: Plain text
4758 #: build/C/man7/sigevent.7:132 build/C/man2/sigpending.2:66
4759 #: build/C/man2/sigprocmask.2:114 build/C/man3/sigqueue.3:121
4760 #: build/C/man3/sigsetops.3:147 build/C/man2/sigsuspend.2:86
4761 #: build/C/man3/sigwait.3:87 build/C/man2/sigwaitinfo.2:135
4762 #: build/C/man2/timer_create.2:197 build/C/man2/timer_delete.2:69
4763 #: build/C/man2/timer_getoverrun.2:99 build/C/man2/timer_settime.2:209
4764 msgid "POSIX.1-2001."
4765 msgstr "POSIX.1-2001."
4766
4767 #. type: Plain text
4768 #: build/C/man7/sigevent.7:142
4769 msgid "B<timer_create>(2), B<aio_fsync>(3), B<aio_read>(3), B<aio_write>(3), B<getaddrinfo_a>(3), B<lio_listio>(3), B<mq_notify>(3), B<aio>(7), B<pthreads>(7)"
4770 msgstr "B<timer_create>(2), B<aio_fsync>(3), B<aio_read>(3), B<aio_write>(3), B<getaddrinfo_a>(3), B<lio_listio>(3), B<mq_notify>(3), B<aio>(7), B<pthreads>(7)"
4771
4772 #. type: TH
4773 #: build/C/man3/siginterrupt.3:31
4774 #, no-wrap
4775 msgid "SIGINTERRUPT"
4776 msgstr "SIGINTERRUPT"
4777
4778 #. type: TH
4779 #: build/C/man3/siginterrupt.3:31
4780 #, no-wrap
4781 msgid "2014-06-13"
4782 msgstr "2014-06-13"
4783
4784 #. type: Plain text
4785 #: build/C/man3/siginterrupt.3:34
4786 msgid "siginterrupt - allow signals to interrupt system calls"
4787 msgstr "siginterrupt - シグナルでシステムコールに割り込むことを許す"
4788
4789 #. type: Plain text
4790 #: build/C/man3/siginterrupt.3:39
4791 #, no-wrap
4792 msgid "B<int siginterrupt(int >I<sig>B<, int >I<flag>B<);>\n"
4793 msgstr "B<int siginterrupt(int >I<sig>B<, int >I<flag>B<);>\n"
4794
4795 #. type: Plain text
4796 #: build/C/man3/siginterrupt.3:47
4797 msgid "B<siginterrupt>():"
4798 msgstr "B<siginterrupt>():"
4799
4800 #. type: Plain text
4801 #: build/C/man3/siginterrupt.3:64
4802 msgid "The B<siginterrupt>()  function changes the restart behavior when a system call is interrupted by the signal I<sig>.  If the I<flag> argument is false (0), then system calls will be restarted if interrupted by the specified signal I<sig>.  This is the default behavior in Linux."
4803 msgstr "B<siginterrupt>()  関数は、システムコールがシグナル I<sig> によって割り込まれた後、再実行の際の振る舞いを変更する。 I<flag> 引き数が偽 (0) ならば、システムコールが指定した シグナル I<sig> によって割り込まれた後に、そのシステムコールは 再実行される。これは Linux においてデフォルトの動作である。"
4804
4805 #. type: Plain text
4806 #: build/C/man3/siginterrupt.3:69
4807 msgid "If the I<flag> argument is true (1) and no data has been transferred, then a system call interrupted by the signal I<sig> will return -1 and I<errno> will be set to B<EINTR>."
4808 msgstr "I<flag> 引き数が真 (1) でデータの転送が全く行なわれていないならば、 シグナル I<sig> でシステムコールは中断されて、-1 が返され、 I<errno> に B<EINTR> が設定される。"
4809
4810 #. type: Plain text
4811 #: build/C/man3/siginterrupt.3:73
4812 msgid "If the I<flag> argument is true (1) and data transfer has started, then the system call will be interrupted and will return the actual amount of data transferred."
4813 msgstr "I<flag> 引き数が真 (1) でデータの転送が開始されていれば、 システムコールは中断され、それまでに実際に転送されたデータ の量が返される。"
4814
4815 #. type: Plain text
4816 #: build/C/man3/siginterrupt.3:83
4817 msgid "The B<siginterrupt>()  function returns 0 on success.  It returns -1 if the signal number I<sig> is invalid, with I<errno> set to indicate the cause of the error."
4818 msgstr "B<siginterrupt>()  関数は成功した場合 0 を返す。 シグナル番号 I<sig> が不正な場合、 -1 を返し、 I<errno> にエラーの原因を示す値を設定する。"
4819
4820 #. type: Plain text
4821 #: build/C/man3/siginterrupt.3:87
4822 msgid "The specified signal number is invalid."
4823 msgstr "指定したシグナル番号が不正である。"
4824
4825 #. type: Plain text
4826 #: build/C/man3/siginterrupt.3:93
4827 msgid "The B<siginterrupt>()  function uses a global variable that is not protected, so it is not thread-safe."
4828 msgstr "B<siginterrupt>() 関数は保護されていないグローバル変数を使用しているので、スレッドセーフではない。"
4829
4830 #. type: Plain text
4831 #: build/C/man3/siginterrupt.3:102
4832 msgid "4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<siginterrupt>()  as obsolete, recommending the use of B<sigaction>(2)  with the B<SA_RESTART> flag instead."
4833 msgstr "4.3BSD, POSIX.1-2001.  POSIX.1-2008 は、 B<siginterrupt>()  を廃止予定としている。 代わりに、 B<sigaction>(2)  に B<SA_RESTART> フラグを指定して使うことを推奨している。"
4834
4835 #. type: Plain text
4836 #: build/C/man3/siginterrupt.3:104
4837 msgid "B<signal>(2)"
4838 msgstr "B<signal>(2)"
4839
4840 #. type: TH
4841 #: build/C/man2/signal.2:36 build/C/man7/signal.7:46
4842 #, no-wrap
4843 msgid "SIGNAL"
4844 msgstr "SIGNAL"
4845
4846 #. type: TH
4847 #: build/C/man2/signal.2:36 build/C/man3/sigpause.3:25
4848 #: build/C/man2/sigwaitinfo.2:25 build/C/man2/timer_create.2:33
4849 #: build/C/man2/wait.2:49
4850 #, no-wrap
4851 msgid "2014-08-19"
4852 msgstr "2014-08-19"
4853
4854 #. type: Plain text
4855 #: build/C/man2/signal.2:39
4856 msgid "signal - ANSI C signal handling"
4857 msgstr "signal - ANSI C シグナル操作"
4858
4859 #. type: Plain text
4860 #: build/C/man2/signal.2:45
4861 msgid "B<sighandler_t signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
4862 msgstr "B<sighandler_t signal(int >I<signum>B<, sighandler_t >I<sighandler>B<);>"
4863
4864 #. type: Plain text
4865 #: build/C/man2/signal.2:54
4866 msgid "The behavior of B<signal>()  varies across UNIX versions, and has also varied historically across different versions of Linux.  B<Avoid its use>: use B<sigaction>(2)  instead.  See I<Portability> below."
4867 msgstr "B<signal>()  の動作は UNIX のバージョンにより異なる。 また、歴史的に見て Linux のバージョンによっても異なっている。 B<このシステムコールの使用は避け、> 代わりに B<sigaction>(2)  を使用すること。 下記の「移植性」を参照。"
4868
4869 #. type: Plain text
4870 #: build/C/man2/signal.2:64
4871 msgid "B<signal>()  sets the disposition of the signal I<signum> to I<handler>, which is either B<SIG_IGN>, B<SIG_DFL>, or the address of a programmer-defined function (a \"signal handler\")."
4872 msgstr "B<signal>()  はシグナル I<signum> の処理方法を I<handler> に設定する。 I<handler> には、 B<SIG_IGN>、 B<SIG_DFL>、 プログラマが定義した関数 (「シグナルハンドラー」) のアドレスの いずれかを指定する。"
4873
4874 #. type: Plain text
4875 #: build/C/man2/signal.2:68
4876 msgid "If the signal I<signum> is delivered to the process, then one of the following happens:"
4877 msgstr "シグナル I<signum> がプロセスに配送されると、以下のいずれかが発生する。"
4878
4879 #. type: Plain text
4880 #: build/C/man2/signal.2:73
4881 msgid "If the disposition is set to B<SIG_IGN>, then the signal is ignored."
4882 msgstr "処理方法が B<SIG_IGN> に設定されている場合、そのシグナルは無視される。"
4883
4884 #. type: Plain text
4885 #: build/C/man2/signal.2:80
4886 msgid "If the disposition is set to B<SIG_DFL>, then the default action associated with the signal (see B<signal>(7))  occurs."
4887 msgstr "処理方法が B<SIG_DFL> に設定されている場合、シグナルに関連づけられた デフォルトの動作が行われる (B<signal>(7)  参照)。"
4888
4889 #. type: Plain text
4890 #: build/C/man2/signal.2:91
4891 msgid "If the disposition is set to a function, then first either the disposition is reset to B<SIG_DFL>, or the signal is blocked (see I<Portability> below), and then I<handler> is called with argument I<signum>.  If invocation of the handler caused the signal to be blocked, then the signal is unblocked upon return from the handler."
4892 msgstr "処理方法として関数が設定されている場合、 まず最初に処理方法が B<SIG_DFL> にリセットされるかそのシグナルのブロックが実行された後、 I<signum> を引き数として I<handler> が呼び出される。 ハンドラーが起動される際にシグナルがブロックされた場合、 ハンドラーが返る際にそのシグナルのブロックが解除される。"
4893
4894 #. type: Plain text
4895 #: build/C/man2/signal.2:97
4896 msgid "The signals B<SIGKILL> and B<SIGSTOP> cannot be caught or ignored."
4897 msgstr "シグナル B<SIGKILL> と B<SIGSTOP> は捕捉できず、無視することもできない。"
4898
4899 #. type: Plain text
4900 #: build/C/man2/signal.2:105
4901 msgid "B<signal>()  returns the previous value of the signal handler, or B<SIG_ERR> on error.  In the event of an error, I<errno> is set to indicate the cause."
4902 msgstr "B<signal>()  は、今までのシグナルハンドラーの値を返す。 エラーの場合は B<SIG_ERR> を返し、 I<errno> にエラーの原因を示す値を設定する。"
4903
4904 #. type: Plain text
4905 #: build/C/man2/signal.2:110
4906 msgid "I<signum> is invalid."
4907 msgstr "I<signum> が不正である。"
4908
4909 #. type: Plain text
4910 #: build/C/man2/signal.2:116
4911 msgid "The effects of B<signal>()  in a multithreaded process are unspecified."
4912 msgstr "マルチスレッドプロセスにおける B<signal>()  の結果は、指定されていない。"
4913
4914 #. type: Plain text
4915 #: build/C/man2/signal.2:141
4916 msgid "See B<sigaction>(2)  for details on what happens when B<SIGCHLD> is set to B<SIG_IGN>."
4917 msgstr "B<SIGCHLD> の動作として B<SIG_IGN> を設定した場合の詳細な動作については、 B<sigaction>(2)  を参照すること。"
4918
4919 #. type: Plain text
4920 #: build/C/man2/signal.2:146
4921 msgid "See B<signal>(7)  for a list of the async-signal-safe functions that can be safely called from inside a signal handler."
4922 msgstr "シグナルハンドラー内から安全に呼び出すことができる、 async-signal-safe functions (非同期シングルで安全な関数) の リストについては B<signal>(7)  を参照。"
4923
4924 #.  libc4 and libc5 define
4925 #.  .IR SignalHandler ;
4926 #. type: Plain text
4927 #: build/C/man2/signal.2:162
4928 msgid "The use of I<sighandler_t> is a GNU extension, exposed if B<_GNU_SOURCE> is defined; glibc also defines (the BSD-derived)  I<sig_t> if B<_BSD_SOURCE> is defined.  Without use of such a type, the declaration of B<signal>()  is the somewhat harder to read:"
4929 msgstr "I<sighandler_t> の使用は GNU 拡張であり、 B<_GNU_SOURCE> が定義された場合に公開される。glibc では B<_BSD_SOURCE> が定義された場合には (BSD 由来の) I<sig_t> も定義される。このような型を使用しないと、 B<signal>() の宣言は読みにくいものとなる。"
4930
4931 #. type: Plain text
4932 #: build/C/man2/signal.2:166
4933 #, no-wrap
4934 msgid "B<void ( *>I<signal>B<(int >I<signum>B<, void (*>I<handler>B<)(int)) ) (int);>\n"
4935 msgstr "B<void ( *>I<signal>B<(int >I<signum>B<, void (*>I<handler>B<)(int)) ) (int);>\n"
4936
4937 #. type: SS
4938 #: build/C/man2/signal.2:168
4939 #, no-wrap
4940 msgid "Portability"
4941 msgstr "移植性"
4942
4943 #. type: Plain text
4944 #: build/C/man2/signal.2:180
4945 msgid "The only portable use of B<signal>()  is to set a signal's disposition to B<SIG_DFL> or B<SIG_IGN>.  The semantics when using B<signal>()  to establish a signal handler vary across systems (and POSIX.1 explicitly permits this variation); B<do not use it for this purpose.>"
4946 msgstr "移植性のある B<signal>()  の使い方は、シグナルの処理方法を B<SIG_DFL> か B<SIG_IGN> に設定する方法だけである。 シグナルハンドラーを設定するのに B<signal>()  を使ったときの動作はシステムにより異なる (POSIX.1 は明示的にこの違いを認めている)。 B<移植性が必要なときはこのシステムコールを使用しないこと。>"
4947
4948 #. type: Plain text
4949 #: build/C/man2/signal.2:186
4950 msgid "POSIX.1 solved the portability mess by specifying B<sigaction>(2), which provides explicit control of the semantics when a signal handler is invoked; use that interface instead of B<signal>()."
4951 msgstr "POSIX.1 は、 B<sigaction>(2)  を規定することで移植性に関する混乱を解決した。 B<sigaction>(2)  はシグナルハンドラーが起動される際の挙動を明示的に制御できる。 B<signal>()  の代わりにこのインターフェイスを使うこと。"
4952
4953 #. type: Plain text
4954 #: build/C/man2/signal.2:196
4955 msgid "In the original UNIX systems, when a handler that was established using B<signal>()  was invoked by the delivery of a signal, the disposition of the signal would be reset to B<SIG_DFL>, and the system did not block delivery of further instances of the signal.  This is equivalent to calling B<sigaction>(2)  with the following flags:"
4956 msgstr "オリジナルの UNIX システムでは、 B<signal>()  を使って設定されたハンドラーがシグナルの配送により起動されると、 そのシグナルの処理方法は B<SIG_DFL> にリセットされ、システムは同じシグナルがさらに生成されても シグナルの配送をブロックしなかった。これは、以下のフラグで B<sigaction>(2) を呼び出すのと等価である。"
4957
4958 #. type: Plain text
4959 #: build/C/man2/signal.2:198
4960 #, no-wrap
4961 msgid "    sa.sa_flags = SA_RESETHAND | SA_NODEFER;\n"
4962 msgstr "    sa.sa_flags = SA_RESETHAND | SA_NODEFER;\n"
4963
4964 #. type: Plain text
4965 #: build/C/man2/signal.2:205
4966 msgid "System\\ V also provides these semantics for B<signal>().  This was bad because the signal might be delivered again before the handler had a chance to reestablish itself.  Furthermore, rapid deliveries of the same signal could result in recursive invocations of the handler."
4967 msgstr "System\\ V でも、 B<signal>()  に対してこれらの挙動を規定している。 こうした挙動はまずく、ハンドラーがハンドラー自身を再設定する機会が 来るより前に、同じシグナルがまた配送される可能性がある。 さらに、同じシグナルが立て続けに配送されると、同じシグナルが ハンドラーを繰り返し起動されることになる。"
4968
4969 #. type: Plain text
4970 #: build/C/man2/signal.2:220
4971 msgid "BSD improved on this situation, but unfortunately also changed the semantics of the existing B<signal>()  interface while doing so.  On BSD, when a signal handler is invoked, the signal disposition is not reset, and further instances of the signal are blocked from being delivered while the handler is executing.  Furthermore, certain blocking system calls are automatically restarted if interrupted by a signal handler (see B<signal>(7)).  The BSD semantics are equivalent to calling B<sigaction>(2)  with the following flags:"
4972 msgstr "BSD はこの状況が改善したが、残念なことに、その過程で既存の B<signal>() の挙動も変更された。 BSD では、シグナルハンドラーが起動された際、 シグナルの処理方法はリセットされず、 ハンドラーの実行中は、同じシグナルのさらなる生成は配送がブロックされる。 また、 シグナルハンドラーが中断された場合、 停止中のシステムコールのいくつかは自動的に再スタートされる。 BSD の挙動は、 以下のフラグを指定した B<sigaction>(2) の呼び出しと等価である。"
4973
4974 #. type: Plain text
4975 #: build/C/man2/signal.2:222
4976 #, no-wrap
4977 msgid "    sa.sa_flags = SA_RESTART;\n"
4978 msgstr "    sa.sa_flags = SA_RESTART;\n"
4979
4980 #. type: Plain text
4981 #: build/C/man2/signal.2:224
4982 msgid "The situation on Linux is as follows:"
4983 msgstr "Linux での状況は以下の通りである。"
4984
4985 #. type: Plain text
4986 #: build/C/man2/signal.2:228
4987 msgid "The kernel's B<signal>()  system call provides System\\ V semantics."
4988 msgstr "カーネルの B<signal>()  システムコールは System\\ V 方式を提供している。"
4989
4990 #. type: Plain text
4991 #: build/C/man2/signal.2:244
4992 msgid "By default, in glibc 2 and later, the B<signal>()  wrapper function does not invoke the kernel system call.  Instead, it calls B<sigaction>(2)  using flags that supply BSD semantics.  This default behavior is provided as long as the B<_BSD_SOURCE> feature test macro is defined.  By default, B<_BSD_SOURCE> is defined; it is also implicitly defined if one defines B<_GNU_SOURCE>, and can of course be explicitly defined."
4993 msgstr "デフォルトでは、glibc 2 以降では、 B<signal>()  ラッパー関数はカーネルのシステムコールを起動しない。 代わりに、ラッパー関数は BSD 方式を示すフラグを使って B<sigaction>(2)  を呼び出す。 機能検査マクロ B<_BSD_SOURCE> を定義していれば、このデフォルトの動作となる。 デフォルトでは、 B<_BSD_SOURCE> が定義される。 B<_BSD_SOURCE> は B<_GNU_SOURCE> が定義された場合には暗黙のうちに定義され、 もちろん明示的に定義することもできる。"
4994
4995 #.  System V semantics are also provided if one uses the separate
4996 #.  .BR sysv_signal (3)
4997 #.  function.
4998 #.  .IP *
4999 #.  The
5000 #.  .BR signal ()
5001 #.  function in Linux libc4 and libc5 provide System\ V semantics.
5002 #.  If one on a libc5 system includes
5003 #.  .I <bsd/signal.h>
5004 #.  instead of
5005 #.  .IR <signal.h> ,
5006 #.  then
5007 #.  .BR signal ()
5008 #.  provides BSD semantics.
5009 #. type: Plain text
5010 #: build/C/man2/signal.2:278
5011 msgid "On glibc 2 and later, if the B<_BSD_SOURCE> feature test macro is not defined, then B<signal>()  provides System\\ V semantics.  (The default implicit definition of B<_BSD_SOURCE> is not provided if one invokes B<gcc>(1)  in one of its standard modes (I<-std=xxx> or I<-ansi>)  or defines various other feature test macros such as B<_POSIX_SOURCE>, B<_XOPEN_SOURCE>, or B<_SVID_SOURCE>; see B<feature_test_macros>(7).)"
5012 msgstr "glibc 2 以降では、機能検査マクロ B<_BSD_SOURCE> が定義されていなければ、 B<signal>()  は System\\ V 方式となる。 (B<gcc>(1)  が標準指定モード (I<-std=xxx> or I<-ansi>)  で起動された場合、もしくは B<_POSIX_SOURCE>, B<_XOPEN_SOURCE>, B<_SVID_SOURCE> といった他の様々な機能検査マクロが定義された場合、 デフォルトの B<_BSD_SOURCE> の暗黙の定義は行われない。 B<feature_test_macros>(7)  を参照のこと。)"
5013
5014 #. type: Plain text
5015 #: build/C/man2/signal.2:297
5016 msgid "B<kill>(1), B<alarm>(2), B<kill>(2), B<killpg>(2), B<pause>(2), B<sigaction>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), B<sigsuspend>(2), B<bsd_signal>(3), B<raise>(3), B<siginterrupt>(3), B<sigqueue>(3), B<sigsetops>(3), B<sigvec>(3), B<sysv_signal>(3), B<signal>(7)"
5017 msgstr "B<kill>(1), B<alarm>(2), B<kill>(2), B<killpg>(2), B<pause>(2), B<sigaction>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), B<sigsuspend>(2), B<bsd_signal>(3), B<raise>(3), B<siginterrupt>(3), B<sigqueue>(3), B<sigsetops>(3), B<sigvec>(3), B<sysv_signal>(3), B<signal>(7)"
5018
5019 #. type: Plain text
5020 #: build/C/man7/signal.7:49
5021 msgid "signal - overview of signals"
5022 msgstr "signal - シグナルの概要"
5023
5024 #. type: Plain text
5025 #: build/C/man7/signal.7:52
5026 msgid "Linux supports both POSIX reliable signals (hereinafter \"standard signals\") and POSIX real-time signals."
5027 msgstr "Linux は POSIX 信頼シグナル (reliable signal; 以後 \"標準シグナル\"と表記)  と POSIX リアルタイムシグナルの両方に対応している。"
5028
5029 #. type: SS
5030 #: build/C/man7/signal.7:52
5031 #, no-wrap
5032 msgid "Signal dispositions"
5033 msgstr "シグナル処理方法"
5034
5035 #. type: Plain text
5036 #: build/C/man7/signal.7:57
5037 msgid "Each signal has a current I<disposition>, which determines how the process behaves when it is delivered the signal."
5038 msgstr "シグナルはそれぞれ現在の「処理方法 (disposition)」を保持しており、 この処理方法によりシグナルが配送された際にプロセスが どのような振舞いをするかが決まる。"
5039
5040 #. type: Plain text
5041 #: build/C/man7/signal.7:60
5042 msgid "The entries in the \"Action\" column of the tables below specify the default disposition for each signal, as follows:"
5043 msgstr "後述の表の \"動作\" の欄のエントリは各シグナルのデフォルトの 処理方法を示しており、以下のような意味を持つ。"
5044
5045 #. type: IP
5046 #: build/C/man7/signal.7:60
5047 #, no-wrap
5048 msgid "Term"
5049 msgstr "Term"
5050
5051 #. type: Plain text
5052 #: build/C/man7/signal.7:62
5053 msgid "Default action is to terminate the process."
5054 msgstr "デフォルトの動作はプロセス終了。"
5055
5056 #. type: IP
5057 #: build/C/man7/signal.7:62
5058 #, no-wrap
5059 msgid "Ign"
5060 msgstr "Ign"
5061
5062 #. type: Plain text
5063 #: build/C/man7/signal.7:64
5064 msgid "Default action is to ignore the signal."
5065 msgstr "デフォルトの動作はこのシグナルの無視。"
5066
5067 #. type: IP
5068 #: build/C/man7/signal.7:64
5069 #, no-wrap
5070 msgid "Core"
5071 msgstr "Core"
5072
5073 #. type: Plain text
5074 #: build/C/man7/signal.7:67
5075 msgid "Default action is to terminate the process and dump core (see B<core>(5))."
5076 msgstr "デフォルトの動作はプロセス終了とコアダンプ出力 (B<core>(5)  参照)。"
5077
5078 #. type: IP
5079 #: build/C/man7/signal.7:67
5080 #, no-wrap
5081 msgid "Stop"
5082 msgstr "Stop"
5083
5084 #. type: Plain text
5085 #: build/C/man7/signal.7:69
5086 msgid "Default action is to stop the process."
5087 msgstr "デフォルトの動作はプロセスの一時停止。"
5088
5089 #. type: IP
5090 #: build/C/man7/signal.7:69
5091 #, no-wrap
5092 msgid "Cont"
5093 msgstr "Cont"
5094
5095 #. type: Plain text
5096 #: build/C/man7/signal.7:71
5097 msgid "Default action is to continue the process if it is currently stopped."
5098 msgstr "デフォルトの動作は、プロセスが停止中の場合にその実行の再開。"
5099
5100 #. type: Plain text
5101 #: build/C/man7/signal.7:93
5102 msgid "A process can change the disposition of a signal using B<sigaction>(2)  or B<signal>(2).  (The latter is less portable when establishing a signal handler; see B<signal>(2)  for details.)  Using these system calls, a process can elect one of the following behaviors to occur on delivery of the signal: perform the default action; ignore the signal; or catch the signal with a I<signal handler>, a programmer-defined function that is automatically invoked when the signal is delivered.  (By default, the signal handler is invoked on the normal process stack.  It is possible to arrange that the signal handler uses an alternate stack; see B<sigaltstack>(2)  for a discussion of how to do this and when it might be useful.)"
5103 msgstr "プロセスは、 B<sigaction>(2)  や B<signal>(2)  を使って、シグナルの処理方法を変更することができる (B<signal>(2)  の方がシグナルハンドラーを設定する際の移植性が低い; 詳細は B<signal>(2)  を参照)。 シグナルの配送時に起こる動作として プロセスが選択できるのは、次のいずれか一つである。 デフォルトの動作を実行する、シグナルを無視する、 I<シグナルハンドラー (signal handler)> でシグナルを捕捉する。シグナルハンドラーとは、シグナル配送時に 自動的に起動されるプログラマ定義の関数である。 (デフォルトでは、シグナルハンドラーは通常のプロセスのスタック上で起動される。 シグナルハンドラーが代替スタック (alternate stack) を使用するように設定する こともできる。代替スタックを使用するように設定する方法と、どのような際に 代替スタックが役に立つかについての議論については B<sigaltstack>(2)  を参照のこと。"
5104
5105 #. type: Plain text
5106 #: build/C/man7/signal.7:97
5107 msgid "The signal disposition is a per-process attribute: in a multithreaded application, the disposition of a particular signal is the same for all threads."
5108 msgstr "シグナルの処理方法はプロセス単位の属性である。 マルチスレッドのアプリケーションでは、あるシグナルの処理方法は 全てのスレッドで同じである。"
5109
5110 #. type: SS
5111 #: build/C/man7/signal.7:105
5112 #, no-wrap
5113 msgid "Sending a signal"
5114 msgstr "シグナルの送信"
5115
5116 #. type: Plain text
5117 #: build/C/man7/signal.7:108
5118 msgid "The following system calls and library functions allow the caller to send a signal:"
5119 msgstr "以下のシステムコールとライブラリ関数を使って、 呼び出し者はシグナルを送信することができる。"
5120
5121 #. type: TP
5122 #: build/C/man7/signal.7:108
5123 #, no-wrap
5124 msgid "B<raise>(3)"
5125 msgstr "B<raise>(3)"
5126
5127 #. type: Plain text
5128 #: build/C/man7/signal.7:111
5129 msgid "Sends a signal to the calling thread."
5130 msgstr "呼び出したスレッドにシグナルを送る。"
5131
5132 #. type: TP
5133 #: build/C/man7/signal.7:111
5134 #, no-wrap
5135 msgid "B<kill>(2)"
5136 msgstr "B<kill>(2)"
5137
5138 #. type: Plain text
5139 #: build/C/man7/signal.7:116
5140 msgid "Sends a signal to a specified process, to all members of a specified process group, or to all processes on the system."
5141 msgstr "指定されたプロセスや、指定されたプロセスグループの全メンバー、 システムの全プロセスにシグナルを送る。"
5142
5143 #. type: TP
5144 #: build/C/man7/signal.7:116
5145 #, no-wrap
5146 msgid "B<killpg>(2)"
5147 msgstr "B<killpg>(2)"
5148
5149 #. type: Plain text
5150 #: build/C/man7/signal.7:119
5151 msgid "Sends a signal to all of the members of a specified process group."
5152 msgstr "指定されたプロセスグループの全メンバーにシグナルを送る。"
5153
5154 #. type: TP
5155 #: build/C/man7/signal.7:119
5156 #, no-wrap
5157 msgid "B<pthread_kill>(3)"
5158 msgstr "B<pthread_kill>(3)"
5159
5160 #. type: Plain text
5161 #: build/C/man7/signal.7:123
5162 msgid "Sends a signal to a specified POSIX thread in the same process as the caller."
5163 msgstr "呼び出し者と同じプロセス内の指定された POSIX スレッドにシグナルを送る。"
5164
5165 #. type: TP
5166 #: build/C/man7/signal.7:123
5167 #, no-wrap
5168 msgid "B<tgkill>(2)"
5169 msgstr "B<tgkill>(2)"
5170
5171 #. type: Plain text
5172 #: build/C/man7/signal.7:128
5173 msgid "Sends a signal to a specified thread within a specific process.  (This is the system call used to implement B<pthread_kill>(3).)"
5174 msgstr "指定されたプロセス内の指定されたスレッドにシグナルを送る (このシステムコールを使って B<pthread_kill>(3)  は実装されている)。"
5175
5176 #. type: TP
5177 #: build/C/man7/signal.7:128
5178 #, no-wrap
5179 msgid "B<sigqueue>(3)"
5180 msgstr "B<sigqueue>(3)"
5181
5182 #. type: Plain text
5183 #: build/C/man7/signal.7:131
5184 msgid "Sends a real-time signal with accompanying data to a specified process."
5185 msgstr "指定されたプロセスに付属データとともにリアルタイムシグナルを送る。"
5186
5187 #. type: SS
5188 #: build/C/man7/signal.7:131
5189 #, no-wrap
5190 msgid "Waiting for a signal to be caught"
5191 msgstr "シグナルが捕捉されるのを待つ"
5192
5193 #. type: Plain text
5194 #: build/C/man7/signal.7:135
5195 msgid "The following system calls suspend execution of the calling process or thread until a signal is caught (or an unhandled signal terminates the process):"
5196 msgstr "以下のシステムコールを使って、シグナルが捕捉されるまで 呼び出したプロセスやスレッドの実行を中断 (suspend) することができる (ハンドラーが設定されていないシグナルによりそのプロセスが終了した 場合にも実行の停止は終了する)。"
5197
5198 #. type: TP
5199 #: build/C/man7/signal.7:135
5200 #, no-wrap
5201 msgid "B<pause>(2)"
5202 msgstr "B<pause>(2)"
5203
5204 #. type: Plain text
5205 #: build/C/man7/signal.7:138
5206 msgid "Suspends execution until any signal is caught."
5207 msgstr "何かシグナルが捕捉されるまで実行を停止する。"
5208
5209 #. type: TP
5210 #: build/C/man7/signal.7:138
5211 #, no-wrap
5212 msgid "B<sigsuspend>(2)"
5213 msgstr "B<sigsuspend>(2)"
5214
5215 #. type: Plain text
5216 #: build/C/man7/signal.7:142
5217 msgid "Temporarily changes the signal mask (see below) and suspends execution until one of the unmasked signals is caught."
5218 msgstr "一時的にシグナルマスク (下記参照) を変更し、 マスクされていないシグナルのいずれかが捕捉されるまで 実行を中断する。"
5219
5220 #. type: SS
5221 #: build/C/man7/signal.7:142
5222 #, no-wrap
5223 msgid "Synchronously accepting a signal"
5224 msgstr "シグナルの同期受信"
5225
5226 #. type: Plain text
5227 #: build/C/man7/signal.7:149
5228 msgid "Rather than asynchronously catching a signal via a signal handler, it is possible to synchronously accept the signal, that is, to block execution until the signal is delivered, at which point the kernel returns information about the signal to the caller.  There are two general ways to do this:"
5229 msgstr "シグナルハンドラー経由でシグナルを非同期 (asynchronously) で捕捉する以外にも、 シグナルを同期 (synchronously) して受け付けることもできる。 同期して受け付けるとは、シグナルが配送されるまで実行を停止 (block)  するということである。シグナルを受け付けた際に、カーネルは そのシグナルに関する情報を呼び出し者に返す。 これを行う一般的な方法が二つある。"
5230
5231 #. type: Plain text
5232 #: build/C/man7/signal.7:157
5233 msgid "B<sigwaitinfo>(2), B<sigtimedwait>(2), and B<sigwait>(3)  suspend execution until one of the signals in a specified set is delivered.  Each of these calls returns information about the delivered signal."
5234 msgstr "B<sigwaitinfo>(2), B<sigtimedwait>(2), B<sigwait>(3)  は、指定されたシグナル集合のシグナルの一つが配送されるまで実行を中断する。 どのシステムコールや関数でも、配送されたシグナルに関する情報が返される。"
5235
5236 #. type: Plain text
5237 #: build/C/man7/signal.7:170
5238 msgid "B<signalfd>(2)  returns a file descriptor that can be used to read information about signals that are delivered to the caller.  Each B<read>(2)  from this file descriptor blocks until one of the signals in the set specified in the B<signalfd>(2)  call is delivered to the caller.  The buffer returned by B<read>(2)  contains a structure describing the signal."
5239 msgstr "B<signalfd>(2)  が返すファイルディスクリプターを使うと、呼び出し元に配送された シグナルに関する情報を読み出すことができる。 このファイルディスクリプターからの B<read>(2)  は、 B<signalfd>(2)  の呼び出し時に指定されたシグナル集合のシグナルの一つが呼び出し元に 配送されるまで停止 (block) する。 B<read>(2)  が返すバッファーにはシグナルに関する情報を格納した構造体が入っている。"
5240
5241 #. type: SS
5242 #: build/C/man7/signal.7:170
5243 #, no-wrap
5244 msgid "Signal mask and pending signals"
5245 msgstr "シグナルマスクと処理待ちシグナル"
5246
5247 #. type: Plain text
5248 #: build/C/man7/signal.7:177
5249 msgid "A signal may be I<blocked>, which means that it will not be delivered until it is later unblocked.  Between the time when it is generated and when it is delivered a signal is said to be I<pending>."
5250 msgstr "シグナルは I<ブロック (block)> されることがある。ブロックされると、そのシグナルは その後ブロックを解除されるまで配送されなくなる。 シグナルが生成されてから配送されるまでの間、そのシグナルは I<処理待ち (pending)> であると呼ばれる。"
5251
5252 #. type: Plain text
5253 #: build/C/man7/signal.7:186
5254 msgid "Each thread in a process has an independent I<signal mask>, which indicates the set of signals that the thread is currently blocking.  A thread can manipulate its signal mask using B<pthread_sigmask>(3).  In a traditional single-threaded application, B<sigprocmask>(2)  can be used to manipulate the signal mask."
5255 msgstr "プロセス内の各スレッドは、それぞれ独立な I<シグナルマスク (signal mask)> を持つ。シグナルマスクはそのスレッドが現在ブロックしている シグナル集合を示すものである。 スレッドは、 B<pthread_sigmask>(3)  を使って自分のシグナルマスクを操作できる。 伝統的なシングルスレッドのアプリケーションでは、 B<sigprocmask>(2)  を使って、シグナルマスクを操作できる。"
5256
5257 #. type: Plain text
5258 #: build/C/man7/signal.7:192 build/C/man2/sigprocmask.2:126
5259 msgid "A child created via B<fork>(2)  inherits a copy of its parent's signal mask; the signal mask is preserved across B<execve>(2)."
5260 msgstr "B<fork>(2)  経由で作成された子プロセスは親プロセスのシグナルマスクのコピーを継承する。 B<execve>(2)  の前後でシグナルマスクは保持される。"
5261
5262 #. type: Plain text
5263 #: build/C/man7/signal.7:209
5264 msgid "A signal may be generated (and thus pending)  for a process as a whole (e.g., when sent using B<kill>(2))  or for a specific thread (e.g., certain signals, such as B<SIGSEGV> and B<SIGFPE>, generated as a consequence of executing a specific machine-language instruction are thread directed, as are signals targeted at a specific thread using B<pthread_kill>(3)).  A process-directed signal may be delivered to any one of the threads that does not currently have the signal blocked.  If more than one of the threads has the signal unblocked, then the kernel chooses an arbitrary thread to which to deliver the signal."
5265 msgstr "生成されるシグナル (したがって処理待ちとなるシグナル) には、 プロセス全体宛てと特定のスレッド宛てがある。 例えば、プロセス全体宛てのシグナルは B<kill>(2)  を使って送信される。 特定のマシン語の命令の実行の結果として生成される、 B<SIGSEGV> や B<SIGFPE> などのシグナルは、スレッド宛てとなる。 また、 B<pthread_kill>(3)  を使って特定のスレッド宛てに生成されたシグナルも スレッド宛てとなる。 プロセス宛てのシグナルは、そのシグナルをブロックしていないスレッドのうち いずれかの一つに配送することができる。そのシグナルをブロックしていない スレッドが複数ある場合、シグナルを配送するスレッドはカーネルが 無作為に選択する。"
5266
5267 #. type: Plain text
5268 #: build/C/man7/signal.7:216
5269 msgid "A thread can obtain the set of signals that it currently has pending using B<sigpending>(2).  This set will consist of the union of the set of pending process-directed signals and the set of signals pending for the calling thread."
5270 msgstr "スレッドは、 B<sigpending>(2)  を使って、現在処理待ちのシグナル集合を取得することができる。 この集合は、プロセス宛ての処理待ちシグナルと 呼び出したスレッド宛てのシグナルの両方から構成される。"
5271
5272 #. type: Plain text
5273 #: build/C/man7/signal.7:222 build/C/man2/sigpending.2:85
5274 msgid "A child created via B<fork>(2)  initially has an empty pending signal set; the pending signal set is preserved across an B<execve>(2)."
5275 msgstr "B<fork>(2)  経由で作成された子プロセスでは、処理待ちのシグナル集合は空の集合で初期化される。 B<execve>(2)  の前後で、処理待ちのシグナル集合は保持される。"
5276
5277 #. type: SS
5278 #: build/C/man7/signal.7:222
5279 #, no-wrap
5280 msgid "Standard signals"
5281 msgstr "標準シグナル"
5282
5283 #. type: Plain text
5284 #: build/C/man7/signal.7:234
5285 msgid "Linux supports the standard signals listed below.  Several signal numbers are architecture-dependent, as indicated in the \"Value\" column.  (Where three values are given, the first one is usually valid for alpha and sparc, the middle one for x86, arm, and most other architectures, and the last one for mips.  (Values for parisc are I<not> shown; see the Linux kernel source for signal numbering on that architecture.)  A - denotes that a signal is absent on the corresponding architecture.)"
5286 msgstr "Linux は以下に示す標準シグナルに対応している。シグナル番号の一部はアーキテクチャー依存であり、\"値\" 欄に示す通りである。 (3つの値が書かれているものは、 1つ目が alpha と sparc で通常有効な値、 真ん中が x86, arm や他のほとんどのアーキテクチャーでの有効な値、最後が mips での値である。 (parisc での値は記載されてI<いない>。 parisc でのシグナル番号は Linux カーネルソースを参照してほしい)。 - はそのアーキテクチャーにおいて対応するシグナルがないことを示す。)"
5287
5288 #. type: Plain text
5289 #: build/C/man7/signal.7:236
5290 msgid "First the signals described in the original POSIX.1-1990 standard."
5291 msgstr "最初に、POSIX.1-1990 に定義されているシグナルを示す。"
5292
5293 #. type: tbl table
5294 #: build/C/man7/signal.7:240 build/C/man7/signal.7:276
5295 #: build/C/man7/signal.7:305
5296 #, no-wrap
5297 msgid "Signal\tValue\tAction\tComment\n"
5298 msgstr "シグナル\t値\t動作\tコメント\n"
5299
5300 #. type: tbl table
5301 #: build/C/man7/signal.7:241
5302 #, no-wrap
5303 msgid "SIGHUP\t\\01\tTerm\tHangup detected on controlling terminal\n"
5304 msgstr "SIGHUP\t\\01\tTerm\t制御端末(controlling terminal)のハングアップ検出、\n"
5305
5306 #. type: tbl table
5307 #: build/C/man7/signal.7:242
5308 #, no-wrap
5309 msgid "\t\t\tor death of controlling process\n"
5310 msgstr "\t\t\tまたは制御しているプロセスの死\n"
5311
5312 #. type: tbl table
5313 #: build/C/man7/signal.7:243
5314 #, no-wrap
5315 msgid "SIGINT\t\\02\tTerm\tInterrupt from keyboard\n"
5316 msgstr "SIGINT\t\\02\tTerm\tキーボードからの割り込み (Interrupt)\n"
5317
5318 #. type: tbl table
5319 #: build/C/man7/signal.7:244
5320 #, no-wrap
5321 msgid "SIGQUIT\t\\03\tCore\tQuit from keyboard\n"
5322 msgstr "SIGQUIT\t\\03\tCore\tキーボードによる中止 (Quit)\n"
5323
5324 #. type: tbl table
5325 #: build/C/man7/signal.7:245
5326 #, no-wrap
5327 msgid "SIGILL\t\\04\tCore\tIllegal Instruction\n"
5328 msgstr "SIGILL\t\\04\tCore\t不正な命令\n"
5329
5330 #. type: tbl table
5331 #: build/C/man7/signal.7:246
5332 #, no-wrap
5333 msgid "SIGABRT\t\\06\tCore\tAbort signal from B<abort>(3)\n"
5334 msgstr "SIGABRT\t\\06\tCore\tB<abort>(3) からの中断 (Abort) シグナル\n"
5335
5336 #. type: tbl table
5337 #: build/C/man7/signal.7:247
5338 #, no-wrap
5339 msgid "SIGFPE\t\\08\tCore\tFloating point exception\n"
5340 msgstr "SIGFPE\t\\08\tCore\t浮動小数点例外\n"
5341
5342 #. type: tbl table
5343 #: build/C/man7/signal.7:248
5344 #, no-wrap
5345 msgid "SIGKILL\t\\09\tTerm\tKill signal\n"
5346 msgstr "SIGKILL\t\\09\tTerm\tKill シグナル\n"
5347
5348 #. type: tbl table
5349 #: build/C/man7/signal.7:249
5350 #, no-wrap
5351 msgid "SIGSEGV\t11\tCore\tInvalid memory reference\n"
5352 msgstr "SIGSEGV\t11\tCore\t不正なメモリー参照\n"
5353
5354 #. type: tbl table
5355 #: build/C/man7/signal.7:250
5356 #, no-wrap
5357 msgid "SIGPIPE\t13\tTerm\tBroken pipe: write to pipe with no\n"
5358 msgstr "SIGPIPE\t13\tTerm\tパイプ破壊:\n"
5359
5360 #. type: tbl table
5361 #: build/C/man7/signal.7:251
5362 #, no-wrap
5363 msgid "\t\t\treaders\n"
5364 msgstr "\t\t\t読み手の無いパイプへの書き出し\n"
5365
5366 #. type: tbl table
5367 #: build/C/man7/signal.7:252
5368 #, no-wrap
5369 msgid "SIGALRM\t14\tTerm\tTimer signal from B<alarm>(2)\n"
5370 msgstr "SIGALRM\t14\tTerm\tB<alarm>(2) からのタイマーシグナル\n"
5371
5372 #. type: tbl table
5373 #: build/C/man7/signal.7:253
5374 #, no-wrap
5375 msgid "SIGTERM\t15\tTerm\tTermination signal\n"
5376 msgstr "SIGTERM\t15\tTerm\t終了 (termination) シグナル\n"
5377
5378 #. type: tbl table
5379 #: build/C/man7/signal.7:254
5380 #, no-wrap
5381 msgid "SIGUSR1\t30,10,16\tTerm\tUser-defined signal 1\n"
5382 msgstr "SIGUSR1\t30,10,16\tTerm\tユーザー定義シグナル 1\n"
5383
5384 #. type: tbl table
5385 #: build/C/man7/signal.7:255
5386 #, no-wrap
5387 msgid "SIGUSR2\t31,12,17\tTerm\tUser-defined signal 2\n"
5388 msgstr "SIGUSR2\t31,12,17\tTerm\tユーザー定義シグナル 2\n"
5389
5390 #. type: tbl table
5391 #: build/C/man7/signal.7:256
5392 #, no-wrap
5393 msgid "SIGCHLD\t20,17,18\tIgn\tChild stopped or terminated\n"
5394 msgstr "SIGCHLD\t20,17,18\tIgn\t子プロセスの一時停止 (stop) または終了\n"
5395
5396 #. type: tbl table
5397 #: build/C/man7/signal.7:257
5398 #, no-wrap
5399 msgid "SIGCONT\t19,18,25\tCont\tContinue if stopped\n"
5400 msgstr "SIGCONT\t19,18,25\tCont\t一時停止 (stop) からの再開\n"
5401
5402 #. type: tbl table
5403 #: build/C/man7/signal.7:258
5404 #, no-wrap
5405 msgid "SIGSTOP\t17,19,23\tStop\tStop process\n"
5406 msgstr "SIGSTOP\t17,19,23\tStop\tプロセスの一時停止 (stop)\n"
5407
5408 #. type: tbl table
5409 #: build/C/man7/signal.7:259
5410 #, no-wrap
5411 msgid "SIGTSTP\t18,20,24\tStop\tStop typed at terminal\n"
5412 msgstr "SIGTSTP\t18,20,24\tStop\t端末より入力された一時停止 (stop)\n"
5413
5414 #. type: tbl table
5415 #: build/C/man7/signal.7:260
5416 #, no-wrap
5417 msgid "SIGTTIN\t21,21,26\tStop\tTerminal input for background process\n"
5418 msgstr "SIGTTIN\t21,21,26\tStop\tバックグランドプロセスの端末入力\n"
5419
5420 #. type: tbl table
5421 #: build/C/man7/signal.7:261
5422 #, no-wrap
5423 msgid "SIGTTOU\t22,22,27\tStop\tTerminal output for background process\n"
5424 msgstr "SIGTTOU\t22,22,27\tStop\tバックグランドプロセスの端末出力\n"
5425
5426 #. type: Plain text
5427 #: build/C/man7/signal.7:269
5428 msgid "The signals B<SIGKILL> and B<SIGSTOP> cannot be caught, blocked, or ignored."
5429 msgstr "シグナル B<SIGKILL> と B<SIGSTOP> はキャッチ、ブロック、無視できない。"
5430
5431 #. type: Plain text
5432 #: build/C/man7/signal.7:272
5433 msgid "Next the signals not in the POSIX.1-1990 standard but described in SUSv2 and POSIX.1-2001."
5434 msgstr "次に、 POSIX.1-1990 標準にはないが、 SUSv2 と POSIX.1-2001 に記述されているシグナルを示す。"
5435
5436 #. type: tbl table
5437 #: build/C/man7/signal.7:277
5438 #, no-wrap
5439 msgid "SIGBUS\t10,7,10\tCore\tBus error (bad memory access)\n"
5440 msgstr "SIGBUS\t10,7,10\tCore\tバスエラー (不正なメモリーアクセス)\n"
5441
5442 #. type: tbl table
5443 #: build/C/man7/signal.7:278
5444 #, no-wrap
5445 msgid "SIGPOLL\t\tTerm\tPollable event (Sys V).\n"
5446 msgstr "SIGPOLL\t\tTerm\tポーリング可能なイベント (Sys V)。\n"
5447
5448 #. type: tbl table
5449 #: build/C/man7/signal.7:279
5450 #, no-wrap
5451 msgid "\t\t\tSynonym for B<SIGIO>\n"
5452 msgstr "\t\t\tB<SIGIO> と同義\n"
5453
5454 #. type: tbl table
5455 #: build/C/man7/signal.7:280
5456 #, no-wrap
5457 msgid "SIGPROF\t27,27,29\tTerm\tProfiling timer expired\n"
5458 msgstr "SIGPROF\t27,27,29\tTerm\tprofiling タイマーの時間切れ\n"
5459
5460 #. type: tbl table
5461 #: build/C/man7/signal.7:281
5462 #, no-wrap
5463 msgid "SIGSYS\t12,31,12\tCore\tBad argument to routine (SVr4)\n"
5464 msgstr "SIGSYS\t12,31,12\tCore\tルーチンへの引き数が不正 (SVr4)\n"
5465
5466 #. type: tbl table
5467 #: build/C/man7/signal.7:282
5468 #, no-wrap
5469 msgid "SIGTRAP\t5\tCore\tTrace/breakpoint trap\n"
5470 msgstr "SIGTRAP\t5\tCore\tトレース/ブレークポイント トラップ\n"
5471
5472 #. type: tbl table
5473 #: build/C/man7/signal.7:283
5474 #, no-wrap
5475 msgid "SIGURG\t16,23,21\tIgn\tUrgent condition on socket (4.2BSD)\n"
5476 msgstr "SIGURG\t16,23,21\tIgn\tソケットの緊急事態 (urgent condition) (4.2BSD)\n"
5477
5478 #. type: tbl table
5479 #: build/C/man7/signal.7:284
5480 #, no-wrap
5481 msgid "SIGVTALRM\t26,26,28\tTerm\tVirtual alarm clock (4.2BSD)\n"
5482 msgstr "SIGVTALRM\t26,26,28\tTerm\t仮想アラームクロック (4.2BSD)\n"
5483
5484 #. type: tbl table
5485 #: build/C/man7/signal.7:285
5486 #, no-wrap
5487 msgid "SIGXCPU\t24,24,30\tCore\tCPU time limit exceeded (4.2BSD)\n"
5488 msgstr "SIGXCPU\t24,24,30\tCore\tCPU時間制限超過 (4.2BSD)\n"
5489
5490 #. type: tbl table
5491 #: build/C/man7/signal.7:286
5492 #, no-wrap
5493 msgid "SIGXFSZ\t25,25,31\tCore\tFile size limit exceeded (4.2BSD)\n"
5494 msgstr "SIGXFSZ\t25,25,31\tCore\tファイルサイズ制限の超過 (4.2BSD)\n"
5495
5496 #. type: Plain text
5497 #: build/C/man7/signal.7:299
5498 msgid "Up to and including Linux 2.2, the default behavior for B<SIGSYS>, B<SIGXCPU>, B<SIGXFSZ>, and (on architectures other than SPARC and MIPS)  B<SIGBUS> was to terminate the process (without a core dump).  (On some other UNIX systems the default action for B<SIGXCPU> and B<SIGXFSZ> is to terminate the process without a core dump.)  Linux 2.4 conforms to the POSIX.1-2001 requirements for these signals, terminating the process with a core dump."
5499 msgstr "Linux 2.2 以前では、 B<SIGSYS>, B<SIGXCPU>, B<SIGXFSZ> および SPARC と MIPS 以外のアーキテクチャーでの B<SIGBUS> のデフォルトの振る舞いは (コアダンプ出力なしの) プロセス終了であった。 (他の UNIX システムにも B<SIGXCPU> と B<SIGXFSZ> のデフォルトの動作がコアダンプなしのプロセス終了のものがある。)  Linux 2.4 では、POSIX.1-2001 での要求仕様に準拠して、 これらのシグナルで、プロセスを終了させ、コアダンプを出力する ようになっている。"
5500
5501 #. type: Plain text
5502 #: build/C/man7/signal.7:301
5503 msgid "Next various other signals."
5504 msgstr "次にその他の各種シグナルを示す。"
5505
5506 #. type: tbl table
5507 #: build/C/man7/signal.7:306
5508 #, no-wrap
5509 msgid "SIGIOT\t6\tCore\tIOT trap. A synonym for B<SIGABRT>\n"
5510 msgstr "SIGIOT\t6\tCore\tIOT トラップ。B<SIGABRT> と同義\n"
5511
5512 #. type: tbl table
5513 #: build/C/man7/signal.7:307
5514 #, no-wrap
5515 msgid "SIGEMT\t7,-,7\tTerm\n"
5516 msgstr "SIGEMT\t7,-,7\tTerm\n"
5517
5518 #. type: tbl table
5519 #: build/C/man7/signal.7:308
5520 #, no-wrap
5521 msgid "SIGSTKFLT\t-,16,-\tTerm\tStack fault on coprocessor (unused)\n"
5522 msgstr "SIGSTKFLT\t-,16,-\tA\t数値演算プロセッサにおけるスタックフォルト (未使用)\n"
5523
5524 #. type: tbl table
5525 #: build/C/man7/signal.7:309
5526 #, no-wrap
5527 msgid "SIGIO\t23,29,22\tTerm\tI/O now possible (4.2BSD)\n"
5528 msgstr "SIGIO\t23,29,22\tTerm\t入出力が可能になった (4.2BSD)\n"
5529
5530 #. type: tbl table
5531 #: build/C/man7/signal.7:310
5532 #, no-wrap
5533 msgid "SIGCLD\t-,-,18\tIgn\tA synonym for B<SIGCHLD>\n"
5534 msgstr "SIGCLD\t-,-,18\tIgn\tB<SIGCHLD> と同義\n"
5535
5536 #. type: tbl table
5537 #: build/C/man7/signal.7:311
5538 #, no-wrap
5539 msgid "SIGPWR\t29,30,19\tTerm\tPower failure (System V)\n"
5540 msgstr "SIGPWR\t29,30,19\tTerm\t電源喪失 (Power failure) (System V)\n"
5541
5542 #. type: tbl table
5543 #: build/C/man7/signal.7:312
5544 #, no-wrap
5545 msgid "SIGINFO\t29,-,-\t\tA synonym for B<SIGPWR>\n"
5546 msgstr "SIGINFO\t29,-,-\t \tB<SIGPWR> と同義\n"
5547
5548 #. type: tbl table
5549 #: build/C/man7/signal.7:313
5550 #, no-wrap
5551 msgid "SIGLOST\t-,-,-\tTerm\tFile lock lost (unused)\n"
5552 msgstr "SIGLOST\t-,-,-\tTerm\tファイルロックが失われた (未使用)\n"
5553
5554 #. type: tbl table
5555 #: build/C/man7/signal.7:314
5556 #, no-wrap
5557 msgid "SIGWINCH\t28,28,20\tIgn\tWindow resize signal (4.3BSD, Sun)\n"
5558 msgstr "SIGWINCH\t28,28,20\tIgn\tウィンドウ リサイズ シグナル (4.3BSD, Sun)\n"
5559
5560 #. type: tbl table
5561 #: build/C/man7/signal.7:315
5562 #, no-wrap
5563 msgid "SIGUNUSED\t-,31,-\tCore\tSynonymous with B<SIGSYS>\n"
5564 msgstr "SIGUNUSED\t-,31,-\tCore\tB<SIGSYS> と同義\n"
5565
5566 #. type: Plain text
5567 #: build/C/man7/signal.7:325
5568 msgid "(Signal 29 is B<SIGINFO> / B<SIGPWR> on an alpha but B<SIGLOST> on a sparc.)"
5569 msgstr "(シグナル 29 は alpha では B<SIGINFO> / B<SIGPWR> だが、sparc では B<SIGLOST> である。)"
5570
5571 #. type: Plain text
5572 #: build/C/man7/signal.7:331
5573 msgid "B<SIGEMT> is not specified in POSIX.1-2001, but nevertheless appears on most other UNIX systems, where its default action is typically to terminate the process with a core dump."
5574 msgstr "B<SIGEMT> は POSIX.1-2001 に規定されていないが、 その他の多くの UNIX システムに存在する。 デフォルトの動作は多くの場合、コアダンプ出力を伴うプロセスの終了である。"
5575
5576 #. type: Plain text
5577 #: build/C/man7/signal.7:335
5578 msgid "B<SIGPWR> (which is not specified in POSIX.1-2001) is typically ignored by default on those other UNIX systems where it appears."
5579 msgstr "B<SIGPWR> は (POSIX.1-2001 に規定されていないが) このシグナルが存在する 他の UNIX システムでは多くの場合、デフォルト動作は無視である。"
5580
5581 #. type: Plain text
5582 #: build/C/man7/signal.7:339
5583 msgid "B<SIGIO> (which is not specified in POSIX.1-2001) is ignored by default on several other UNIX systems."
5584 msgstr "B<SIGIO> は (POSIX.1-2001 に規定されていないが) いくつかの他の UNIX システムでは デフォルト動作は無視である。"
5585
5586 #.  parisc is the only exception: SIGSYS is 12, SIGUNUSED is 31
5587 #. type: Plain text
5588 #: build/C/man7/signal.7:346
5589 msgid "Where defined, B<SIGUNUSED> is synonymous with B<SIGSYS> on most architectures."
5590 msgstr "B<SIGUNUSED> が定義されている場合には、ほとんどのアーキテクチャーで B<SIGSYS> の同義語となっている。"
5591
5592 #. type: SS
5593 #: build/C/man7/signal.7:346
5594 #, no-wrap
5595 msgid "Real-time signals"
5596 msgstr "リアルタイムシグナル"
5597
5598 #. type: Plain text
5599 #: build/C/man7/signal.7:356
5600 msgid "Linux supports real-time signals as originally defined in the POSIX.1b real-time extensions (and now included in POSIX.1-2001).  The range of supported real-time signals is defined by the macros B<SIGRTMIN> and B<SIGRTMAX>.  POSIX.1-2001 requires that an implementation support at least B<_POSIX_RTSIG_MAX> (8) real-time signals."
5601 msgstr "Linux はリアルタイムシグナルをサポートしている。 リアルタイムシグナルは元々 POSIX.1b のリアルタイム拡張で定義されて いるものであり、現在では POSIX.1-2001 に含まれている。 対応しているリアルタイムシグナルの範囲は、マクロ B<SIGRTMIN> と B<SIGRTMAX> で定義される。 POSIX.1-2001 では、少なくとも B<_POSIX_RTSIG_MAX> (8) 個のリアルタイムシグナルに対応した実装が要求されている。"
5602
5603 #. type: Plain text
5604 #: build/C/man7/signal.7:378
5605 msgid "The Linux kernel supports a range of 32 different real-time signals, numbered 33 to 64.  However, the glibc POSIX threads implementation internally uses two (for NPTL) or three (for LinuxThreads) real-time signals (see B<pthreads>(7)), and adjusts the value of B<SIGRTMIN> suitably (to 34 or 35).  Because the range of available real-time signals varies according to the glibc threading implementation (and this variation can occur at run time according to the available kernel and glibc), and indeed the range of real-time signals varies across UNIX systems, programs should I<never refer to real-time signals using hard-coded numbers>, but instead should always refer to real-time signals using the notation B<SIGRTMIN>+n, and include suitable (run-time) checks that B<SIGRTMIN>+n does not exceed B<SIGRTMAX>."
5606 msgstr "Linux は、32 個の異なるリアルタイムシグナルに対応しており、 その番号は 33 から 64 である。 しかしながら、glibc の POSIX スレッド実装は、 内部で 2個 (NPTL の場合) か 3個 (LinuxThreads の場合) の リアルタイムシグナルを使用しており (B<pthreads>(7)  参照)、 B<SIGRTMIN> の値を適切に (34 か 35 に) 調整する。 利用可能なリアルタイムシグナルの範囲は glibc のスレッド実装により 異なるし (使用するカーネルと glibc により実行時にも変化する)、 UNIX システムの種類によっても異なる。したがって、 プログラムでは「ハードコーディングした数字を使ってのリアルタイムシグナルの 参照は決してすべきではなく」、代わりに B<SIGRTMIN>+n の形で参照すべきである。また、 B<SIGRTMIN>+n が B<SIGRTMAX> を超えていないかのチェックを (実行時に) 適切に行うべきである。"
5607
5608 #. type: Plain text
5609 #: build/C/man7/signal.7:382
5610 msgid "Unlike standard signals, real-time signals have no predefined meanings: the entire set of real-time signals can be used for application-defined purposes."
5611 msgstr "標準シグナルと異なり、リアルタイムシグナルには 事前に定義された意味はない。 リアルタイムシグナルの全部をアプリケーションで定義した用途に使える。"
5612
5613 #. type: Plain text
5614 #: build/C/man7/signal.7:385
5615 msgid "The default action for an unhandled real-time signal is to terminate the receiving process."
5616 msgstr "ハンドリングしないリアルタイムシグナルのデフォルトの動作は 受信したプロセスの終了である。"
5617
5618 #. type: Plain text
5619 #: build/C/man7/signal.7:387
5620 msgid "Real-time signals are distinguished by the following:"
5621 msgstr "リアルタイムシグナルは以下の特徴がある:"
5622
5623 #. type: Plain text
5624 #: build/C/man7/signal.7:391
5625 msgid "Multiple instances of real-time signals can be queued.  By contrast, if multiple instances of a standard signal are delivered while that signal is currently blocked, then only one instance is queued."
5626 msgstr "リアルタイムシグナルは複数の実体をキューに入れることができる。 一方、標準シグナルの場合、そのシグナルがブロックされている間に 同じシグナルの複数のインスタンスが配送されても、 1 つだけがキューに入れられる。"
5627
5628 #. type: Plain text
5629 #: build/C/man7/signal.7:411
5630 msgid "If the signal is sent using B<sigqueue>(3), an accompanying value (either an integer or a pointer) can be sent with the signal.  If the receiving process establishes a handler for this signal using the B<SA_SIGINFO> flag to B<sigaction>(2), then it can obtain this data via the I<si_value> field of the I<siginfo_t> structure passed as the second argument to the handler.  Furthermore, the I<si_pid> and I<si_uid> fields of this structure can be used to obtain the PID and real user ID of the process sending the signal."
5631 msgstr "シグナルが B<sigqueue>(3)  を用いて送信された場合、 付属データ (整数かポインター) をシグナルと共に送信できる。 受信側プロセスが B<sigaction>(2)  に B<SA_SIGINFO> フラグを指定してシグナルハンドラーを設定した場合、 このデータは I<siginfo_t> 構造体の I<si_value> フィールド経由でハンドラーの第 2 引き数として渡され、 利用することができる。 さらに、この構造体の I<si_pid> と I<si_uid> フィールドでシグナルを送信したプロセスの PID と実ユーザー ID を 得ることができる。"
5632
5633 #. type: Plain text
5634 #: build/C/man7/signal.7:420
5635 msgid "Real-time signals are delivered in a guaranteed order.  Multiple real-time signals of the same type are delivered in the order they were sent.  If different real-time signals are sent to a process, they are delivered starting with the lowest-numbered signal.  (I.e., low-numbered signals have highest priority.)  By contrast, if multiple standard signals are pending for a process, the order in which they are delivered is unspecified."
5636 msgstr "リアルタイムシグナルでは配送される順序が保証される。 同じタイプのリアルタイムシグナルは送信された順番に到着する。 異なるリアルタイムシグナルが一つのプロセスに送信された場合、 番号の小さいシグナルから先に到着する。 (つまり小さい番号のシグナルが高い優先順位を持つ。)  対照的に、一つのプロセスに対して複数の標準シグナルが処理待ちとなった場合、 これらのシグナルが配送される順序は不定である。"
5637
5638 #. type: Plain text
5639 #: build/C/man7/signal.7:425
5640 msgid "If both standard and real-time signals are pending for a process, POSIX leaves it unspecified which is delivered first.  Linux, like many other implementations, gives priority to standard signals in this case."
5641 msgstr "一つのプロセスに対して標準シグナルとリアルタイムシグナルの両方が 処理待ちの場合、POSIX はどちらが先に配送されるかを規定していない。 Linux では、他の多くの実装と同様、このような場合には 標準シグナルが優先される。"
5642
5643 #. type: Plain text
5644 #: build/C/man7/signal.7:448
5645 msgid "According to POSIX, an implementation should permit at least B<_POSIX_SIGQUEUE_MAX> (32) real-time signals to be queued to a process.  However, Linux does things differently.  In kernels up to and including 2.6.7, Linux imposes a system-wide limit on the number of queued real-time signals for all processes.  This limit can be viewed and (with privilege) changed via the I</proc/sys/kernel/rtsig-max> file.  A related file, I</proc/sys/kernel/rtsig-nr>, can be used to find out how many real-time signals are currently queued.  In Linux 2.6.8, these I</proc> interfaces were replaced by the B<RLIMIT_SIGPENDING> resource limit, which specifies a per-user limit for queued signals; see B<setrlimit>(2)  for further details."
5646 msgstr "POSIX によれば、1 プロセス毎に最低 B<_POSIX_SIGQUEUE_MAX> (32) 個のリアルタイムシグナルをキューに入れられるべきとしている。 しかし、 Linux では違った実装になっている。カーネル 2.6.7 までは (2.6.7 を含む)、全プロセスでキューに入っているリアルタイムシグナル の数の合計についてシステム全体での制限がある。 この制限は I</proc/sys/kernel/rtsig-max> ファイルで見ることができ、 (権限があれば) 変更もできる。 関係するファイルとして、 I</proc/sys/kernel/rtsig-nr> を見ることで、いくつのリアルタイムシグナルが現在キューに入っているかを 知ることができる。 Linux 2.6.8 で、これらの I</proc> 経由のインターフェースは、 B<RLIMIT_SIGPENDING> リソース制限に置き換えられた。 これは、キューに入るシグナル数に関してユーザー単位に 上限を指定するものである。 詳しくは B<setrlimit>(2)  を参照。"
5647
5648 #. type: SS
5649 #: build/C/man7/signal.7:448
5650 #, no-wrap
5651 msgid "Async-signal-safe functions"
5652 msgstr "非同期シグナルで安全な関数 (async-signal-safe functions)"
5653
5654 #. type: Plain text
5655 #: build/C/man7/signal.7:457
5656 msgid "A signal handler function must be very careful, since processing elsewhere may be interrupted at some arbitrary point in the execution of the program.  POSIX has the concept of \"safe function\".  If a signal interrupts the execution of an unsafe function, and I<handler> calls an unsafe function, then the behavior of the program is undefined."
5657 msgstr "シグナルハンドラー関数には非常に注意しなければならない。 他の場所の処理はプログラム実行の任意の箇所で中断される可能性があるためである。 POSIX には「安全な関数 (safe function)」という概念がある。 シグナルが安全でない関数の実行を中断し、かつ I<handler> が安全でない関数を呼び出した場合、プログラムの挙動は未定義である。"
5658
5659 #. type: Plain text
5660 #: build/C/man7/signal.7:461
5661 msgid "POSIX.1-2004 (also known as POSIX.1-2001 Technical Corrigendum 2)  requires an implementation to guarantee that the following functions can be safely called inside a signal handler:"
5662 msgstr "POSIX.1-2004 (POSIX.1-2001 Technical Corrigendum (正誤表) 2 とも言う) では、 シグナルハンドラー内での安全な呼び出しを保証することが必須の関数として 以下が規定されている。"
5663
5664 #. type: Plain text
5665 #: build/C/man7/signal.7:582
5666 #, no-wrap
5667 msgid ""
5668 "_Exit()\n"
5669 "_exit()\n"
5670 "abort()\n"
5671 "accept()\n"
5672 "access()\n"
5673 "aio_error()\n"
5674 "aio_return()\n"
5675 "aio_suspend()\n"
5676 "alarm()\n"
5677 "bind()\n"
5678 "cfgetispeed()\n"
5679 "cfgetospeed()\n"
5680 "cfsetispeed()\n"
5681 "cfsetospeed()\n"
5682 "chdir()\n"
5683 "chmod()\n"
5684 "chown()\n"
5685 "clock_gettime()\n"
5686 "close()\n"
5687 "connect()\n"
5688 "creat()\n"
5689 "dup()\n"
5690 "dup2()\n"
5691 "execle()\n"
5692 "execve()\n"
5693 "fchmod()\n"
5694 "fchown()\n"
5695 "fcntl()\n"
5696 "fdatasync()\n"
5697 "fork()\n"
5698 "fpathconf()\n"
5699 "fstat()\n"
5700 "fsync()\n"
5701 "ftruncate()\n"
5702 "getegid()\n"
5703 "geteuid()\n"
5704 "getgid()\n"
5705 "getgroups()\n"
5706 "getpeername()\n"
5707 "getpgrp()\n"
5708 "getpid()\n"
5709 "getppid()\n"
5710 "getsockname()\n"
5711 "getsockopt()\n"
5712 "getuid()\n"
5713 "kill()\n"
5714 "link()\n"
5715 "listen()\n"
5716 "lseek()\n"
5717 "lstat()\n"
5718 "mkdir()\n"
5719 "mkfifo()\n"
5720 "open()\n"
5721 "pathconf()\n"
5722 "pause()\n"
5723 "pipe()\n"
5724 "poll()\n"
5725 "posix_trace_event()\n"
5726 "pselect()\n"
5727 "raise()\n"
5728 "read()\n"
5729 "readlink()\n"
5730 "recv()\n"
5731 "recvfrom()\n"
5732 "recvmsg()\n"
5733 "rename()\n"
5734 "rmdir()\n"
5735 "select()\n"
5736 "sem_post()\n"
5737 "send()\n"
5738 "sendmsg()\n"
5739 "sendto()\n"
5740 "setgid()\n"
5741 "setpgid()\n"
5742 "setsid()\n"
5743 "setsockopt()\n"
5744 "setuid()\n"
5745 "shutdown()\n"
5746 "sigaction()\n"
5747 "sigaddset()\n"
5748 "sigdelset()\n"
5749 "sigemptyset()\n"
5750 "sigfillset()\n"
5751 "sigismember()\n"
5752 "signal()\n"
5753 "sigpause()\n"
5754 "sigpending()\n"
5755 "sigprocmask()\n"
5756 "sigqueue()\n"
5757 "sigset()\n"
5758 "sigsuspend()\n"
5759 "sleep()\n"
5760 "sockatmark()\n"
5761 "socket()\n"
5762 "socketpair()\n"
5763 "stat()\n"
5764 "symlink()\n"
5765 "sysconf()\n"
5766 "tcdrain()\n"
5767 "tcflow()\n"
5768 "tcflush()\n"
5769 "tcgetattr()\n"
5770 "tcgetpgrp()\n"
5771 "tcsendbreak()\n"
5772 "tcsetattr()\n"
5773 "tcsetpgrp()\n"
5774 "time()\n"
5775 "timer_getoverrun()\n"
5776 "timer_gettime()\n"
5777 "timer_settime()\n"
5778 "times()\n"
5779 "umask()\n"
5780 "uname()\n"
5781 "unlink()\n"
5782 "utime()\n"
5783 "wait()\n"
5784 "waitpid()\n"
5785 "write()\n"
5786 msgstr ""
5787 "_Exit()\n"
5788 "_exit()\n"
5789 "abort()\n"
5790 "accept()\n"
5791 "access()\n"
5792 "aio_error()\n"
5793 "aio_return()\n"
5794 "aio_suspend()\n"
5795 "alarm()\n"
5796 "bind()\n"
5797 "cfgetispeed()\n"
5798 "cfgetospeed()\n"
5799 "cfsetispeed()\n"
5800 "cfsetospeed()\n"
5801 "chdir()\n"
5802 "chmod()\n"
5803 "chown()\n"
5804 "clock_gettime()\n"
5805 "close()\n"
5806 "connect()\n"
5807 "creat()\n"
5808 "dup()\n"
5809 "dup2()\n"
5810 "execle()\n"
5811 "execve()\n"
5812 "fchmod()\n"
5813 "fchown()\n"
5814 "fcntl()\n"
5815 "fdatasync()\n"
5816 "fork()\n"
5817 "fpathconf()\n"
5818 "fstat()\n"
5819 "fsync()\n"
5820 "ftruncate()\n"
5821 "getegid()\n"
5822 "geteuid()\n"
5823 "getgid()\n"
5824 "getgroups()\n"
5825 "getpeername()\n"
5826 "getpgrp()\n"
5827 "getpid()\n"
5828 "getppid()\n"
5829 "getsockname()\n"
5830 "getsockopt()\n"
5831 "getuid()\n"
5832 "kill()\n"
5833 "link()\n"
5834 "listen()\n"
5835 "lseek()\n"
5836 "lstat()\n"
5837 "mkdir()\n"
5838 "mkfifo()\n"
5839 "open()\n"
5840 "pathconf()\n"
5841 "pause()\n"
5842 "pipe()\n"
5843 "poll()\n"
5844 "posix_trace_event()\n"
5845 "pselect()\n"
5846 "raise()\n"
5847 "read()\n"
5848 "readlink()\n"
5849 "recv()\n"
5850 "recvfrom()\n"
5851 "recvmsg()\n"
5852 "rename()\n"
5853 "rmdir()\n"
5854 "select()\n"
5855 "sem_post()\n"
5856 "send()\n"
5857 "sendmsg()\n"
5858 "sendto()\n"
5859 "setgid()\n"
5860 "setpgid()\n"
5861 "setsid()\n"
5862 "setsockopt()\n"
5863 "setuid()\n"
5864 "shutdown()\n"
5865 "sigaction()\n"
5866 "sigaddset()\n"
5867 "sigdelset()\n"
5868 "sigemptyset()\n"
5869 "sigfillset()\n"
5870 "sigismember()\n"
5871 "signal()\n"
5872 "sigpause()\n"
5873 "sigpending()\n"
5874 "sigprocmask()\n"
5875 "sigqueue()\n"
5876 "sigset()\n"
5877 "sigsuspend()\n"
5878 "sleep()\n"
5879 "sockatmark()\n"
5880 "socket()\n"
5881 "socketpair()\n"
5882 "stat()\n"
5883 "symlink()\n"
5884 "sysconf()\n"
5885 "tcdrain()\n"
5886 "tcflow()\n"
5887 "tcflush()\n"
5888 "tcgetattr()\n"
5889 "tcgetpgrp()\n"
5890 "tcsendbreak()\n"
5891 "tcsetattr()\n"
5892 "tcsetpgrp()\n"
5893 "time()\n"
5894 "timer_getoverrun()\n"
5895 "timer_gettime()\n"
5896 "timer_settime()\n"
5897 "times()\n"
5898 "umask()\n"
5899 "uname()\n"
5900 "unlink()\n"
5901 "utime()\n"
5902 "wait()\n"
5903 "waitpid()\n"
5904 "write()\n"
5905
5906 #. type: Plain text
5907 #: build/C/man7/signal.7:587
5908 msgid "POSIX.1-2008 removes fpathconf(), pathconf(), and sysconf()  from the above list, and adds the following functions:"
5909 msgstr "POSIX.1-2008 では、上記のリストのうち fpathconf(), pathconf(), sysconf()  が削除され、以下の関数が追加された。"
5910
5911 #. type: Plain text
5912 #: build/C/man7/signal.7:610
5913 #, no-wrap
5914 msgid ""
5915 "execl()\n"
5916 "execv()\n"
5917 "faccessat()\n"
5918 "fchmodat()\n"
5919 "fchownat()\n"
5920 "fexecve()\n"
5921 "fstatat()\n"
5922 "futimens()\n"
5923 "linkat()\n"
5924 "mkdirat()\n"
5925 "mkfifoat()\n"
5926 "mknod()\n"
5927 "mknodat()\n"
5928 "openat()\n"
5929 "readlinkat()\n"
5930 "renameat()\n"
5931 "symlinkat()\n"
5932 "unlinkat()\n"
5933 "utimensat()\n"
5934 "utimes()\n"
5935 msgstr ""
5936 "execl()\n"
5937 "execv()\n"
5938 "faccessat()\n"
5939 "fchmodat()\n"
5940 "fchownat()\n"
5941 "fexecve()\n"
5942 "fstatat()\n"
5943 "futimens()\n"
5944 "linkat()\n"
5945 "mkdirat()\n"
5946 "mkfifoat()\n"
5947 "mknod()\n"
5948 "mknodat()\n"
5949 "openat()\n"
5950 "readlinkat()\n"
5951 "renameat()\n"
5952 "symlinkat()\n"
5953 "unlinkat()\n"
5954 "utimensat()\n"
5955 "utimes()\n"
5956
5957 #. type: SS
5958 #: build/C/man7/signal.7:612
5959 #, no-wrap
5960 msgid "Interruption of system calls and library functions by signal handlers"
5961 msgstr "シグナルハンドラーによるシステムコールやライブラリ関数への割り込み"
5962
5963 #. type: Plain text
5964 #: build/C/man7/signal.7:615
5965 msgid "If a signal handler is invoked while a system call or library function call is blocked, then either:"
5966 msgstr "システムコールやライブラリが停止 (block) している間にシグナルハンドラーが 起動されると、以下のどちらかとなる。"
5967
5968 #. type: Plain text
5969 #: build/C/man7/signal.7:617
5970 msgid "the call is automatically restarted after the signal handler returns; or"
5971 msgstr "シグナルが返った後、呼び出しは自動的に再スタートされる。"
5972
5973 #. type: Plain text
5974 #: build/C/man7/signal.7:620
5975 msgid "the call fails with the error B<EINTR>."
5976 msgstr "呼び出しはエラー B<EINTR> で失敗する。"
5977
5978 #. type: Plain text
5979 #: build/C/man7/signal.7:628
5980 msgid "Which of these two behaviors occurs depends on the interface and whether or not the signal handler was established using the B<SA_RESTART> flag (see B<sigaction>(2)).  The details vary across UNIX systems; below, the details for Linux."
5981 msgstr "これらの二つの挙動のうちどちらが起こるかは、インターフェイスにより依存し、 シグナルハンドラーが B<SA_RESTART> フラグ (B<sigaction>(2)  参照) を使って設定されていたかにも依存する。 詳細は UNIX システムによって異なる。 Linux における詳細を以下で説明する。"
5982
5983 #.  The following system calls use ERESTARTSYS,
5984 #.  so that they are restartable
5985 #. type: Plain text
5986 #: build/C/man7/signal.7:637
5987 msgid "If a blocked call to one of the following interfaces is interrupted by a signal handler, then the call will be automatically restarted after the signal handler returns if the B<SA_RESTART> flag was used; otherwise the call will fail with the error B<EINTR>:"
5988 msgstr "以下のインターフェイスのいずれかの呼び出しが停止している間に シグナルハンドラーにより割り込まれた場合、 B<SA_RESTART> フラグが使用されていれば、シグナルハンドラーが返った後に その呼び出しは自動的に再スタートされることになる。 それ以外の場合は、その呼び出しはエラー B<EINTR> で失敗することになる。"
5989
5990 #.  commit 1ca39ab9d21ac93f94b9e3eb364ea9a5cf2aba06
5991 #. type: Plain text
5992 #: build/C/man7/signal.7:672
5993 msgid "B<read>(2), B<readv>(2), B<write>(2), B<writev>(2), and B<ioctl>(2)  calls on \"slow\" devices.  A \"slow\" device is one where the I/O call may block for an indefinite time, for example, a terminal, pipe, or socket.  (A disk is not a slow device according to this definition.)  A B<read>(2)  on an B<eventfd>(2), B<signalfd>(2), B<timerfd>(2), B<fanotify>(7), or B<inotify>(7)  file descriptor is also considered to be a \"slow\" operation.  (Before Linux 3.8, reads from an B<inotify>(7)  file descriptor were not restartable; when interrupted by a signal handler, B<read>(2)  always failed with the error B<EINTR>.)  If an I/O call on a slow device has already transferred some data by the time it is interrupted by a signal handler, then the call will return a success status (normally, the number of bytes transferred)."
5994 msgstr "B<read>(2), B<readv>(2), B<write>(2), B<writev>(2), B<ioctl>(2)  の「遅い (slow)」デバイスに対する呼び出し。 ここでいう「遅い」デバイスとは、I/O 呼び出しが無期限に停止 (block) する 可能性のあるデバイスのことで、例としては端末、パイプ、ソケットがある (この定義では、ディスクは遅いデバイスではない)。 B<eventfd>(2), B<signalfd>(2), B<timerfd>(2), B<fanotify>(7), B<inotify>(7) のファイルディスクリプターに対する B<read>(2) も「遅い」操作と考えられる。 (Linux 3.8 より前であh, B<inotify>(7) ファイルディスクリプターからの読み出しは再開できなかった。シグナルハンドラーによって割り込まれた場合、 B<read>(2) は常にエラー B<EINTR> で失敗していた。) 遅いデバイスに対する I/O 呼び出しが、 シグナルハンドラーにより割り込まれた時点までに何らかのデータを すでに転送していれば、呼び出しは成功ステータス (通常は、転送されたバイト数) を返すことだろう。"
5995
5996 #. type: Plain text
5997 #: build/C/man7/signal.7:676
5998 msgid "B<open>(2), if it can block (e.g., when opening a FIFO; see B<fifo>(7))."
5999 msgstr "停止 (block) する可能性のある B<open>(2)  (例えば、FIFO のオープン時; B<fifo>(7)  参照)。"
6000
6001 #. type: Plain text
6002 #: build/C/man7/signal.7:683
6003 msgid "B<wait>(2), B<wait3>(2), B<wait4>(2), B<waitid>(2), and B<waitpid>(2)."
6004 msgstr "B<wait>(2), B<wait3>(2), B<wait4>(2), B<waitid>(2), B<waitpid>(2)."
6005
6006 #.  If a timeout (setsockopt()) is in effect on the socket, then these
6007 #.  system calls switch to using EINTR.  Consequently, they and are not
6008 #.  automatically restarted, and they show the stop/cont behavior
6009 #.  described below.  (Verified from 2.6.26 source, and by experiment; mtk)
6010 #.  FIXME . What about sendmmsg()?
6011 #. type: Plain text
6012 #: build/C/man7/signal.7:701
6013 msgid "Socket interfaces: B<accept>(2), B<connect>(2), B<recv>(2), B<recvfrom>(2), B<recvmmsg>(2), B<recvmsg>(2), B<send>(2), B<sendto>(2), and B<sendmsg>(2), unless a timeout has been set on the socket (see below)."
6014 msgstr "ソケットインターフェイス: B<accept>(2), B<connect>(2), B<recv>(2), B<recvfrom>(2), B<recvmmsg>(2), B<recvmsg>(2), B<send>(2), B<sendto>(2), B<sendmsg>(2).  但し、ソケットにタイムアウトが設定されていない場合 (下記参照)。"
6015
6016 #. type: Plain text
6017 #: build/C/man7/signal.7:707
6018 msgid "File locking interfaces: B<flock>(2)  and B<fcntl>(2)  B<F_SETLKW>."
6019 msgstr "ファイルロック用インターフェイス: B<flock>(2), B<fcntl>(2)  B<F_SETLKW>."
6020
6021 #. type: Plain text
6022 #: build/C/man7/signal.7:714
6023 msgid "POSIX message queue interfaces: B<mq_receive>(3), B<mq_timedreceive>(3), B<mq_send>(3), and B<mq_timedsend>(3)."
6024 msgstr "POSIX メッセージキューインターフェイス: B<mq_receive>(3), B<mq_timedreceive>(3), B<mq_send>(3), B<mq_timedsend>(3)."
6025
6026 #. type: Plain text
6027 #: build/C/man7/signal.7:719
6028 msgid "B<futex>(2)  B<FUTEX_WAIT> (since Linux 2.6.22; beforehand, always failed with B<EINTR>)."
6029 msgstr "B<futex>(2)  B<FUTEX_WAIT> (Linux 2.6.22 以降; それ以前は常に B<EINTR> で失敗していた)。"
6030
6031 #. type: Plain text
6032 #: build/C/man7/signal.7:723
6033 msgid "B<pthread_mutex_lock>(3), B<pthread_cond_wait>(3), and related APIs."
6034 msgstr "B<pthread_mutex_lock>(3), B<pthread_cond_wait>(3) と関連 API。"
6035
6036 #. type: Plain text
6037 #: build/C/man7/signal.7:730
6038 msgid "POSIX semaphore interfaces: B<sem_wait>(3)  and B<sem_timedwait>(3)  (since Linux 2.6.22; beforehand, always failed with B<EINTR>)."
6039 msgstr "POSIX セマフォインターフェイス: B<sem_wait>(3), B<sem_timedwait>(3)  (Linux 2.6.22 以降; それ以前は常に B<EINTR> で失敗していた)。"
6040
6041 #.  These are the system calls that give EINTR or ERESTARTNOHAND
6042 #.  on interruption by a signal handler.
6043 #. type: Plain text
6044 #: build/C/man7/signal.7:741
6045 msgid "The following interfaces are never restarted after being interrupted by a signal handler, regardless of the use of B<SA_RESTART>; they always fail with the error B<EINTR> when interrupted by a signal handler:"
6046 msgstr "以下のインターフェイスは、 B<SA_RESTART> を使っているどうかに関わらず、シグナルハンドラーにより割り込まれた後、 再スタートすることは決してない。 これらは、シグナルハンドラーにより割り込まれると、常にエラー B<EINTR> で失敗する。"
6047
6048 #. type: Plain text
6049 #: build/C/man7/signal.7:756 build/C/man7/signal.7:831
6050 msgid "\"Input\" socket interfaces, when a timeout (B<SO_RCVTIMEO>)  has been set on the socket using B<setsockopt>(2): B<accept>(2), B<recv>(2), B<recvfrom>(2), B<recvmmsg>(2)  (also with a non-NULL I<timeout> argument), and B<recvmsg>(2)."
6051 msgstr "B<setsockopt>(2)  を使ってタイムアウト (B<SO_RCVTIMEO>) が設定されている「入力」ソケットインターフェース: B<accept>(2), B<recv>(2), B<recvfrom>(2), B<recvmmsg>(2) (NULL 以外の I<timeout> 引き数も指定されている場合), B<recvmsg>(2)"
6052
6053 #.  FIXME . What about sendmmsg()?
6054 #. type: Plain text
6055 #: build/C/man7/signal.7:767 build/C/man7/signal.7:842
6056 msgid "\"Output\" socket interfaces, when a timeout (B<SO_SNDTIMEO>)  has been set on the socket using B<setsockopt>(2): B<connect>(2), B<send>(2), B<sendto>(2), and B<sendmsg>(2)."
6057 msgstr "B<setsockopt>(2)  を使ってタイムアウト (B<SO_SNDTIMEO>) が設定されているソケットインターフェース: B<connect>(2), B<send>(2), B<sendto>(2), B<sendmsg>(2)"
6058
6059 #. type: Plain text
6060 #: build/C/man7/signal.7:774
6061 msgid "Interfaces used to wait for signals: B<pause>(2), B<sigsuspend>(2), B<sigtimedwait>(2), and B<sigwaitinfo>(2)."
6062 msgstr "シグナル待ちに使われるインターフェイス: B<pause>(2), B<sigsuspend>(2), B<sigtimedwait>(2), B<sigwaitinfo>(2)."
6063
6064 #. type: Plain text
6065 #: build/C/man7/signal.7:783
6066 msgid "File descriptor multiplexing interfaces: B<epoll_wait>(2), B<epoll_pwait>(2), B<poll>(2), B<ppoll>(2), B<select>(2), and B<pselect>(2)."
6067 msgstr "ファイルディスクリプター多重インターフェイス: B<epoll_wait>(2), B<epoll_pwait>(2), B<poll>(2), B<ppoll>(2), B<select>(2), B<pselect>(2)."
6068
6069 #.  On some other systems, SA_RESTART does restart these system calls
6070 #. type: Plain text
6071 #: build/C/man7/signal.7:791
6072 msgid "System V IPC interfaces: B<msgrcv>(2), B<msgsnd>(2), B<semop>(2), and B<semtimedop>(2)."
6073 msgstr "System V IPC インターフェイス: B<msgrcv>(2), B<msgsnd>(2), B<semop>(2), B<semtimedop>(2)."
6074
6075 #. type: Plain text
6076 #: build/C/man7/signal.7:797
6077 msgid "Sleep interfaces: B<clock_nanosleep>(2), B<nanosleep>(2), and B<usleep>(3)."
6078 msgstr "スリープ用のインターフェイス: B<clock_nanosleep>(2), B<nanosleep>(2), B<usleep>(3)."
6079
6080 #. type: Plain text
6081 #: build/C/man7/signal.7:799
6082 msgid "B<io_getevents>(2)."
6083 msgstr "B<io_getevents>(2)."
6084
6085 #. type: Plain text
6086 #: build/C/man7/signal.7:805
6087 msgid "The B<sleep>(3)  function is also never restarted if interrupted by a handler, but gives a success return: the number of seconds remaining to sleep."
6088 msgstr "B<sleep>(3)  関数も、ハンドラーにより割り込まれた場合、決して再スタートされることはない。 しかし、成功となり、残っている停止時間を返す。"
6089
6090 #. type: SS
6091 #: build/C/man7/signal.7:805
6092 #, no-wrap
6093 msgid "Interruption of system calls and library functions by stop signals"
6094 msgstr "一時停止シグナルによるシステムコールやライブラリ関数への割り込み"
6095
6096 #. type: Plain text
6097 #: build/C/man7/signal.7:814
6098 msgid "On Linux, even in the absence of signal handlers, certain blocking interfaces can fail with the error B<EINTR> after the process is stopped by one of the stop signals and then resumed via B<SIGCONT>.  This behavior is not sanctioned by POSIX.1, and doesn't occur on other systems."
6099 msgstr "Linux では、シグナルハンドラーが設定されていない場合でも、 いくつかのブロッキング型のインターフェイスは、 プロセスが一時停止 (stop) シグナルの一つにより停止され、 B<SIGCONT> により再開された後に、エラー B<EINTR> で失敗する可能性がある。 この挙動は POSIX.1 で認められておらず、他のシステムでは起こらない。"
6100
6101 #. type: Plain text
6102 #: build/C/man7/signal.7:816
6103 msgid "The Linux interfaces that display this behavior are:"
6104 msgstr "この挙動を示す Linux のインターフェイスは以下の通りである。"
6105
6106 #. type: Plain text
6107 #: build/C/man7/signal.7:845
6108 msgid "B<epoll_wait>(2), B<epoll_pwait>(2)."
6109 msgstr "B<epoll_wait>(2), B<epoll_pwait>(2)."
6110
6111 #. type: Plain text
6112 #: build/C/man7/signal.7:848
6113 msgid "B<semop>(2), B<semtimedop>(2)."
6114 msgstr "B<semop>(2), B<semtimedop>(2)."
6115
6116 #. type: Plain text
6117 #: build/C/man7/signal.7:851
6118 msgid "B<sigtimedwait>(2), B<sigwaitinfo>(2)."
6119 msgstr "B<sigtimedwait>(2), B<sigwaitinfo>(2)."
6120
6121 #.  commit 1ca39ab9d21ac93f94b9e3eb364ea9a5cf2aba06
6122 #. type: Plain text
6123 #: build/C/man7/signal.7:858
6124 msgid "Linux 3.7 and earlier: B<read>(2)  from an B<inotify>(7)  file descriptor."
6125 msgstr "Linux 3.7 以前: B<inotify>(7)  ファイルディスクリプターからの B<read>(2)."
6126
6127 #. type: Plain text
6128 #: build/C/man7/signal.7:864
6129 msgid "Linux 2.6.21 and earlier: B<futex>(2)  B<FUTEX_WAIT>, B<sem_timedwait>(3), B<sem_wait>(3)."
6130 msgstr "Linux 2.6.21 以前: B<futex>(2)  B<FUTEX_WAIT>, B<sem_timedwait>(3), B<sem_wait>(3)."
6131
6132 #. type: Plain text
6133 #: build/C/man7/signal.7:868
6134 msgid "Linux 2.6.8 and earlier: B<msgrcv>(2), B<msgsnd>(2)."
6135 msgstr "Linux 2.6.8 以前: B<msgrcv>(2), B<msgsnd>(2)."
6136
6137 #. type: Plain text
6138 #: build/C/man7/signal.7:871
6139 msgid "Linux 2.4 and earlier: B<nanosleep>(2)."
6140 msgstr "Linux 2.4 以前: B<nanosleep>(2)."
6141
6142 #.  It must be a *very* long time since this was true:
6143 #.  .SH BUGS
6144 #.  .B SIGIO
6145 #.  and
6146 #.  .B SIGLOST
6147 #.  have the same value.
6148 #.  The latter is commented out in the kernel source, but
6149 #.  the build process of some software still thinks that
6150 #.  signal 29 is
6151 #.  .BR SIGLOST .
6152 #. type: Plain text
6153 #: build/C/man7/signal.7:884
6154 msgid "POSIX.1, except as noted."
6155 msgstr "POSIX.1 (注記した内容以外)。"
6156
6157 #. type: Plain text
6158 #: build/C/man7/signal.7:919
6159 msgid "B<kill>(1), B<getrlimit>(2), B<kill>(2), B<killpg>(2), B<restart_syscall>(2), B<rt_sigqueueinfo>(2), B<setitimer>(2), B<setrlimit>(2), B<sgetmask>(2), B<sigaction>(2), B<sigaltstack>(2), B<signal>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), B<sigreturn>(2), B<sigsuspend>(2), B<sigwaitinfo>(2), B<abort>(3), B<bsd_signal>(3), B<longjmp>(3), B<raise>(3), B<pthread_sigqueue>(3), B<sigqueue>(3), B<sigset>(3), B<sigsetops>(3), B<sigvec>(3), B<sigwait>(3), B<strsignal>(3), B<sysv_signal>(3), B<core>(5), B<proc>(5), B<pthreads>(7), B<sigevent>(7)"
6160 msgstr "B<kill>(1), B<getrlimit>(2), B<kill>(2), B<killpg>(2), B<restart_syscall>(2), B<rt_sigqueueinfo>(2), B<setitimer>(2), B<setrlimit>(2), B<sgetmask>(2), B<sigaction>(2), B<sigaltstack>(2), B<signal>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), B<sigreturn>(2), B<sigsuspend>(2), B<sigwaitinfo>(2), B<abort>(3), B<bsd_signal>(3), B<longjmp>(3), B<raise>(3), B<pthread_sigqueue>(3), B<sigqueue>(3), B<sigset>(3), B<sigsetops>(3), B<sigvec>(3), B<sigwait>(3), B<strsignal>(3), B<sysv_signal>(3), B<core>(5), B<proc>(5), B<pthreads>(7), B<sigevent>(7)"
6161
6162 #. type: TH
6163 #: build/C/man2/signalfd.2:20
6164 #, no-wrap
6165 msgid "SIGNALFD"
6166 msgstr "SIGNALFD"
6167
6168 #. type: Plain text
6169 #: build/C/man2/signalfd.2:23
6170 msgid "signalfd - create a file descriptor for accepting signals"
6171 msgstr "signalfd - シグナル受け付け用のファイルディスクリプターを生成する"
6172
6173 #. type: Plain text
6174 #: build/C/man2/signalfd.2:25
6175 msgid "B<#include E<lt>sys/signalfd.hE<gt>>"
6176 msgstr "B<#include E<lt>sys/signalfd.hE<gt>>"
6177
6178 #. type: Plain text
6179 #: build/C/man2/signalfd.2:27
6180 msgid "B<int signalfd(int >I<fd>B<, const sigset_t *>I<mask>B<, int >I<flags>B<);>"
6181 msgstr "B<int signalfd(int >I<fd>B<, const sigset_t *>I<mask>B<, int >I<flags>B<);>"
6182
6183 #. type: Plain text
6184 #: build/C/man2/signalfd.2:38
6185 msgid "B<signalfd>()  creates a file descriptor that can be used to accept signals targeted at the caller.  This provides an alternative to the use of a signal handler or B<sigwaitinfo>(2), and has the advantage that the file descriptor may be monitored by B<select>(2), B<poll>(2), and B<epoll>(7)."
6186 msgstr "B<signalfd>()  は、呼び出し元宛てのシグナルを受け付けるために使用されるファイル ディスクリプターを生成する。 この方法はシグナルハンドラーや B<sigwaitinfo>(2)  を用いる方法の代わりとなるものであり、このファイルディスクリプターを B<select>(2), B<poll>(2), B<epoll>(7)  で監視できるという利点がある。"
6187
6188 #. type: Plain text
6189 #: build/C/man2/signalfd.2:58
6190 msgid "The I<mask> argument specifies the set of signals that the caller wishes to accept via the file descriptor.  This argument is a signal set whose contents can be initialized using the macros described in B<sigsetops>(3).  Normally, the set of signals to be received via the file descriptor should be blocked using B<sigprocmask>(2), to prevent the signals being handled according to their default dispositions.  It is not possible to receive B<SIGKILL> or B<SIGSTOP> signals via a signalfd file descriptor; these signals are silently ignored if specified in I<mask>."
6191 msgstr "I<mask> 引き数には、呼び出し元がこのファイルディスクリプター経由で受け付けたい シグナル集合を指定する。この引き数で指定するシグナル集合の内容は、 B<sigsetops>(3)  で説明されているマクロを使って初期化することができる。 通常、ファイルディスクリプター経由で受信するシグナル集合は、 そのシグナルがデフォルトの配送方法に基いて処理されるのを防ぐために、 B<sigprocmask>(2)  を使ってブロックしておくべきである。 シグナル B<SIGKILL> と B<SIGSTOP> を signalfd ファイルディスクリプター経由で受信することはできない。 これらのシグナルが I<mask> で指定された場合には黙って無視される。"
6192
6193 #. type: Plain text
6194 #: build/C/man2/signalfd.2:72
6195 msgid "If the I<fd> argument is -1, then the call creates a new file descriptor and associates the signal set specified in I<mask> with that descriptor.  If I<fd> is not -1, then it must specify a valid existing signalfd file descriptor, and I<mask> is used to replace the signal set associated with that descriptor."
6196 msgstr "I<fd> 引き数が -1 の場合、 B<signalfd>()  は新しいファイルディスクリプターを生成し、 I<mask> で指定されたシグナル集合をそのファイルディスクリプターに関連付ける。 I<fd> 引き数が -1 以外の場合、 I<fd> には有効な既存の signalfd ファイルディスクリプターを指定しなければならず、 そのディスクリプターに関連付けられているシグナル集合は I<mask> を使って置き換えられる。"
6197
6198 #. type: Plain text
6199 #: build/C/man2/signalfd.2:77
6200 msgid "Starting with Linux 2.6.27, the following values may be bitwise ORed in I<flags> to change the behavior of B<signalfd>():"
6201 msgstr "Linux 2.6.27 以降では、 以下の値のいくつかをビット単位の論理和 (OR) で指定することで、 B<signalfd>()  の振舞いを変更することができる。"
6202
6203 #. type: TP
6204 #: build/C/man2/signalfd.2:77
6205 #, no-wrap
6206 msgid "B<SFD_NONBLOCK>"
6207 msgstr "B<SFD_NONBLOCK>"
6208
6209 #. type: TP
6210 #: build/C/man2/signalfd.2:85
6211 #, no-wrap
6212 msgid "B<SFD_CLOEXEC>"
6213 msgstr "B<SFD_CLOEXEC>"
6214
6215 #. type: Plain text
6216 #: build/C/man2/signalfd.2:102
6217 msgid "B<signalfd>()  returns a file descriptor that supports the following operations:"
6218 msgstr "B<signalfd>()  が返すファイルディスクリプターは以下の操作をサポートしている。"
6219
6220 #. type: Plain text
6221 #: build/C/man2/signalfd.2:121
6222 msgid "If one or more of the signals specified in I<mask> is pending for the process, then the buffer supplied to B<read>(2)  is used to return one or more I<signalfd_siginfo> structures (see below) that describe the signals.  The B<read>(2)  returns information for as many signals as are pending and will fit in the supplied buffer.  The buffer must be at least I<sizeof(struct signalfd_siginfo)> bytes.  The return value of the B<read>(2)  is the total number of bytes read."
6223 msgstr "I<mask> に指定されているシグナルのうち一つ以上がそのプロセスに対して 処理待ち (pending) であれば、それらのシグナルの情報が B<read>(2)  に渡されたバッファーを使って、 I<signalfd_siginfo> 構造体に格納されて返される。 B<read>(2)  は、バッファーに格納可能な範囲でできるだけ多くの処理待ちのシグナルに ついての情報を返す。 バッファーは最低でも I<sizeof(struct signalfd_siginfo)> バイトの大きさがなければならない。 B<read>(2)  の返り値は読み出されたトータルのバイト数である。"
6224
6225 #. type: Plain text
6226 #: build/C/man2/signalfd.2:129
6227 msgid "As a consequence of the B<read>(2), the signals are consumed, so that they are no longer pending for the process (i.e., will not be caught by signal handlers, and cannot be accepted using B<sigwaitinfo>(2))."
6228 msgstr "B<read>(2)  が行われた結果、シグナルは消費され、 これらのシグナルはそのプロセスに対しては処理待ちではなくなる (つまり、シグナルハンドラーで捕捉されることもなく、 B<sigwaitinfo>(2)  を使って受け取ることもできなくなる)。"
6229
6230 #. type: Plain text
6231 #: build/C/man2/signalfd.2:140
6232 msgid "If none of the signals in I<mask> is pending for the process, then the B<read>(2)  either blocks until one of the signals in I<mask> is generated for the process, or fails with the error B<EAGAIN> if the file descriptor has been made nonblocking."
6233 msgstr "I<mask> に指定されているシグナルがそのプロセスに対して一つも処理待ちでなければ、 B<read>(2)  は、 I<mask> で指定されたシグナルのうちいずれか一つがそのプロセスに対して発生するまで 停止 (block) する、もしくはファイルディスクリプターが非停止 (nonblocking)  に設定されている場合はエラー B<EAGAIN> で失敗する。"
6234
6235 #. type: Plain text
6236 #: build/C/man2/signalfd.2:153
6237 msgid "The file descriptor is readable (the B<select>(2)  I<readfds> argument; the B<poll>(2)  B<POLLIN> flag)  if one or more of the signals in I<mask> is pending for the process."
6238 msgstr "I<mask> に指定されたシグナルのうち一つ以上がそのプロセスに対して処理待ちであれば、 ファイルディスクリプターは読み出し可能となる (B<select>(2)  の I<readfds> 引き数や B<poll>(2)  の B<POLLIN> フラグ)。"
6239
6240 #. type: Plain text
6241 #: build/C/man2/signalfd.2:160
6242 msgid "The signalfd file descriptor also supports the other file-descriptor multiplexing APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
6243 msgstr "signalfd ファイルディスクリプターは、これ以外のファイルディスクリプター 多重 API である B<pselect>(2), B<ppoll>(2), B<epoll>(7)  もサポートしている。"
6244
6245 #. type: Plain text
6246 #: build/C/man2/signalfd.2:165
6247 msgid "When the file descriptor is no longer required it should be closed.  When all file descriptors associated with the same signalfd object have been closed, the resources for object are freed by the kernel."
6248 msgstr "ファイルディスクリプターがそれ以降は必要なくなった際には、クローズすべきである。 同じ signalfd オブジェクトに関連付けられたファイルディスクリプターが全て クローズされると、そのオブジェクト用の資源がカーネルにより解放される。"
6249
6250 #. type: SS
6251 #: build/C/man2/signalfd.2:165
6252 #, no-wrap
6253 msgid "The signalfd_siginfo structure"
6254 msgstr "signalfd_siginfo 構造体"
6255
6256 #. type: Plain text
6257 #: build/C/man2/signalfd.2:171
6258 msgid "The format of the I<signalfd_siginfo> structure(s) returned by B<read>(2)s from a signalfd file descriptor is as follows:"
6259 msgstr "signalfd ファイルディスクリプターからの B<read>(2)  で返される I<signalfd_siginfo> 構造体のフォーマットは以下の通りである。"
6260
6261 #.  ssi_trapno is unused on most arches
6262 #.  FIXME Since Linux 2.6.37 there is 'uint16_t ssi_addr_lsb'
6263 #.  in the signalfd_siginfo structure. This needs to be documented.
6264 #. type: Plain text
6265 #: build/C/man2/signalfd.2:198
6266 #, no-wrap
6267 msgid ""
6268 "struct signalfd_siginfo {\n"
6269 "    uint32_t ssi_signo;   /* Signal number */\n"
6270 "    int32_t  ssi_errno;   /* Error number (unused) */\n"
6271 "    int32_t  ssi_code;    /* Signal code */\n"
6272 "    uint32_t ssi_pid;     /* PID of sender */\n"
6273 "    uint32_t ssi_uid;     /* Real UID of sender */\n"
6274 "    int32_t  ssi_fd;      /* File descriptor (SIGIO) */\n"
6275 "    uint32_t ssi_tid;     /* Kernel timer ID (POSIX timers)\n"
6276 "    uint32_t ssi_band;    /* Band event (SIGIO) */\n"
6277 "    uint32_t ssi_overrun; /* POSIX timer overrun count */\n"
6278 "    uint32_t ssi_trapno;  /* Trap number that caused signal */\n"
6279 "    int32_t  ssi_status;  /* Exit status or signal (SIGCHLD) */\n"
6280 "    int32_t  ssi_int;     /* Integer sent by sigqueue(3) */\n"
6281 "    uint64_t ssi_ptr;     /* Pointer sent by sigqueue(3) */\n"
6282 "    uint64_t ssi_utime;   /* User CPU time consumed (SIGCHLD) */\n"
6283 "    uint64_t ssi_stime;   /* System CPU time consumed (SIGCHLD) */\n"
6284 "    uint64_t ssi_addr;    /* Address that generated signal\n"
6285 "                             (for hardware-generated signals) */\n"
6286 "    uint8_t  pad[I<X>];      /* Pad size to 128 bytes (allow for\n"
6287 "                              additional fields in the future) */\n"
6288 "};\n"
6289 msgstr ""
6290 "struct signalfd_siginfo {\n"
6291 "struct signalfd_siginfo {\n"
6292 "    uint32_t ssi_signo;   /* シグナル番号 */\n"
6293 "    int32_t  ssi_errno;   /* エラー番号 (未使用) */\n"
6294 "    int32_t  ssi_code;    /* シグナルコード */\n"
6295 "    uint32_t ssi_pid;     /* 送信元の PID */\n"
6296 "    uint32_t ssi_uid;     /* 送信元の実 UID */\n"
6297 "    int32_t  ssi_fd;      /* ファイルディスクリプター (SIGIO) */\n"
6298 "    uint32_t ssi_tid;     /* カーネルタイマー ID (POSIX タイマー)\n"
6299 "    uint32_t ssi_band;    /* Band イベント (SIGIO) */\n"
6300 "    uint32_t ssi_overrun; /* POSIX タイマーのオーバーラン回数 */\n"
6301 "    uint32_t ssi_trapno;  /* シグナルの原因となったトラップ番号 */\n"
6302 "    int32_t  ssi_status;  /* 終了ステータスかシグナル (SIGCHLD) */\n"
6303 "    int32_t  ssi_int;     /* sigqueue(3) から送られた整数 */\n"
6304 "    uint64_t ssi_ptr;     /* sigqueue(3) から送られたポインター */\n"
6305 "    uint64_t ssi_utime;   /* 消費したユーザー CPU 時間 (SIGCHLD) */\n"
6306 "    uint64_t ssi_stime;   /* 消費したシステム CPU 時間 (SIGCHLD) */\n"
6307 "    uint64_t ssi_addr;    /* シグナルを生成したアドレス\n"
6308 "                             (ハードウェアが生成したシグナルの場合) */\n"
6309 "    uint8_t  pad[I<X>];      /* pad の大きさは 128 バイト\n"
6310 "                             (将来のフィールド追加用の場所の確保) */\n"
6311 "};\n"
6312
6313 #. type: Plain text
6314 #: build/C/man2/signalfd.2:221
6315 msgid "Each of the fields in this structure is analogous to the similarly named field in the I<siginfo_t> structure.  The I<siginfo_t> structure is described in B<sigaction>(2).  Not all fields in the returned I<signalfd_siginfo> structure will be valid for a specific signal; the set of valid fields can be determined from the value returned in the I<ssi_code> field.  This field is the analog of the I<siginfo_t> I<si_code> field; see B<sigaction>(2)  for details."
6316 msgstr "I<signalfd_siginfo> 構造体の各フィールドは、 I<siginfo_t> 構造体の同じような名前のフィールドと同様である。 I<siginfo_t> 構造体については B<sigaction>(2)  に説明がある。 返された I<signalfd_siginfo> 構造体の全てのフィールドがあるシグナルに対して有効なわけではない。 どのフィールドが有効かは、 I<ssi_code> フィールドで返される値から判定することができる。 このフィールドは I<siginfo_t> の I<si_code> フィールドと同様である。詳細は B<sigaction>(2)  を参照。"
6317
6318 #. type: SS
6319 #: build/C/man2/signalfd.2:221 build/C/man2/timerfd_create.2:276
6320 #, no-wrap
6321 msgid "fork(2) semantics"
6322 msgstr "fork(2) での扱い"
6323
6324 #. type: Plain text
6325 #: build/C/man2/signalfd.2:229
6326 msgid "After a B<fork>(2), the child inherits a copy of the signalfd file descriptor.  A B<read>(2)  from the file descriptor in the child will return information about signals queued to the child."
6327 msgstr "B<fork>(2)  が行われると、子プロセスは signalfd ファイルディスクリプターのコピーを 継承する。 子プロセスでこのファイルディスクリプターから B<read>(2)  を行うと、子プロセスに対するキューに入っているシグナルに関する 情報が返される。"
6328
6329 #. type: SS
6330 #: build/C/man2/signalfd.2:229 build/C/man2/timerfd_create.2:288
6331 #, no-wrap
6332 msgid "execve(2) semantics"
6333 msgstr "execve(2) での扱い"
6334
6335 #. type: Plain text
6336 #: build/C/man2/signalfd.2:241
6337 msgid "Just like any other file descriptor, a signalfd file descriptor remains open across an B<execve>(2), unless it has been marked for close-on-exec (see B<fcntl>(2)).  Any signals that were available for reading before the B<execve>(2)  remain available to the newly loaded program.  (This is analogous to traditional signal semantics, where a blocked signal that is pending remains pending across an B<execve>(2).)"
6338 msgstr "他のファイルディスクリプターと全く同様に、 signalfd ファイルディスクリプターも B<execve>(2)  の前後でオープンされたままとなる。但し、そのファイルディスクリプターに close-on-exec のマーク (B<fcntl>(2)  参照) が付いている場合はクローズされる。 B<execve>(2)  の前に読み出し可能となっていた全てのシグナルは新しく起動されたプログラム でも引き続き読み出し可能である (これは伝統的なシグナルの扱いと同じであり、 処理待ちのブロックされたシグナルは B<execve>(2)  の前後で処理待ちのままとなる)。"
6339
6340 #. type: SS
6341 #: build/C/man2/signalfd.2:241
6342 #, no-wrap
6343 msgid "Thread semantics"
6344 msgstr "スレッドでの扱い"
6345
6346 #. type: Plain text
6347 #: build/C/man2/signalfd.2:251
6348 msgid "The semantics of signalfd file descriptors in a multithreaded program mirror the standard semantics for signals.  In other words, when a thread reads from a signalfd file descriptor, it will read the signals that are directed to the thread itself and the signals that are directed to the process (i.e., the entire thread group).  (A thread will not be able to read signals that are directed to other threads in the process.)"
6349 msgstr "マルチスレッドプログラムにおける signalfd ファイルディスクリプターの扱いは シグナルの標準的な扱いと全く同じである。 言い換えると、あるスレッドが signalfd ファイルディスクリプターから 読み出しを行うと、そのスレッド自身宛てのシグナルとプロセス (すなわち スレッドグループ全体) 宛てのシグナルが読み出される。 (スレッドは同じプロセスの他のスレッド宛てのシグナルを読み出すことはできない。)"
6350
6351 #. type: Plain text
6352 #: build/C/man2/signalfd.2:265
6353 msgid "On success, B<signalfd>()  returns a signalfd file descriptor; this is either a new file descriptor (if I<fd> was -1), or I<fd> if I<fd> was a valid signalfd file descriptor.  On error, -1 is returned and I<errno> is set to indicate the error."
6354 msgstr "成功すると、 B<signalfd>()  は signalfd ファイルディスクリプターを返す。 返されるファイルディスクリプターは、 I<fd> が -1 の場合は新規のファイルディスクリプターであり、 I<fd> が有効な signalfd ファイルディスクリプターだった場合は I<fd> 自身である。 エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
6355
6356 #. type: Plain text
6357 #: build/C/man2/signalfd.2:271
6358 msgid "The I<fd> file descriptor is not a valid file descriptor."
6359 msgstr "ファイルディスクリプター I<fd> が有効なファイルディスクリプターでない。"
6360
6361 #.  or, the
6362 #.  .I sizemask
6363 #.  argument is not equal to
6364 #.  .IR sizeof(sigset_t) ;
6365 #. type: Plain text
6366 #: build/C/man2/signalfd.2:279
6367 msgid "I<fd> is not a valid signalfd file descriptor."
6368 msgstr "I<fd> が有効な signalfd ファイルディスクリプターではない。"
6369
6370 #. type: Plain text
6371 #: build/C/man2/signalfd.2:286 build/C/man2/timerfd_create.2:327
6372 msgid "I<flags> is invalid; or, in Linux 2.6.26 or earlier, I<flags> is nonzero."
6373 msgstr "I<flags> が無効である。もしくは、Linux 2.6.26 以前の場合には I<flags> が 0 以外である。"
6374
6375 #. type: Plain text
6376 #: build/C/man2/signalfd.2:289 build/C/man2/timerfd_create.2:330
6377 msgid "The per-process limit of open file descriptors has been reached."
6378 msgstr "オープン済みのファイルディスクリプターの数がプロセスあたりの上限に 達していた。"
6379
6380 #. type: Plain text
6381 #: build/C/man2/signalfd.2:299
6382 msgid "There was insufficient memory to create a new signalfd file descriptor."
6383 msgstr "新しい signalfd ファイルディスクリプターを生成するのに十分なメモリーがなかった。"
6384
6385 #.  signalfd() is in glibc 2.7, but reportedly does not build
6386 #. type: Plain text
6387 #: build/C/man2/signalfd.2:307
6388 msgid "B<signalfd>()  is available on Linux since kernel 2.6.22.  Working support is provided in glibc since version 2.8.  The B<signalfd4>()  system call (see NOTES) is available on Linux since kernel 2.6.27."
6389 msgstr "B<signalfd>()  はカーネル 2.6.22 以降の Linux で利用可能である。 正しく動作する glibc 側のサポートはバージョン 2.8 以降で提供されている。 B<signalfd4>()  システムコール (「注意」参照) は カーネル 2.6.27 以降の Linux で利用可能である。"
6390
6391 #. type: Plain text
6392 #: build/C/man2/signalfd.2:312
6393 msgid "B<signalfd>()  and B<signalfd4>()  are Linux-specific."
6394 msgstr "B<signalfd>()  と B<signalfd4>()  は Linux 固有である。"
6395
6396 #. type: Plain text
6397 #: build/C/man2/signalfd.2:326
6398 msgid "A process can create multiple signalfd file descriptors.  This makes it possible to accept different signals on different file descriptors.  (This may be useful if monitoring the file descriptors using B<select>(2), B<poll>(2), or B<epoll>(7): the arrival of different signals will make different descriptors ready.)  If a signal appears in the I<mask> of more than one of the file descriptors, then occurrences of that signal can be read (once) from any one of the descriptors."
6399 msgstr "一つのプロセスは複数の signalfd ファイルディスクリプターを生成することができる。 これにより、異なるファイルディスクリプターで異なるシグナルを受け取ることが できる (この機能は B<select>(2), B<poll>(2), B<epoll>(7)  を使ってファイルディスクリプターを監視する場合に有用かもしれない。 異なるシグナルが到着すると、異なるファイルディスクリプターが利用可能に なるからだ)。 一つのシグナルが二つ以上のファイルディスクリプターの I<mask> に含まれている場合、そのシグナルの発生はそのシグナルを I<mask> に含むファイルディスクリプターのうちいずれか一つから読み出すことができる。"
6400
6401 #. type: Plain text
6402 #: build/C/man2/signalfd.2:336
6403 msgid "The underlying Linux system call requires an additional argument, I<size_t sizemask>, which specifies the size of the I<mask> argument.  The glibc B<signalfd>()  wrapper function does not include this argument, since it provides the required value for the underlying system call."
6404 msgstr "実際の Linux のシステムコールでは I<size_t sizemask> という引き数が追加で必要である。この引き数で I<mask> のサイズを指定する。 glibc の B<signalfd>()  ラッパー関数にはこの引き数は含まれず、 ラッパー関数が必要な値を計算して内部で呼び出すシステムコールに提供する。"
6405
6406 #. type: Plain text
6407 #: build/C/man2/signalfd.2:352
6408 msgid "There are two underlying Linux system calls: B<signalfd>()  and the more recent B<signalfd4>().  The former system call does not implement a I<flags> argument.  The latter system call implements the I<flags> values described above.  Starting with glibc 2.9, the B<signalfd>()  wrapper function will use B<signalfd4>()  where it is available."
6409 msgstr "下層にある Linux システムコールは二種類あり、 B<signalfd>()  と、もっと新しい B<signalfd4>()  である。 B<signalfd>()  は I<flags> 引き数を実装していない。 B<signalfd4>()  では上記の値の I<flags> が実装されている。 glibc 2.9 以降では、 B<signalfd>()  のラッパー関数は、 B<signalfd4>()  が利用可能であれば、これを使用する。"
6410
6411 #.  The fix also was put into 2.6.24.5
6412 #. type: Plain text
6413 #: build/C/man2/signalfd.2:360
6414 msgid "In kernels before 2.6.25, the I<ssi_ptr> and I<ssi_int> fields are not filled in with the data accompanying a signal sent by B<sigqueue>(3)."
6415 msgstr "カーネル 2.6.25 より前では、 B<sigqueue>(3)  により送信されたシグナルと一緒に渡されるデータでは、フィールド I<ssi_ptr> と I<ssi_int> は設定されない。"
6416
6417 #. type: Plain text
6418 #: build/C/man2/signalfd.2:370
6419 msgid "The program below accepts the signals B<SIGINT> and B<SIGQUIT> via a signalfd file descriptor.  The program terminates after accepting a B<SIGQUIT> signal.  The following shell session demonstrates the use of the program:"
6420 msgstr "下記のプログラムは、シグナル B<SIGINT> と B<SIGQUIT> を signalfd ファイルディスクリプター経由で受信する。 シグナル B<SIGQUIT> 受信後にプログラムは終了する。 以下に示すシェルセッションにこのプログラムの使い方を示す。"
6421
6422 #. type: Plain text
6423 #: build/C/man2/signalfd.2:381
6424 #, no-wrap
6425 msgid ""
6426 "$B< ./signalfd_demo>\n"
6427 "B<^C>                   # Control-C generates SIGINT\n"
6428 "Got SIGINT\n"
6429 "B<^C>\n"
6430 "Got SIGINT\n"
6431 "B<^\\e>                    # Control-\\e generates SIGQUIT\n"
6432 "Got SIGQUIT\n"
6433 "$\n"
6434 msgstr ""
6435 "$B< ./signalfd_demo>\n"
6436 "B<^C>                   # Control-C generates SIGINT\n"
6437 "Got SIGINT\n"
6438 "B<^C>\n"
6439 "Got SIGINT\n"
6440 "B<^\\e>                    # Control-\\e generates SIGQUIT\n"
6441 "Got SIGQUIT\n"
6442 "$\n"
6443
6444 #. type: Plain text
6445 #: build/C/man2/signalfd.2:391
6446 #, no-wrap
6447 msgid ""
6448 "#include E<lt>sys/signalfd.hE<gt>\n"
6449 "#include E<lt>signal.hE<gt>\n"
6450 "#include E<lt>unistd.hE<gt>\n"
6451 "#include E<lt>stdlib.hE<gt>\n"
6452 "#include E<lt>stdio.hE<gt>\n"
6453 msgstr ""
6454 "#include E<lt>sys/signalfd.hE<gt>\n"
6455 "#include E<lt>signal.hE<gt>\n"
6456 "#include E<lt>unistd.hE<gt>\n"
6457 "#include E<lt>stdlib.hE<gt>\n"
6458 "#include E<lt>stdio.hE<gt>\n"
6459
6460 #. type: Plain text
6461 #: build/C/man2/signalfd.2:402
6462 #, no-wrap
6463 msgid ""
6464 "int\n"
6465 "main(int argc, char *argv[])\n"
6466 "{\n"
6467 "    sigset_t mask;\n"
6468 "    int sfd;\n"
6469 "    struct signalfd_siginfo fdsi;\n"
6470 "    ssize_t s;\n"
6471 msgstr ""
6472 "int\n"
6473 "main(int argc, char *argv[])\n"
6474 "{\n"
6475 "    sigset_t mask;\n"
6476 "    int sfd;\n"
6477 "    struct signalfd_siginfo fdsi;\n"
6478 "    ssize_t s;\n"
6479
6480 #. type: Plain text
6481 #: build/C/man2/signalfd.2:406
6482 #, no-wrap
6483 msgid ""
6484 "    sigemptyset(&mask);\n"
6485 "    sigaddset(&mask, SIGINT);\n"
6486 "    sigaddset(&mask, SIGQUIT);\n"
6487 msgstr ""
6488 "    sigemptyset(&mask);\n"
6489 "    sigaddset(&mask, SIGINT);\n"
6490 "    sigaddset(&mask, SIGQUIT);\n"
6491
6492 #. type: Plain text
6493 #: build/C/man2/signalfd.2:409
6494 #, no-wrap
6495 msgid ""
6496 "    /* Block signals so that they aren\\(aqt handled\n"
6497 "       according to their default dispositions */\n"
6498 msgstr ""
6499 "    /* Block signals so that they aren\\(aqt handled\n"
6500 "       according to their default dispositions */\n"
6501
6502 #. type: Plain text
6503 #: build/C/man2/signalfd.2:412
6504 #, no-wrap
6505 msgid ""
6506 "    if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)\n"
6507 "        handle_error(\"sigprocmask\");\n"
6508 msgstr ""
6509 "    if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)\n"
6510 "        handle_error(\"sigprocmask\");\n"
6511
6512 #. type: Plain text
6513 #: build/C/man2/signalfd.2:416
6514 #, no-wrap
6515 msgid ""
6516 "    sfd = signalfd(-1, &mask, 0);\n"
6517 "    if (sfd == -1)\n"
6518 "        handle_error(\"signalfd\");\n"
6519 msgstr ""
6520 "    sfd = signalfd(-1, &mask, 0);\n"
6521 "    if (sfd == -1)\n"
6522 "        handle_error(\"signalfd\");\n"
6523
6524 #. type: Plain text
6525 #: build/C/man2/signalfd.2:421
6526 #, no-wrap
6527 msgid ""
6528 "    for (;;) {\n"
6529 "        s = read(sfd, &fdsi, sizeof(struct signalfd_siginfo));\n"
6530 "        if (s != sizeof(struct signalfd_siginfo))\n"
6531 "            handle_error(\"read\");\n"
6532 msgstr ""
6533 "    for (;;) {\n"
6534 "        s = read(sfd, &fdsi, sizeof(struct signalfd_siginfo));\n"
6535 "        if (s != sizeof(struct signalfd_siginfo))\n"
6536 "            handle_error(\"read\");\n"
6537
6538 #. type: Plain text
6539 #: build/C/man2/signalfd.2:432
6540 #, no-wrap
6541 msgid ""
6542 "        if (fdsi.ssi_signo == SIGINT) {\n"
6543 "            printf(\"Got SIGINT\\en\");\n"
6544 "        } else if (fdsi.ssi_signo == SIGQUIT) {\n"
6545 "            printf(\"Got SIGQUIT\\en\");\n"
6546 "            exit(EXIT_SUCCESS);\n"
6547 "        } else {\n"
6548 "            printf(\"Read unexpected signal\\en\");\n"
6549 "        }\n"
6550 "    }\n"
6551 "}\n"
6552 msgstr ""
6553 "        if (fdsi.ssi_signo == SIGINT) {\n"
6554 "            printf(\"Got SIGINT\\en\");\n"
6555 "        } else if (fdsi.ssi_signo == SIGQUIT) {\n"
6556 "            printf(\"Got SIGQUIT\\en\");\n"
6557 "            exit(EXIT_SUCCESS);\n"
6558 "        } else {\n"
6559 "            printf(\"Read unexpected signal\\en\");\n"
6560 "        }\n"
6561 "    }\n"
6562 "}\n"
6563
6564 #. type: Plain text
6565 #: build/C/man2/signalfd.2:446
6566 msgid "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<sigaction>(2), B<sigprocmask>(2), B<sigwaitinfo>(2), B<timerfd_create>(2), B<sigsetops>(3), B<sigwait>(3), B<epoll>(7), B<signal>(7)"
6567 msgstr "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<sigaction>(2), B<sigprocmask>(2), B<sigwaitinfo>(2), B<timerfd_create>(2), B<sigsetops>(3), B<sigwait>(3), B<epoll>(7), B<signal>(7)"
6568
6569 #. type: TH
6570 #: build/C/man3/sigpause.3:25
6571 #, no-wrap
6572 msgid "SIGPAUSE"
6573 msgstr "SIGPAUSE"
6574
6575 #. type: Plain text
6576 #: build/C/man3/sigpause.3:28
6577 msgid "sigpause - atomically release blocked signals and wait for interrupt"
6578 msgstr "sigpause - ブロックされたシグナルをアトミックに解放して割り込みを待つ"
6579
6580 #. type: Plain text
6581 #: build/C/man3/sigpause.3:33
6582 #, no-wrap
6583 msgid "B<int sigpause(int >I<sigmask>B<);  /* BSD (but see NOTES) */>\n"
6584 msgstr "B<int sigpause(int >I<sigmask>B<);  /* BSD (ただし「備考」を参照) */>\n"
6585
6586 #. type: Plain text
6587 #: build/C/man3/sigpause.3:35
6588 #, no-wrap
6589 msgid "B<int sigpause(int >I<sig>B<);      /* System V / UNIX 95 */>\n"
6590 msgstr "B<int sigpause(int >I<sig>B<);      /* System V / UNIX 95 */>\n"
6591
6592 #. type: Plain text
6593 #: build/C/man3/sigpause.3:41
6594 msgid "Don't use this function.  Use B<sigsuspend>(2)  instead."
6595 msgstr "この関数を使わないこと。 代わりに B<sigsuspend>(2)  を使うこと。"
6596
6597 #. type: Plain text
6598 #: build/C/man3/sigpause.3:48
6599 msgid "The function B<sigpause>()  is designed to wait for some signal.  It changes the process's signal mask (set of blocked signals), and then waits for a signal to arrive.  Upon arrival of a signal, the original signal mask is restored."
6600 msgstr "関数 B<sigpause>()  はシグナルを待つように設計されている。 この関数はプロセスのシグナルマスク (ブロックされたシグナルのセット) を変更し、 シグナルが到着するのを待つ。 シグナルが到着すると、シグナルマスクは元に戻される。"
6601
6602 #. type: Plain text
6603 #: build/C/man3/sigpause.3:56
6604 msgid "If B<sigpause>()  returns, it was interrupted by a signal and the return value is -1 with I<errno> set to B<EINTR>."
6605 msgstr "B<sigpause>()  が返った場合、この関数はシグナルによって割り込まれている。 返り値は -1 で、 I<errno> は B<EINTR> に設定される。"
6606
6607 #. type: Plain text
6608 #: build/C/man3/sigpause.3:61
6609 msgid "The B<sigpause>()  function is thread-safe."
6610 msgstr "B<sigpause>() 関数はスレッドセーフである。"
6611
6612 #. type: Plain text
6613 #: build/C/man3/sigpause.3:65
6614 msgid "The System V version of B<sigpause>()  is standardized in POSIX.1-2001."
6615 msgstr "System V 版の B<sigpause>()  は POSIX.1-2001 で標準化されている。"
6616
6617 #.  __xpg_sigpause: UNIX 95, spec 1170, SVID, SVr4, XPG
6618 #. type: Plain text
6619 #: build/C/man3/sigpause.3:82
6620 msgid "The classical BSD version of this function appeared in 4.2BSD.  It sets the process's signal mask to I<sigmask>.  UNIX 95 standardized the incompatible System V version of this function, which removes only the specified signal I<sig> from the process's signal mask.  The unfortunate situation with two incompatible functions with the same name was solved by the B<\\%sigsuspend>(2)  function, that takes a I<sigset_t\\ *> argument (instead of an I<int>)."
6621 msgstr "この関数の古典的な BSD 版は 4.2BSD で登場した。 この関数はプロセスのシグナルマスクを I<sigmask> に設定する。 UNIX 95 では BSD 版と互換性のない System V 版のこの関数が標準化された。 UNIX 95 版は、指定されたシグナル I<sig> をプロセスのシグナルマスクから削除するだけである。 同じ名前で互換性のない 2 つの関数があるという不幸な事態は、 B<\\%sigsuspend>(2)  関数によって解消された。 この関数は (I<int> の代わりに)  B<sigset_t\\ *> 引き数をとる。"
6622
6623 #. type: Plain text
6624 #: build/C/man3/sigpause.3:85
6625 msgid "On Linux, this routine is a system call only on the Sparc (sparc64)  architecture."
6626 msgstr "Linux では、このルーチンは Sparc (sparc64) アーキテクチャーでのみ システムコールとなっている。"
6627
6628 #.  Libc4 and libc5 know only about the BSD version.
6629 #.  For the BSD version, one usually uses a zero
6630 #.  .I sigmask
6631 #.  to indicate that no signals are to be blocked.
6632 #. type: Plain text
6633 #: build/C/man3/sigpause.3:111
6634 msgid "Glibc uses the BSD version if the B<_BSD_SOURCE> feature test macro is defined and none of B<_POSIX_SOURCE>, B<_POSIX_C_SOURCE>, B<_XOPEN_SOURCE>, B<_GNU_SOURCE>, or B<_SVID_SOURCE> is defined.  Otherwise, the System V version is used (and B<_XOPEN_SOURCE> must be defined to obtain the declaration).  Since glibc 2.19, only the System V version is exposed by I<E<lt>signal.hE<gt>>; applications that formerly used the BSD B<sigpause>()  should be amended to use B<sigsuspend>(2)."
6635 msgstr "機能検査マクロ B<_BSD_SOURCE> が定義され、 B<_POSIX_SOURCE>, B<_POSIX_C_SOURCE>, B<_XOPEN_SOURCE>, B<_GNU_SOURCE>, B<_SVID_SOURCE> のいずれも定義されていない場合、 glibc は BSD 版を使う。 それ以外の場合には、System V 版を使用する (宣言を得るためには B<_XOPEN_SOURCE> が定義されていなければならない)。 glibc 2.19 以降では、 I<E<lt>signal.hE<gt>> では System V 版だけが公開される。 BSD 版の B<sigpause>() を使用していたアプリケーションは B<sigsuspend>(2) を使用するように修正すべきである。"
6636
6637 #. type: Plain text
6638 #: build/C/man3/sigpause.3:119
6639 msgid "B<kill>(2), B<sigaction>(2), B<sigprocmask>(2), B<sigsuspend>(2), B<sigblock>(3), B<sigvec>(3), B<feature_test_macros>(7)"
6640 msgstr "B<kill>(2), B<sigaction>(2), B<sigprocmask>(2), B<sigsuspend>(2), B<sigblock>(3), B<sigvec>(3), B<feature_test_macros>(7)"
6641
6642 #. type: TH
6643 #: build/C/man2/sigpending.2:29
6644 #, no-wrap
6645 msgid "SIGPENDING"
6646 msgstr "SIGPENDING"
6647
6648 #. type: TH
6649 #: build/C/man2/sigpending.2:29
6650 #, no-wrap
6651 msgid "2013-12-11"
6652 msgstr "2013-12-11"
6653
6654 #. type: Plain text
6655 #: build/C/man2/sigpending.2:32
6656 msgid "sigpending - examine pending signals"
6657 msgstr "sigpending - 処理待ちのシグナルの検査"
6658
6659 #. type: Plain text
6660 #: build/C/man2/sigpending.2:36
6661 msgid "B<int sigpending(sigset_t *>I<set>B<);>"
6662 msgstr "B<int sigpending(sigset_t *>I<set>B<);>"
6663
6664 #. type: Plain text
6665 #: build/C/man2/sigpending.2:45
6666 msgid "B<sigpending>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
6667 msgstr "B<sigpending>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
6668
6669 #. type: Plain text
6670 #: build/C/man2/sigpending.2:53
6671 msgid "B<sigpending>()  returns the set of signals that are pending for delivery to the calling thread (i.e., the signals which have been raised while blocked).  The mask of pending signals is returned in I<set>."
6672 msgstr "B<sigpending>()  は、呼び出し元のスレッドへの配送を待っている (pending) シグナル集合 (すなわち、禁止中に発生したシグナル) を返す。 処理待ちのシグナルのマスクが I<set> に格納される。"
6673
6674 #. type: Plain text
6675 #: build/C/man2/sigpending.2:59
6676 msgid "B<sigpending>()  returns 0 on success and -1 on error.  In the event of an error, I<errno> is set to indicate the cause."
6677 msgstr "B<sigpending>() は成功した場合 0 を返す。 エラーの場合、 -1 を返し、I<errno> にエラーの原因を示す値を設定する。"
6678
6679 #. type: Plain text
6680 #: build/C/man2/sigpending.2:64
6681 msgid "I<set> points to memory which is not a valid part of the process address space."
6682 msgstr "I<set> が指しているメモリーが、プロセスのアドレス空間の有効な部分ではない。"
6683
6684 #. type: Plain text
6685 #: build/C/man2/sigpending.2:74
6686 msgid "If a signal is both blocked and has a disposition of \"ignored\", it is I<not> added to the mask of pending signals when generated."
6687 msgstr "シグナルが禁止 (ブロック) されており、かつ配送方法が \"ignored\" (無視) になっている場合、そのシグナルが発生した場合に処理待ちシグナルのマスクにそのシグナルは追加I<されない>。"
6688
6689 #. type: Plain text
6690 #: build/C/man2/sigpending.2:79
6691 msgid "The set of signals that is pending for a thread is the union of the set of signals that is pending for that thread and the set of signals that is pending for the process as a whole; see B<signal>(7)."
6692 msgstr "あるスレッドに対する処理待ちのシグナルの集合は、 そのスレッド自体への処理待ちのシグナル集合と、プロセス全体への処理待ちの シグナル集合をあわせたものである。 B<signal>(7)  参照。"
6693
6694 #. type: Plain text
6695 #: build/C/man2/sigpending.2:91
6696 msgid "In versions of glibc up to and including 2.2.1, there is a bug in the wrapper function for B<sigpending>()  which means that information about pending real-time signals is not correctly returned."
6697 msgstr "バージョン 2.2.1 以前の glibc では、 B<sigpending>()  のラッパー関数に、処理待ちのリアルタイムシグナルに関する情報が 正しく返されないというバグがある。"
6698
6699 #. type: Plain text
6700 #: build/C/man2/sigpending.2:99
6701 msgid "B<kill>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), B<sigsuspend>(2), B<sigsetops>(3), B<signal>(7)"
6702 msgstr "B<kill>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), B<sigsuspend>(2), B<sigsetops>(3), B<signal>(7)"
6703
6704 #. type: TH
6705 #: build/C/man2/sigprocmask.2:29
6706 #, no-wrap
6707 msgid "SIGPROCMASK"
6708 msgstr "SIGPROCMASK"
6709
6710 #. type: TH
6711 #: build/C/man2/sigprocmask.2:29 build/C/man2/sigsuspend.2:29
6712 #, no-wrap
6713 msgid "2013-04-19"
6714 msgstr "2013-04-19"
6715
6716 #. type: Plain text
6717 #: build/C/man2/sigprocmask.2:32
6718 msgid "sigprocmask - examine and change blocked signals"
6719 msgstr "sigprocmask - 禁止するシグナルの確認と変更"
6720
6721 #. type: Plain text
6722 #: build/C/man2/sigprocmask.2:37
6723 msgid "B<int sigprocmask(int >I<how>B<, const sigset_t *>I<set>B<,> B<sigset_t *>I<oldset>B<);>"
6724 msgstr "B<int sigprocmask(int >I<how>B<, const sigset_t *>I<set>B<,> B<sigset_t *>I<oldset>B<);>"
6725
6726 #. type: Plain text
6727 #: build/C/man2/sigprocmask.2:46
6728 msgid "B<sigprocmask>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
6729 msgstr "B<sigprocmask>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
6730
6731 #. type: Plain text
6732 #: build/C/man2/sigprocmask.2:55
6733 msgid "B<sigprocmask>()  is used to fetch and/or change the signal mask of the calling thread.  The signal mask is the set of signals whose delivery is currently blocked for the caller (see also B<signal>(7)  for more details)."
6734 msgstr "B<sigprocmask>()  を使うと、呼び出したスレッドのシグナルマスクの取得/変更ができる。 シグナルマスクは、呼び出し元に対して現在配送が禁止されているシグナルの 集合のことである (詳細については B<signal>(7)  も参照のこと)。"
6735
6736 #. type: Plain text
6737 #: build/C/man2/sigprocmask.2:59
6738 msgid "The behavior of the call is dependent on the value of I<how>, as follows."
6739 msgstr "このコールの動作は I<how> の値によって決まる:"
6740
6741 #. type: TP
6742 #: build/C/man2/sigprocmask.2:59
6743 #, no-wrap
6744 msgid "B<SIG_BLOCK>"
6745 msgstr "B<SIG_BLOCK>"
6746
6747 #. type: Plain text
6748 #: build/C/man2/sigprocmask.2:64
6749 msgid "The set of blocked signals is the union of the current set and the I<set> argument."
6750 msgstr "禁止されたシグナルの集合は現在の値と I<set> 引き数を結合したものとなる。"
6751
6752 #. type: TP
6753 #: build/C/man2/sigprocmask.2:64
6754 #, no-wrap
6755 msgid "B<SIG_UNBLOCK>"
6756 msgstr "B<SIG_UNBLOCK>"
6757
6758 #. type: Plain text
6759 #: build/C/man2/sigprocmask.2:70
6760 msgid "The signals in I<set> are removed from the current set of blocked signals.  It is permissible to attempt to unblock a signal which is not blocked."
6761 msgstr "現在禁止されているシグナルの集合から I<set> にあるシグナルを取り除く。禁止されていないシグナルを取り除こうと することも認められている。"
6762
6763 #. type: TP
6764 #: build/C/man2/sigprocmask.2:70
6765 #, no-wrap
6766 msgid "B<SIG_SETMASK>"
6767 msgstr "B<SIG_SETMASK>"
6768
6769 #. type: Plain text
6770 #: build/C/man2/sigprocmask.2:74
6771 msgid "The set of blocked signals is set to the argument I<set>."
6772 msgstr "禁止されているシグナルの集合に I<set> 引き数を設定する。"
6773
6774 #. type: Plain text
6775 #: build/C/man2/sigprocmask.2:79
6776 msgid "If I<oldset> is non-NULL, the previous value of the signal mask is stored in I<oldset>."
6777 msgstr "I<oldset> が NULL でなければ、シグナルマスクの今までの値を I<oldset> に格納する。"
6778
6779 #. type: Plain text
6780 #: build/C/man2/sigprocmask.2:88
6781 msgid "If I<set> is NULL, then the signal mask is unchanged (i.e., I<how> is ignored), but the current value of the signal mask is nevertheless returned in I<oldset> (if it is not NULL)."
6782 msgstr "I<set> が NULL であれば、シグナルマスクは変更されない (すなわち、 I<how> は無視される)。 I<set> の値にかかわらず、現在のシグナルマスクの値は I<oldset> に入れて返される (但し、 I<oldset> が NULL でない場合)。"
6783
6784 #. type: Plain text
6785 #: build/C/man2/sigprocmask.2:93
6786 msgid "The use of B<sigprocmask>()  is unspecified in a multithreaded process; see B<pthread_sigmask>(3)."
6787 msgstr "マルチスレッドのプロセスで B<sigprocmask>()  を使用した場合の動作は規定されていない。 B<pthread_sigmask>(3)  を参照のこと。"
6788
6789 #. type: Plain text
6790 #: build/C/man2/sigprocmask.2:99
6791 msgid "B<sigprocmask>()  returns 0 on success and -1 on error.  In the event of an error, I<errno> is set to indicate the cause."
6792 msgstr "B<sigprocmask>() は成功した場合 0 を返す。 エラーの場合、 -1 を返し、 I<errno> にエラーの原因を示す値を設定する。"
6793
6794 #. type: Plain text
6795 #: build/C/man2/sigprocmask.2:107
6796 msgid "the I<set> or I<oldset> argument points outside the process's allocated address space."
6797 msgstr "引き数 I<set> か I<oldset> がプロセスに割り当てられたアドレス空間の外を指している。"
6798
6799 #. type: Plain text
6800 #: build/C/man2/sigprocmask.2:112
6801 msgid "The value specified in I<how> was invalid."
6802 msgstr "I<how> に指定された値が有効ではない。"
6803
6804 #. type: Plain text
6805 #: build/C/man2/sigprocmask.2:118
6806 msgid "It is not possible to block B<SIGKILL> or B<SIGSTOP>.  Attempts to do so are silently ignored."
6807 msgstr "B<SIGKILL> や B<SIGSTOP> を禁止することはできない。 禁止しようとしても黙って無視される。"
6808
6809 #. type: Plain text
6810 #: build/C/man2/sigprocmask.2:120
6811 msgid "Each of the threads in a process has its own signal mask."
6812 msgstr "プロセス内の各スレッドはそれぞれ専用のシグナルマスクを持つ。"
6813
6814 #. type: Plain text
6815 #: build/C/man2/sigprocmask.2:140
6816 msgid "If B<SIGBUS>, B<SIGFPE>, B<SIGILL>, or B<SIGSEGV> are generated while they are blocked, the result is undefined, unless the signal was generated by B<kill>(2), B<sigqueue>(3), or B<raise>(3)."
6817 msgstr "シグナル B<SIGBUS>, B<SIGFPE>, B<SIGILL>, B<SIGSEGV> が禁止されている間に生成された場合で、 そのシグナルが B<kill>(2), B<sigqueue>(3), B<raise>(3)  によって生成されたものでないときには、 その後の動作は未定義である。"
6818
6819 #. type: Plain text
6820 #: build/C/man2/sigprocmask.2:155
6821 msgid "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigpending>(2), B<sigsuspend>(2), B<pthread_sigmask>(3), B<sigqueue>(3), B<sigsetops>(3), B<signal>(7)"
6822 msgstr "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigpending>(2), B<sigsuspend>(2), B<pthread_sigmask>(3), B<sigqueue>(3), B<sigsetops>(3), B<signal>(7)"
6823
6824 #. type: TH
6825 #: build/C/man3/sigqueue.3:28
6826 #, no-wrap
6827 msgid "SIGQUEUE"
6828 msgstr "SIGQUEUE"
6829
6830 #. type: TH
6831 #: build/C/man3/sigqueue.3:28 build/C/man3/sigwait.3:26
6832 #, no-wrap
6833 msgid "2013-12-16"
6834 msgstr "2013-12-16"
6835
6836 #. type: Plain text
6837 #: build/C/man3/sigqueue.3:31
6838 msgid "sigqueue - queue a signal and data to a process"
6839 msgstr "sigqueue - シグナルとデータをプロセスに送る"
6840
6841 #. type: Plain text
6842 #: build/C/man3/sigqueue.3:35
6843 msgid "B<int sigqueue(pid_t >I<pid>B<, int >I<sig>B<, const union sigval >I<value>B<);>"
6844 msgstr "B<int sigqueue(pid_t >I<pid>B<, int >I<sig>B<, const union sigval >I<value>B<);>"
6845
6846 #. type: Plain text
6847 #: build/C/man3/sigqueue.3:43
6848 msgid "B<sigqueue>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
6849 msgstr "B<sigqueue>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
6850
6851 #. type: Plain text
6852 #: build/C/man3/sigqueue.3:55
6853 msgid "B<sigqueue>()  sends the signal specified in I<sig> to the process whose PID is given in I<pid>.  The permissions required to send a signal are the same as for B<kill>(2).  As with B<kill>(2), the null signal (0) can be used to check if a process with a given PID exists."
6854 msgstr "B<sigqueue>()  は I<sig> で指定されたシグナルを、PID が I<pid> であるプロセスに送る。 シグナルを送るのに必要な権限は B<kill>(2)  と同じである。 B<kill>(2)  と同様に、ヌルシグナル (0) を使って 指定した PID のプロセスが存在するかをチェックすることができる。"
6855
6856 #. type: Plain text
6857 #: build/C/man3/sigqueue.3:60
6858 msgid "The I<value> argument is used to specify an accompanying item of data (either an integer or a pointer value) to be sent with the signal, and has the following type:"
6859 msgstr "I<value> 引き数はシグナルと一緒に送るデータの付属アイテムを指定する。 I<value> は (整数またはポインターの値であり) 以下のような型である。"
6860
6861 #. type: Plain text
6862 #: build/C/man3/sigqueue.3:67
6863 #, no-wrap
6864 msgid ""
6865 "union sigval {\n"
6866 "    int   sival_int;\n"
6867 "    void *sival_ptr;\n"
6868 "};\n"
6869 msgstr ""
6870 "union sigval {\n"
6871 "    int   sival_int;\n"
6872 "    void *sival_ptr;\n"
6873 "};\n"
6874
6875 #. type: Plain text
6876 #: build/C/man3/sigqueue.3:83
6877 msgid "If the receiving process has installed a handler for this signal using the B<SA_SIGINFO> flag to B<sigaction>(2), then it can obtain this data via the I<si_value> field of the I<siginfo_t> structure passed as the second argument to the handler.  Furthermore, the I<si_code> field of that structure will be set to B<SI_QUEUE>."
6878 msgstr "受取先のプロセスに、このシグナルに対するハンドラーを (B<sigaction>(2)  に B<SA_SIGINFO> を指定して) インストールしておくと、 そのハンドラーの第 2 引き数に渡される I<siginfo_t> 構造体の I<si_value> フィールドによって、このデータを取得できる。 さらに、この構造体の I<si_code> フィールドは B<SI_QUEUE> に設定される。"
6879
6880 #. type: Plain text
6881 #: build/C/man3/sigqueue.3:91
6882 msgid "On success, B<sigqueue>()  returns 0, indicating that the signal was successfully queued to the receiving process.  Otherwise, -1 is returned and I<errno> is set to indicate the error."
6883 msgstr "成功した場合、 B<sigqueue>()  は 0 を返す。 これは受け取り側プロセスの待ち行列に シグナルが正しく入れられたことを示す。 失敗した場合は -1 が返され、 I<errno> がエラーを表す値に設定される。"
6884
6885 #. type: Plain text
6886 #: build/C/man3/sigqueue.3:102
6887 msgid "I<sig> was invalid."
6888 msgstr "I<sig> が不正である。"
6889
6890 #. type: Plain text
6891 #: build/C/man3/sigqueue.3:108
6892 msgid "The process does not have permission to send the signal to the receiving process.  For the required permissions, see B<kill>(2)."
6893 msgstr "このプロセスには、受け取り側プロセスにシグナルを送る権限がない。 必要な権限については、 B<kill>(2)  を参照すること。"
6894
6895 #. type: Plain text
6896 #: build/C/man3/sigqueue.3:112
6897 msgid "No process has a PID matching I<pid>."
6898 msgstr "I<pid> にマッチする PID のプロセスがない。"
6899
6900 #. type: Plain text
6901 #: build/C/man3/sigqueue.3:114
6902 msgid "This system call first appeared in Linux 2.2."
6903 msgstr "このシステムコールは Linux 2.2 で初めて登場した。"
6904
6905 #. type: Plain text
6906 #: build/C/man3/sigqueue.3:119
6907 msgid "The B<sigqueue>()  function is thread-safe."
6908 msgstr "B<sigqueue>() 関数はスレッドセーフである。"
6909
6910 #. type: Plain text
6911 #: build/C/man3/sigqueue.3:129
6912 msgid "If this function results in the sending of a signal to the process that invoked it, and that signal was not blocked by the calling thread, and no other threads were willing to handle this signal (either by having it unblocked, or by waiting for it using B<sigwait>(3)), then at least some signal must be delivered to this thread before this function returns."
6913 msgstr "この関数を呼び出したプロセスにこの関数がシグナルを送ったときに、 シグナルが呼び出し側スレッドにブロックされず、 かつ (シグナルがブロックされなかった、または B<sigwait>(3)  を使用するのを待っていることにより)  このシグナルを扱うスレッドが何もない場合は、 この関数がリターンする前に、少なくとも そのスレッドに対してシグナルが配送されていなければならない。"
6914
6915 #. type: Plain text
6916 #: build/C/man3/sigqueue.3:144
6917 msgid "On Linux, this function is implemented using the B<rt_sigqueueinfo>(2)  system call.  The system call differs in its third argument, which is the I<siginfo_t> structure that will be supplied to the receiving process's signal handler or returned by the receiving process's B<sigtimedwait>(2)  call.  Inside the glibc B<sigqueue>()  wrapper, this argument, I<uinfo>, is initialized as follows:"
6918 msgstr "Linux では、この関数は B<rt_sigqueueinfo>(2)  システムコールを使って実装されている。 両者には 3 番目の引き数に違いがあり、 B<rt_sigqueueinfo>(2)  では 3 番目の引き数は I<siginfo_t> 構造体である。 I<siginfo_t> 構造体は、シグナルを受信するプロセスのシグナルハンドラーに渡されたり、 シグナル受信プロセスの B<sigtimedwait>(2)  システムコールから返されたりする。 glibc の B<sigqueue>()  ラッパー関数内部では、 この引き数 I<uinfo> は以下のように初期化される。"
6919
6920 #. type: Plain text
6921 #: build/C/man3/sigqueue.3:152
6922 #, no-wrap
6923 msgid ""
6924 "uinfo.si_signo = sig;      /* Argument supplied to sigqueue() */\n"
6925 "uinfo.si_code = SI_QUEUE;\n"
6926 "uinfo.si_pid = getpid();   /* Process ID of sender */\n"
6927 "uinfo.si_uid = getuid();   /* Real UID of sender */\n"
6928 "uinfo.si_value = val;      /* Argument supplied to sigqueue() */\n"
6929 msgstr ""
6930 "uinfo.si_signo = sig;      /* Argument supplied to sigqueue() */\n"
6931 "uinfo.si_code = SI_QUEUE;\n"
6932 "uinfo.si_pid = getpid();   /* Process ID of sender */\n"
6933 "uinfo.si_uid = getuid();   /* Real UID of sender */\n"
6934 "uinfo.si_value = val;      /* Argument supplied to sigqueue() */\n"
6935
6936 #. type: Plain text
6937 #: build/C/man3/sigqueue.3:162
6938 msgid "B<kill>(2), B<rt_sigqueueinfo>(2), B<sigaction>(2), B<signal>(2), B<pthread_sigqueue>(3), B<sigwait>(3), B<signal>(7)"
6939 msgstr "B<kill>(2), B<rt_sigqueueinfo>(2), B<sigaction>(2), B<signal>(2), B<pthread_sigqueue>(3), B<sigwait>(3), B<signal>(7)"
6940
6941 #. type: TH
6942 #: build/C/man2/sigreturn.2:30
6943 #, no-wrap
6944 msgid "SIGRETURN"
6945 msgstr "SIGRETURN"
6946
6947 #. type: Plain text
6948 #: build/C/man2/sigreturn.2:33
6949 msgid "sigreturn - return from signal handler and cleanup stack frame"
6950 msgstr "sigreturn - シグナルハンドラーから返り、スタックを掃除する"
6951
6952 #. type: Plain text
6953 #: build/C/man2/sigreturn.2:35
6954 msgid "B<int sigreturn(...);>"
6955 msgstr "B<int sigreturn(...);>"
6956
6957 #.  See arch/x86/kernel/signal.c::__setup_frame() [in 3.17 source code]
6958 #. type: Plain text
6959 #: build/C/man2/sigreturn.2:45
6960 msgid "If the Linux kernel determines that an unblocked signal is pending for a process, then, at the next transition back to user mode in that process (e.g., upon return from a system call or when the process is rescheduled onto the CPU), it saves various pieces of process context (processor status word, registers, signal mask, and signal stack settings)  into the user-space stack."
6961 msgstr "Linux カーネルがプロセスに対してブロックされていないシグナルが処理待ちと判定した場合、 そのプロセスの次回のユーザーモードへの遷移 (すなわち、システムコールからのリターン時やそのプロセスが CPU に再スケジュールされる際)、 カーネルはプロセスコンテキストの種々の値 (プロセッサーのステータスワード、 レジスター、 シグナルマスク、 シグナルスタック設定) をユーザー空間のスタックに保存する。"
6962
6963 #. type: Plain text
6964 #: build/C/man2/sigreturn.2:52
6965 msgid "The kernel also arranges that, during the transition back to user mode, the signal handler is called, and that, upon return from the handler, control passes to a piece of user-space code commonly called the \"signal trampoline\".  The signal trampoline code in turn calls B<sigreturn>()."
6966 msgstr "また、 カーネルは、 ユーザーモードへの遷移時にシグナルハンドラーが呼び出され、 ハンドラーからのリターン時に、 制御が \"signal trampoline\" と呼ばれるユーザー空間コードブロックに渡されるように、準備を行う。 signal trampoline のコードが B<sigreturn>() を呼び出す。"
6967
6968 #. type: Plain text
6969 #: build/C/man2/sigreturn.2:65
6970 msgid "This B<sigreturn>()  call undoes everything that was done\\(emchanging the process's signal mask, switching signal stacks (see B<sigaltstack>(2))\\(emin order to invoke the signal handler.  It restores the process's signal mask, switches stacks, and restores the process's context (processor flags and registers, including the stack pointer and instruction pointer), so that the process resumes execution at the point where it was interrupted by the signal."
6971 msgstr "B<sigreturn>()  は、シグナルハンドラーを起動するために行ったことの全て \\(em プロセスのシグナルマスクの変更、 シグナルスタックの切り替え (B<sigaltstack>(2)  参照) \\(em の取り消しを行う。 プロセスのシグナルマスクの復元、 スタックの切り替え、 プロセスのコンテキスト (プロセッサフラグ、 レジスター (スタックポインター、 命令ポインターを含む)) の復元を行い、 プロセスがシグナルにより割り込まれた場所から実行を再開できるようにする。"
6972
6973 #. type: Plain text
6974 #: build/C/man2/sigreturn.2:68
6975 msgid "B<sigreturn>()  never returns."
6976 msgstr "B<sigreturn>()  が返ることはない。"
6977
6978 #. type: Plain text
6979 #: build/C/man2/sigreturn.2:74
6980 msgid "Many UNIX-type systems have a B<sigreturn>()  system call or near equivalent.  However, this call is not specified in POSIX, and details of its behavior vary across systems."
6981 msgstr "多くの UNIX 系のシステムには B<sigreturn>() システムコールか似たようなシステムコールがある。 しかしながら、 このシステムコールは POSIX には規定されておらず、 その動作の詳細はシステムにより異なる。"
6982
6983 #. type: Plain text
6984 #: build/C/man2/sigreturn.2:83
6985 msgid "B<sigreturn>()  exists only to allow the implementation of signal handlers.  It should B<never> be called directly.  Details of the arguments (if any) passed to B<sigreturn>()  vary depending on the architecture."
6986 msgstr "B<sigreturn>() はシグナルハンドラーを実装するためだけに存在している。 これらを直接呼び出すのはB<決して>行うべきではない。 B<sigreturn>() に渡される引き数の詳細はアーキテクチャーにより異なる。"
6987
6988 #.  See, for example, sysdeps/unix/sysv/linux/i386/sigaction.c and
6989 #.  sysdeps/unix/sysv/linux/x86_64/sigaction.c in the glibc (2.20) source.
6990 #. type: Plain text
6991 #: build/C/man2/sigreturn.2:106
6992 msgid "Once upon a time, UNIX systems placed the signal trampoline code onto the user stack.  Nowadays, pages of the user stack are protected so as to disallow code execution.  Thus, on contemporary Linux systems, depending on the architecture, the signal trampoline code lives either in the B<vdso>(7)  or in the C library.  In the latter case, the C library supplies the location of the trampoline code using the I<sa_restorer> field of the I<sigaction> structure that is passed to B<sigaction>(2), and sets the B<SA_RESTORER> flag in the I<sa_flags> field."
6993 msgstr "かつて、 UNIX システムでは signal trampoline コードがユーザースタックに置かれていた。 今日では、 ユーザースタックのページは保護され、 コードの実行は禁止されている。 したがって、 現代の Linux システムでは、 アーキテクチャー依存ではあるが、 signal trampoline コードは B<vdso>(7) 内もしくは C ライブラリ内に置かれる。 後者の場合、 C ライブラリは trampoline code の場所を B<sigaction>(2) に渡される I<sigaction> 構造体の I<sa_restorer> フィールドを使って渡し、 I<sa_flags> フィールドの B<SA_RESTORER> フラグをセットする。"
6994
6995 #. type: Plain text
6996 #: build/C/man2/sigreturn.2:115
6997 msgid "The saved process context information is placed in a I<ucontext_t> structure (see I<E<lt>sys/ucontext.hE<gt>>).  That structure is visible within the signal handler as the third argument of a handler established with the B<SA_SIGINFO> flag."
6998 msgstr "保存されたプロセスコンテキスト情報は I<ucontext_t>構造体に置かれる (I<E<lt>sys/ucontext.hE<gt>> 参照)。 この構造体は、 B<SA_SIGINFO> フラグを付けて設定されたシグナルハンドラーの第 3 引き数としてシングルハンドラー内で参照できる。"
6999
7000 #. type: Plain text
7001 #: build/C/man2/sigreturn.2:123
7002 msgid "On some other UNIX systems, the operation of the signal trampoline differs a little.  In particular, on some systems, upon transitioning back to user mode, the kernel passes control to the trampoline (rather than the signal handler), and the trampoline code calls the signal handler (and then calls B<sigreturn>()  once the handler returns)."
7003 msgstr "他のいくつかの UNIX システムでは、 signal trampoline の扱いは少し異なる。 特に、 いくつかのシステムでは、 ユーザーモードに戻る際に、 カーネルは制御を (シグナルハンドラーではなく) trampoline に渡し、 trampoline コードがシグナルハンドラーを呼び出す (その後ハンドラーが返ると B<sigreturn>() を呼び出す)。"
7004
7005 #. type: Plain text
7006 #: build/C/man2/sigreturn.2:130
7007 msgid "B<kill>(2), B<restart_syscall>(2), B<sigaltstack>(2), B<signal>(2), B<getcontext>(3), B<signal>(7)"
7008 msgstr "B<kill>(2), B<restart_syscall>(2), B<sigaltstack>(2), B<signal>(2), B<getcontext>(3), B<signal>(7)"
7009
7010 #. type: TH
7011 #: build/C/man3/sigset.3:26
7012 #, no-wrap
7013 msgid "SIGSET"
7014 msgstr "SIGSET"
7015
7016 #. type: Plain text
7017 #: build/C/man3/sigset.3:29
7018 msgid "sigset, sighold, sigrelse, sigignore - System V signal API"
7019 msgstr "sigset, sighold, sigrelse, sigignore - System V 版シグナル API"
7020
7021 #. type: Plain text
7022 #: build/C/man3/sigset.3:35
7023 msgid "B<sighandler_t sigset(int >I<sig>B<, sighandler_t >I<disp>B<);>"
7024 msgstr "B<sighandler_t sigset(int >I<sig>B<, sighandler_t >I<disp>B<);>"
7025
7026 #. type: Plain text
7027 #: build/C/man3/sigset.3:37
7028 msgid "B<int sighold(int >I<sig>B<);>"
7029 msgstr "B<int sighold(int >I<sig>B<);>"
7030
7031 #. type: Plain text
7032 #: build/C/man3/sigset.3:39
7033 msgid "B<int sigrelse(int >I<sig>B<);>"
7034 msgstr "B<int sigrelse(int >I<sig>B<);>"
7035
7036 #. type: Plain text
7037 #: build/C/man3/sigset.3:41
7038 msgid "B<int sigignore(int >I<sig>B<);>"
7039 msgstr "B<int sigignore(int >I<sig>B<);>"
7040
7041 #. type: Plain text
7042 #: build/C/man3/sigset.3:52
7043 msgid "B<sigset>(), B<sighold>(), B<sigrelse>(), B<sigignore>():"
7044 msgstr "B<sigset>(), B<sighold>(), B<sigrelse>(), B<sigignore>():"
7045
7046 #. type: Plain text
7047 #: build/C/man3/sigset.3:56
7048 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
7049 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
7050
7051 #. type: Plain text
7052 #: build/C/man3/sigset.3:65
7053 msgid "These functions are provided in glibc as a compatibility interface for programs that make use of the historical System V signal API.  This API is obsolete: new applications should use the POSIX signal API (B<sigaction>(2), B<sigprocmask>(2), etc.)"
7054 msgstr "これらの関数は、昔ながらの System V 版シグナル API を使用しているプログラム に対して互換性のあるインターフェースを glibc で提供するものである。 この API は過去のものであり、新しいアプリケーションでは POSIX シグナル API (B<sigaction>(2), B<sigprocmask>(2)  など) を使用すべきである。"
7055
7056 #. type: Plain text
7057 #: build/C/man3/sigset.3:74
7058 msgid "The B<sigset>()  function modifies the disposition of the signal I<sig>.  The I<disp> argument can be the address of a signal handler function, or one of the following constants:"
7059 msgstr "関数 B<sigset>()  はシグナル I<sig> のシグナルハンドラーの動作を変更する。 I<disp> 引き数には、シグナルハンドラー関数のアドレスか、 以下の定数のいずれか一つを指定できる。"
7060
7061 #. type: TP
7062 #: build/C/man3/sigset.3:74
7063 #, no-wrap
7064 msgid "B<SIG_DFL>"
7065 msgstr "B<SIG_DFL>"
7066
7067 #. type: Plain text
7068 #: build/C/man3/sigset.3:79
7069 msgid "Reset the disposition of I<sig> to the default."
7070 msgstr "I<sig> の動作をデフォルトにリセットする。"
7071
7072 #. type: TP
7073 #: build/C/man3/sigset.3:79
7074 #, no-wrap
7075 msgid "B<SIG_IGN>"
7076 msgstr "B<SIG_IGN>"
7077
7078 #. type: Plain text
7079 #: build/C/man3/sigset.3:83
7080 msgid "Ignore I<sig>."
7081 msgstr "I<sig> を無視する。"
7082
7083 #. type: TP
7084 #: build/C/man3/sigset.3:83
7085 #, no-wrap
7086 msgid "B<SIG_HOLD>"
7087 msgstr "B<SIG_HOLD>"
7088
7089 #. type: Plain text
7090 #: build/C/man3/sigset.3:90
7091 msgid "Add I<sig> to the process's signal mask, but leave the disposition of I<sig> unchanged."
7092 msgstr "そのプロセスのシグナルマスクに I<sig> を追加するが、 I<sig> の動作は変更しない。"
7093
7094 #. type: Plain text
7095 #: build/C/man3/sigset.3:96
7096 msgid "If I<disp> specifies the address of a signal handler, then I<sig> is added to the process's signal mask during execution of the handler."
7097 msgstr "I<disp> にシグナルハンドラーのアドレスが指定された場合、 シグナルハンドラーの実行中は、そのプロセスのシグナルマスクに I<sig> が追加される。"
7098
7099 #. type: Plain text
7100 #: build/C/man3/sigset.3:104
7101 msgid "If I<disp> was specified as a value other than B<SIG_HOLD>, then I<sig> is removed from the process's signal mask."
7102 msgstr "I<disp> に B<SIG_HOLD> 以外の値が指定された場合、 そのプロセスのシグナルマスクから I<sig> が削除される。"
7103
7104 #. type: Plain text
7105 #: build/C/man3/sigset.3:110 build/C/man3/sigvec.3:87
7106 msgid "The dispositions for B<SIGKILL> and B<SIGSTOP> cannot be changed."
7107 msgstr "シグナル B<SIGKILL> と B<SIGSTOP> に対する動作は変更できない。"
7108
7109 #. type: Plain text
7110 #: build/C/man3/sigset.3:116
7111 msgid "The B<sighold>()  function adds I<sig> to the calling process's signal mask."
7112 msgstr "関数 B<sighold>()  は、呼び出し元プロセスのシグナルマスクに I<sig> を追加する。"
7113
7114 #. type: Plain text
7115 #: build/C/man3/sigset.3:122
7116 msgid "The B<sigrelse>()  function removes I<sig> from the calling process's signal mask."
7117 msgstr "関数 B<sigrelse>()  は、呼び出し元プロセスのシグナルマスクから I<sig> を削除する。"
7118
7119 #. type: Plain text
7120 #: build/C/man3/sigset.3:129
7121 msgid "The B<sigignore>()  function sets the disposition of I<sig> to B<SIG_IGN>."
7122 msgstr "関数 B<sigignore>()  は、 I<sig> の動作を B<SIG_IGN> に設定する。"
7123
7124 #. type: Plain text
7125 #: build/C/man3/sigset.3:145
7126 msgid "On success, B<sigset>()  returns B<SIG_HOLD> if I<sig> was blocked before the call, or the signal's previous disposition if it was not blocked before the call.  On error, B<sigset>()  returns -1, with I<errno> set to indicate the error.  (But see BUGS below.)"
7127 msgstr "B<sigset>()  は成功すると、 呼び出し前に I<sig> がブロックされていた場合には B<SIG_HOLD> を返し、 ブロックされていなかった場合には 変更前のそのシグナルの動作を返す。 エラーの場合、 B<sigset>()  は -1 を返し、 I<errno> にエラーを示す値をセットする。 但し、以下の「バグ」の節も参照のこと。"
7128
7129 #. type: Plain text
7130 #: build/C/man3/sigset.3:154
7131 msgid "The B<sighold>(), B<sigrelse>(), and B<sigignore>()  functions return 0 on success; on error, these functions return -1 and set I<errno> to indicate the error."
7132 msgstr "関数 B<sighold>(), B<sigrelse>(), B<sigignore>()  は成功すると 0 を返す。エラーの場合、-1 を返し、 I<errno> にエラーを示す値をセットする。"
7133
7134 #. type: Plain text
7135 #: build/C/man3/sigset.3:161
7136 msgid "For B<sigset>()  see the ERRORS under B<sigaction>(2)  and B<sigprocmask>(2)."
7137 msgstr "B<sigset>()  に関しては、 B<sigaction>(2)  と B<sigprocmask>(2)  の「エラー」の節を参照。"
7138
7139 #. type: Plain text
7140 #: build/C/man3/sigset.3:168
7141 msgid "For B<sighold>()  and B<sigrelse>()  see the ERRORS under B<sigprocmask>(2)."
7142 msgstr "B<sighold>()  と B<sigrelse>()  に関しては、 B<sigprocmask>(2)  の「エラー」の節を参照。"
7143
7144 #. type: Plain text
7145 #: build/C/man3/sigset.3:173
7146 msgid "For B<sigignore>(), see the errors under B<sigaction>(2)."
7147 msgstr "B<sigignore>()  に関しては、 B<sigaction>(2)  の「エラー」の節を参照。"
7148
7149 #. type: Plain text
7150 #: build/C/man3/sigset.3:190
7151 msgid "SVr4, POSIX.1-2001.  These functions are obsolete: do not use them in new programs.  POSIX.1-2008 marks B<sighold>(), B<sigignore>(), B<sigpause>(), B<sigrelse>(), and B<sigset>()  as obsolete, recommending the use of B<sigaction>(2), B<sigprocmask>(2), B<pthread_sigmask>(3), and B<sigsuspend>(2)  instead."
7152 msgstr "SVr4, POSIX.1-2001.  これらの関数は廃止予定である。新しいプログラムでは使用しないこと。 POSIX.1-2008 は、 B<sighold>(), B<sigignore>(), B<sigpause>(), B<sigrelse>(), B<sigset>()  を廃止予定としている。 代わりに、 B<sigaction>(2), B<sigprocmask>(2), B<pthread_sigmask>(3), B<sigsuspend>(2)  の使用が推奨されている。"
7153
7154 #. type: Plain text
7155 #: build/C/man3/sigset.3:192
7156 msgid "These functions appeared in glibc version 2.1."
7157 msgstr "これらの関数は glibc 2.1 で登場した。"
7158
7159 #. type: Plain text
7160 #: build/C/man3/sigset.3:198
7161 msgid "The I<sighandler_t> type is a GNU extension; it is used on this page only to make the B<sigset>()  prototype more easily readable."
7162 msgstr "I<sighandler_t> 型は GNU による拡張であり、この man page で B<sigset>()  のプロトタイプをより読みやすくするために使われているだけである。"
7163
7164 #. type: Plain text
7165 #: build/C/man3/sigset.3:206
7166 msgid "The B<sigset>()  function provides reliable signal handling semantics (as when calling B<sigaction>(2)  with I<sa_mask> equal to 0)."
7167 msgstr "関数 B<sigset>()  は信頼性のあるシグナル処理機構を提供する (I<sa_mask> を 0 で B<sigaction>(2)  を呼び出したときと同様)。"
7168
7169 #. type: Plain text
7170 #: build/C/man3/sigset.3:224
7171 msgid "On System V, the B<signal>()  function provides unreliable semantics (as when calling B<sigaction>(2)  with I<sa_mask> equal to I<SA_RESETHAND | SA_NODEFER>).  On BSD, B<signal>()  provides reliable semantics.  POSIX.1-2001 leaves these aspects of B<signal>()  unspecified.  See B<signal>(2)  for further details."
7172 msgstr "System V では、関数 B<signal>()  が提供する処理機構は信頼性のないものである (I<sa_mask> を I<SA_RESETHAND | SA_NODEFER> として B<sigaction>(2)  を呼び出したときと同様)。 BSD では、 B<signal>()  は信頼性のある処理機構を提供する。 POSIX.1-2001 では、 B<signal>()  のこの点は規定しないままとなっている。 さらなる詳細については B<signal>(2)  を参照。"
7173
7174 #. type: Plain text
7175 #: build/C/man3/sigset.3:232 build/C/man3/sigvec.3:272
7176 msgid "In order to wait for a signal, BSD and System V both provided a function named B<sigpause>(3), but this function has a different argument on the two systems.  See B<sigpause>(3)  for details."
7177 msgstr "BSD と System V のどちらのシステムでも シグナルを待つために、 B<sigpause>(3)  という名前の関数が提供されているが、 この関数の引き数は両方のシステムで異なる。 詳細は B<sigpause>(3)  を参照。"
7178
7179 #. type: Plain text
7180 #: build/C/man3/sigset.3:241
7181 msgid "In versions of glibc before 2.2, B<sigset>()  did not unblock I<sig> if I<disp> was specified as a value other than B<SIG_HOLD>."
7182 msgstr "2.2 より前のバージョンの glibc では、 I<disp> に B<SIG_HOLD> 以外の値が指定された場合、 I<sig> のブロック解除を行っていなかった。"
7183
7184 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=1951
7185 #. type: Plain text
7186 #: build/C/man3/sigset.3:266
7187 msgid "In versions of glibc before 2.5, B<sigset>()  does not correctly return the previous disposition of the signal in two cases.  First, if I<disp> is specified as B<SIG_HOLD>, then a successful B<sigset>()  always returns B<SIG_HOLD>.  Instead, it should return the previous disposition of the signal (unless the signal was blocked, in which case B<SIG_HOLD> should be returned).  Second, if the signal is currently blocked, then the return value of a successful B<sigset>()  should be B<SIG_HOLD>.  Instead, the previous disposition of the signal is returned.  These problems have been fixed since glibc 2.5."
7188 msgstr "2.3.5 以前の全てのバージョンの glibc では、 B<sigset>()  が変更前のシグナルの動作を正しく返さない場合が 2つある。 一つめは、 I<disp> に B<SIG_HOLD> が指定されると、成功した場合 B<sigset>()  は常に B<SIG_HOLD> を返すことである。 正しくは、(シグナルがブロックされていなかった場合には)  変更前のシグナルの動作を返すべきである (シグナルがブロックされていた場合には、 B<SIG_HOLD> が返される)。 もう一つは、シグナルが現在ブロックされている場合には、 成功した場合の B<sigset>()  の返り値は B<SIG_HOLD> になるべきであるが、実際には 変更前のシグナルの動作が返されることである。 これらの問題は glibc 2.5 以降で修正されている。"
7189
7190 #. type: Plain text
7191 #: build/C/man3/sigset.3:276
7192 msgid "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), B<raise>(3), B<sigpause>(3), B<sigvec>(3), B<signal>(7)"
7193 msgstr "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), B<raise>(3), B<sigpause>(3), B<sigvec>(3), B<signal>(7)"
7194
7195 #. type: TH
7196 #: build/C/man3/sigsetops.3:31
7197 #, no-wrap
7198 msgid "SIGSETOPS"
7199 msgstr "SIGSETOPS"
7200
7201 #. type: TH
7202 #: build/C/man3/sigsetops.3:31
7203 #, no-wrap
7204 msgid "2014-04-14"
7205 msgstr "2014-04-14"
7206
7207 #. type: Plain text
7208 #: build/C/man3/sigsetops.3:35
7209 msgid "sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - POSIX signal set operations"
7210 msgstr "sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - POSIX シグナル集合の操作"
7211
7212 #. type: Plain text
7213 #: build/C/man3/sigsetops.3:39
7214 msgid "B<int sigemptyset(sigset_t *>I<set>B<);>"
7215 msgstr "B<int sigemptyset(sigset_t *>I<set>B<);>"
7216
7217 #. type: Plain text
7218 #: build/C/man3/sigsetops.3:41
7219 msgid "B<int sigfillset(sigset_t *>I<set>B<);>"
7220 msgstr "B<int sigfillset(sigset_t *>I<set>B<);>"
7221
7222 #. type: Plain text
7223 #: build/C/man3/sigsetops.3:43
7224 msgid "B<int sigaddset(sigset_t *>I<set>B<, int >I<signum>B<);>"
7225 msgstr "B<int sigaddset(sigset_t *>I<set>B<, int >I<signum>B<);>"
7226
7227 #. type: Plain text
7228 #: build/C/man3/sigsetops.3:45
7229 msgid "B<int sigdelset(sigset_t *>I<set>B<, int >I<signum>B<);>"
7230 msgstr "B<int sigdelset(sigset_t *>I<set>B<, int >I<signum>B<);>"
7231
7232 #. type: Plain text
7233 #: build/C/man3/sigsetops.3:47
7234 msgid "B<int sigismember(const sigset_t *>I<set>B<, int >I<signum>B<);>"
7235 msgstr "B<int sigismember(const sigset_t *>I<set>B<, int >I<signum>B<);>"
7236
7237 #. type: Plain text
7238 #: build/C/man3/sigsetops.3:59
7239 msgid "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), B<sigdelset>(), B<sigismember>():"
7240 msgstr "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), B<sigdelset>(), B<sigismember>():"
7241
7242 #. type: Plain text
7243 #: build/C/man3/sigsetops.3:61
7244 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
7245 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
7246
7247 #. type: Plain text
7248 #: build/C/man3/sigsetops.3:65
7249 msgid "These functions allow the manipulation of POSIX signal sets."
7250 msgstr "これらの関数は POSIX シグナル集合(signal set)を操作するため使用する。"
7251
7252 #. type: Plain text
7253 #: build/C/man3/sigsetops.3:70
7254 msgid "B<sigemptyset>()  initializes the signal set given by I<set> to empty, with all signals excluded from the set."
7255 msgstr "B<sigemptyset>()  は I<set> で与えられたシグナル集合を空に初期化し、シグナルが一つも 含まれていない状態にする。"
7256
7257 #. type: Plain text
7258 #: build/C/man3/sigsetops.3:75
7259 msgid "B<sigfillset>()  initializes I<set> to full, including all signals."
7260 msgstr "B<sigfillset>()  は I<set> で与えられたシグナル集合が全てのシグナルを含むようにする。"
7261
7262 #. type: Plain text
7263 #: build/C/man3/sigsetops.3:83
7264 msgid "B<sigaddset>()  and B<sigdelset>()  add and delete respectively signal I<signum> from I<set>."
7265 msgstr "B<sigaddset>()  と B<sigdelset>()  は I<set> に I<signum> シグナルをそれぞれ加えたり、削除したりする。"
7266
7267 #. type: Plain text
7268 #: build/C/man3/sigsetops.3:89
7269 msgid "B<sigismember>()  tests whether I<signum> is a member of I<set>."
7270 msgstr "B<sigismember>()  は I<signum> が I<set> に含まれているかどうかをテストする。"
7271
7272 #. type: Plain text
7273 #: build/C/man3/sigsetops.3:107
7274 msgid "Objects of type I<sigset_t> must be initialized by a call to either B<sigemptyset>()  or B<sigfillset>()  before being passed to the functions B<sigaddset>(), B<sigdelset>()  and B<sigismember>()  or the additional glibc functions described below (B<sigisemptyset>(), B<sigandset>(), and B<sigorset>()).  The results are undefined if this is not done."
7275 msgstr "I<sigset_t> 型のオブジェクトは、関数 B<sigaddset>(), B<sigdelset>(), B<sigismember>()  や後述の glibc の追加関数 (B<sigisemptyset>(), B<sigandset>(), B<sigorset>())  に渡す前に、 B<sigemptyset>()  か B<sigfillset>()  を呼び出して初期化しなければならない。 初期化しなかった場合の結果は未定義である。"
7276
7277 #. type: Plain text
7278 #: build/C/man3/sigsetops.3:114
7279 msgid "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), and B<sigdelset>()  return 0 on success and -1 on error."
7280 msgstr "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), B<sigdelset>()  は成功すれば 0 を、エラーの場合は -1 を返す。"
7281
7282 #. type: Plain text
7283 #: build/C/man3/sigsetops.3:123
7284 msgid "B<sigismember>()  returns 1 if I<signum> is a member of I<set>, 0 if I<signum> is not a member, and -1 on error."
7285 msgstr "B<sigismember>()  は I<signum> が I<set> のメンバの場合 1 を返し、メンバでない場合 0 を返す。 エラーの場合、-1 を返す。"
7286
7287 #. type: Plain text
7288 #: build/C/man3/sigsetops.3:127
7289 msgid "On error, these functions set I<errno> to indicate the cause of the error."
7290 msgstr "エラーの場合、 I<errno> にエラーの原因を示す値を設定する。"
7291
7292 #. type: Plain text
7293 #: build/C/man3/sigsetops.3:132
7294 msgid "I<sig> is not a valid signal."
7295 msgstr "I<sig> が有効なシグナルではない。"
7296
7297 #. type: Plain text
7298 #: build/C/man3/sigsetops.3:145
7299 msgid "The B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), B<sigdelset>(), B<sigismember>(), B<sigisemptyset>(), B<sigorset>(), and B<sigandset>()  functions are thread-safe."
7300 msgstr "関数 B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), B<sigdelset>(), B<sigismember>(), B<sigisemptyset>(), B<sigorset>(), B<sigandset>() はスレッドセーフである。"
7301
7302 #. type: SS
7303 #: build/C/man3/sigsetops.3:148
7304 #, no-wrap
7305 msgid "Glibc notes"
7306 msgstr "glibc での注意"
7307
7308 #. type: Plain text
7309 #: build/C/man3/sigsetops.3:154
7310 msgid "If the B<_GNU_SOURCE> feature test macro is defined, then I<E<lt>signal.hE<gt>> exposes three other functions for manipulating signal sets:"
7311 msgstr "B<_GNU_SOURCE> 機能検査マクロが定義されていると、 I<E<lt>signal.hE<gt>> でシグナル集合を操作する 3 つの関数が追加で公開される。"
7312
7313 #. type: Plain text
7314 #: build/C/man3/sigsetops.3:161
7315 #, no-wrap
7316 msgid ""
7317 "B<int sigisemptyset(const sigset_t *>I<set>B<);>\n"
7318 "B<int sigorset(sigset_t *>I<dest>B<, const sigset_t *>I<left>B<,>\n"
7319 "B<              const sigset_t *>I<right>B<);>\n"
7320 "B<int sigandset(sigset_t *>I<dest>B<, const sigset_t *>I<left>B<,>\n"
7321 "B<              const sigset_t *>I<right>B<);>\n"
7322 msgstr ""
7323 "B<int sigisemptyset(const sigset_t *>I<set>B<);>\n"
7324 "B<int sigorset(sigset_t *>I<dest>B<, const sigset_t *>I<left>B<,>\n"
7325 "B<              const sigset_t *>I<right>B<);>\n"
7326 "B<int sigandset(sigset_t *>I<dest>B<, const sigset_t *>I<left>B<,>\n"
7327 "B<              const sigset_t *>I<right>B<);>\n"
7328
7329 #. type: Plain text
7330 #: build/C/man3/sigsetops.3:167
7331 msgid "B<sigisemptyset>()  returns 1 if I<set> contains no signals, and 0 otherwise."
7332 msgstr "B<sigisemptyset>() は I<set> にシグナルが一つも含まれていなければ 1 を返し、 それ以外は 0 を返す。"
7333
7334 #. type: Plain text
7335 #: build/C/man3/sigsetops.3:183
7336 msgid "B<sigorset>()  places the union of the sets I<left> and I<right> in I<dest>.  B<sigandset>()  places the intersection of the sets I<left> and I<right> in I<dest>.  Both functions return 0 on success, and -1 on failure."
7337 msgstr "B<sigorset>() は集合 I<left> と I<right> の和集合を I<dest> に設定する。 B<sigandset>() は集合 I<left> と I<right> の積集合を I<dest> に設定する。 どちらの関数も成功すると 0 を返し、失敗時には -1 を返す。"
7338
7339 #. type: Plain text
7340 #: build/C/man3/sigsetops.3:186
7341 msgid "These functions are nonstandard (a few other systems provide similar functions) and their use should be avoided in portable applications."
7342 msgstr "これらの関数は非標準であり、(他にも同様の関数を提供しているシステムも いくつかはあるが) 移植性を考慮したアプリケーションでは使用を避けるべき である。"
7343
7344 #. type: Plain text
7345 #: build/C/man3/sigsetops.3:191
7346 msgid "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<sigsuspend>(2)"
7347 msgstr "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<sigsuspend>(2)"
7348
7349 #. type: TH
7350 #: build/C/man2/sigsuspend.2:29
7351 #, no-wrap
7352 msgid "SIGSUSPEND"
7353 msgstr "SIGSUSPEND"
7354
7355 #. type: Plain text
7356 #: build/C/man2/sigsuspend.2:32
7357 msgid "sigsuspend - wait for a signal"
7358 msgstr "sigsuspend - シグナルを待つ"
7359
7360 #. type: Plain text
7361 #: build/C/man2/sigsuspend.2:36
7362 msgid "B<int sigsuspend(const sigset_t *>I<mask>B<);>"
7363 msgstr "B<int sigsuspend(const sigset_t *>I<mask>B<);>"
7364
7365 #. type: Plain text
7366 #: build/C/man2/sigsuspend.2:45
7367 msgid "B<sigsuspend>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
7368 msgstr "B<sigsuspend>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
7369
7370 #. type: Plain text
7371 #: build/C/man2/sigsuspend.2:53
7372 msgid "B<sigsuspend>()  temporarily replaces the signal mask of the calling process with the mask given by I<mask> and then suspends the process until delivery of a signal whose action is to invoke a signal handler or to terminate a process."
7373 msgstr "B<sigsuspend>()  は、呼び出し元プロセスのシグナルマスクを I<mask> で指定されたマスクに一時的に置き換え、 シグナルハンドラーの起動もしくはプロセスの終了がアクションとして 設定されたシグナルが配送されるまで、そのプロセスを停止する。"
7374
7375 #. type: Plain text
7376 #: build/C/man2/sigsuspend.2:62
7377 msgid "If the signal terminates the process, then B<sigsuspend>()  does not return.  If the signal is caught, then B<sigsuspend>()  returns after the signal handler returns, and the signal mask is restored to the state before the call to B<sigsuspend>()."
7378 msgstr "シグナルがプロセスを終了させるものの場合、 B<sigsuspend>()  は返らない。シグナルが捕捉された場合、 シグナルハンドラーの処理が終わった後に B<sigsuspend>()  は返り、シグナルマスクは B<sigsuspend>()  が呼び出される前の状態に復元される。"
7379
7380 #. type: Plain text
7381 #: build/C/man2/sigsuspend.2:70
7382 msgid "It is not possible to block B<SIGKILL> or B<SIGSTOP>; specifying these signals in I<mask>, has no effect on the process's signal mask."
7383 msgstr "B<SIGKILL> と B<SIGSTOP> を禁止 (block) することはできない; これらのシグナルを I<mask> に指定しても、プロセスのシグナルマスクは影響を受けない。"
7384
7385 #. type: Plain text
7386 #: build/C/man2/sigsuspend.2:76
7387 msgid "B<sigsuspend>()  always returns -1, with I<errno> set to indicate the error (normally, B<EINTR>)."
7388 msgstr "B<sigsuspend>() は常に -1 を返し、 I<errno> にエラーの原因を示す値 (通常は B<EINTR>) を設定する。"
7389
7390 #. type: Plain text
7391 #: build/C/man2/sigsuspend.2:81
7392 msgid "I<mask> points to memory which is not a valid part of the process address space."
7393 msgstr "I<mask> が指しているメモリーが、プロセスのアドレス空間の有効な部分ではない。"
7394
7395 #. type: Plain text
7396 #: build/C/man2/sigsuspend.2:84
7397 msgid "The call was interrupted by a signal."
7398 msgstr "システムコールはシグナルにより割り込まれた。"
7399
7400 #. type: Plain text
7401 #: build/C/man2/sigsuspend.2:104
7402 msgid "Normally, B<sigsuspend>()  is used in conjunction with B<sigprocmask>(2)  in order to prevent delivery of a signal during the execution of a critical code section.  The caller first blocks the signals with B<sigprocmask>(2).  When the critical code has completed, the caller then waits for the signals by calling B<sigsuspend>()  with the signal mask that was returned by B<sigprocmask>(2)  (in the I<oldset> argument)."
7403 msgstr "B<sigsuspend>()  は、通常、クリティカルコードセクション (critical code section) の 実行中にシグナルが配送されるのを防止するために、 B<sigprocmask>(2)  と組み合わせて使用される。 まず最初に、呼び出し元は B<sigprocmask>(2)  を使ってシグナルを禁止する。 クリティカルコードが完了すると、呼び出し元は B<sigprocmask>(2)  が (I<oldset> 引き数で) 返すシグナルマスクを指定して B<sigsuspend>()  を呼び出すことで、クリティカルコード実行中に発生した シグナルを待つことができる。"
7404
7405 #. type: Plain text
7406 #: build/C/man2/sigsuspend.2:118
7407 msgid "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), B<sigwaitinfo>(2), B<sigsetops>(3), B<sigwait>(3), B<signal>(7)"
7408 msgstr "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), B<sigwaitinfo>(2), B<sigsetops>(3), B<sigwait>(3), B<signal>(7)"
7409
7410 #. type: TH
7411 #: build/C/man3/sigvec.3:26
7412 #, no-wrap
7413 msgid "SIGVEC"
7414 msgstr "SIGVEC"
7415
7416 #. type: Plain text
7417 #: build/C/man3/sigvec.3:29
7418 msgid "sigvec, sigblock, sigsetmask, siggetmask, sigmask - BSD signal API"
7419 msgstr "sigvec, sigblock, sigsetmask, siggetmask, sigmask - BSD 版シグナル API"
7420
7421 #. type: Plain text
7422 #: build/C/man3/sigvec.3:33
7423 msgid "B<int sigvec(int >I<sig>B<, const struct sigvec *>I<vec>B<, struct sigvec *>I<ovec>B<);>"
7424 msgstr "B<int sigvec(int >I<sig>B<, const struct sigvec *>I<vec>B<, struct sigvec *>I<ovec>B<);>"
7425
7426 #. type: Plain text
7427 #: build/C/man3/sigvec.3:35
7428 msgid "B<int sigmask(int >I<signum>B<);>"
7429 msgstr "B<int sigmask(int >I<signum>B<);>"
7430
7431 #. type: Plain text
7432 #: build/C/man3/sigvec.3:37
7433 msgid "B<int sigblock(int >I<mask>B<);>"
7434 msgstr "B<int sigblock(int >I<mask>B<);>"
7435
7436 #. type: Plain text
7437 #: build/C/man3/sigvec.3:39
7438 msgid "B<int sigsetmask(int >I<mask>B<);>"
7439 msgstr "B<int sigsetmask(int >I<mask>B<);>"
7440
7441 #. type: Plain text
7442 #: build/C/man3/sigvec.3:41
7443 msgid "B<int siggetmask(void);>"
7444 msgstr "B<int siggetmask(void);>"
7445
7446 #. type: Plain text
7447 #: build/C/man3/sigvec.3:49
7448 msgid "All functions shown above: _BSD_SOURCE"
7449 msgstr "上記の全ての関数: _BSD_SOURCE"
7450
7451 #. type: Plain text
7452 #: build/C/man3/sigvec.3:56
7453 msgid "These functions are provided in glibc as a compatibility interface for programs that make use of the historical BSD signal API.  This API is obsolete: new applications should use the POSIX signal API (B<sigaction>(2), B<sigprocmask>(2), etc.)."
7454 msgstr "これらの関数は、昔ながらの BSD 版シグナル API を使用しているプログラム に対して互換性のあるインターフェースを glibc で提供するものである。 この API は過去のものであり、新しいアプリケーションでは POSIX シグナル API (B<sigaction>(2), B<sigprocmask>(2)  など) を使用すべきである。"
7455
7456 #. type: Plain text
7457 #: build/C/man3/sigvec.3:81
7458 msgid "The B<sigvec>()  function sets and/or gets the disposition of the signal I<sig> (like the POSIX B<sigaction>(2)).  If I<vec> is not NULL, it points to a I<sigvec> structure that defines the new disposition for I<sig>.  If I<ovec> is not NULL, it points to a I<sigvec> structure that is used to return the previous disposition of I<sig>.  To obtain the current disposition of I<sig> without changing it, specify NULL for I<vec>, and a non-null pointer for I<ovec>."
7459 msgstr "関数 B<sigvec>()  は、(POSIX の B<sigaction>(2)  と同様に) シグナル I<sig> の動作の設定・取得を行う。 I<vec> は、NULL 以外の場合、 I<sig> の新しい動作を定義した I<sigvec> 構造体へのポインターである。 I<ovec> は、NULL 以外の場合、 I<sig> の変更前の動作を返すために使用される I<sigvec> 構造体へのポインターである。 I<sig> の動作を変更せずに現在の動作を取得するためには、 I<vec> に NULL を指定し、 I<ovec> に NULL でないポインターを指定すればよい。"
7460
7461 #. type: Plain text
7462 #: build/C/man3/sigvec.3:91
7463 msgid "The I<sigvec> structure has the following form:"
7464 msgstr "I<sigvec> 構造体は以下の通りである:"
7465
7466 #. type: Plain text
7467 #: build/C/man3/sigvec.3:99
7468 #, no-wrap
7469 msgid ""
7470 "struct sigvec {\n"
7471 "    void (*sv_handler)(int); /* Signal disposition */\n"
7472 "    int    sv_mask;          /* Signals to be blocked in handler */\n"
7473 "    int    sv_flags;         /* Flags */\n"
7474 "};\n"
7475 msgstr ""
7476 "struct sigvec {\n"
7477 "    void (*sv_handler)(int); /* Signal disposition */\n"
7478 "    int    sv_mask;          /* Signals to be blocked in handler */\n"
7479 "    int    sv_flags;         /* Flags */\n"
7480 "};\n"
7481
7482 #. type: Plain text
7483 #: build/C/man3/sigvec.3:110
7484 msgid "The I<sv_handler> field specifies the disposition of the signal, and is either: the address of a signal handler function; B<SIG_DFL>, meaning the default disposition applies for the signal; or B<SIG_IGN>, meaning that the signal is ignored."
7485 msgstr "I<sv_handler> フィールドはシグナルの動作を指定するもので、 シグナルハンドラー関数のアドレスか、 B<SIG_DFL> と B<SIG_IGN> のいずれかを指定できる。 B<SIG_DFL> はシグナルに適用されるデフォルトの動作を意味し、 B<SIG_IGN> はシグナルを無視することを意味する。"
7486
7487 #. type: Plain text
7488 #: build/C/man3/sigvec.3:124
7489 msgid "If I<sv_handler> specifies the address of a signal handler, then I<sv_mask> specifies a mask of signals that are to be blocked while the handler is executing.  In addition, the signal for which the handler is invoked is also blocked.  Attempts to block B<SIGKILL> or B<SIGSTOP> are silently ignored."
7490 msgstr "I<sv_handler> にシグナルハンドラーのアドレスを指定した場合、 I<sv_mask> はハンドラーが実行中にブロックされるべきシグナルのマスクを指定する。 また、ハンドラーを起動したシグナル自身はブロックされる。 B<SIGKILL> か B<SIGSTOP> をブロックしようとした場合には、黙って無視される。"
7491
7492 #. type: Plain text
7493 #: build/C/man3/sigvec.3:131
7494 msgid "If I<sv_handler> specifies the address of a signal handler, then the I<sv_flags> field specifies flags controlling what happens when the handler is called.  This field may contain zero or more of the following flags:"
7495 msgstr "I<sv_handler> にシグナルハンドラーのアドレスを指定した場合、 I<sv_flags> フィールドはハンドラーが呼ばれた際の挙動を制御するフラグを指定する。 このフィールドには、0 か、以下のフラグを 1個以上指定できる:"
7496
7497 #. type: TP
7498 #: build/C/man3/sigvec.3:131
7499 #, no-wrap
7500 msgid "B<SV_INTERRUPT>"
7501 msgstr "B<SV_INTERRUPT>"
7502
7503 #. type: Plain text
7504 #: build/C/man3/sigvec.3:139
7505 msgid "If the signal handler interrupts a blocking system call, then upon return from the handler the system call will not be restarted: instead it will fail with the error B<EINTR>.  If this flag is not specified, then system calls are restarted by default."
7506 msgstr "シグナルハンドラーが停止中のシステムコールを中断した場合、 ハンドラーから復帰しても、システムコールは再開されず、 エラー B<EINTR> で失敗する。 このフラグを指定しなかった場合、システムコールは デフォルトで再開される。"
7507
7508 #. type: TP
7509 #: build/C/man3/sigvec.3:139
7510 #, no-wrap
7511 msgid "B<SV_RESETHAND>"
7512 msgstr "B<SV_RESETHAND>"
7513
7514 #. type: Plain text
7515 #: build/C/man3/sigvec.3:148
7516 msgid "Reset the disposition of the signal to the default before calling the signal handler.  If this flag is not specified, then the handler remains established until explicitly removed by a later call to B<sigvec>()  or until the process performs an B<execve>(2)."
7517 msgstr "シグナルハンドラーを呼び出す前にシグナルの動作を デフォルトにリセットする。 このフラグを指定しなかった場合、もう一度 B<sigvec>()  を呼び出して明示的に削除されるか、プロセスが B<execve>(2)  を実行するまで、ハンドラーは設定されたままとなる。"
7518
7519 #. type: TP
7520 #: build/C/man3/sigvec.3:148
7521 #, no-wrap
7522 msgid "B<SV_ONSTACK>"
7523 msgstr "B<SV_ONSTACK>"
7524
7525 #. type: Plain text
7526 #: build/C/man3/sigvec.3:155
7527 msgid "Handle the signal on the alternate signal stack (historically established under BSD using the obsolete B<sigstack>()  function; the POSIX replacement is B<sigaltstack>(2))."
7528 msgstr "代替シグナルスタック上でシグナルハンドラーを実行する (歴史的に、BSD では代替シグナルスタックは廃止された関数 B<sigstack>()  を使って設定する。POSIX では、代わりに B<sigaltstack>(2)  を使用する)。"
7529
7530 #. type: Plain text
7531 #: build/C/man3/sigvec.3:165
7532 msgid "The B<sigmask>()  macro constructs and returns a \"signal mask\" for I<signum>.  For example, we can initialize the I<vec.sv_mask> field given to B<sigvec>()  using code such as the following:"
7533 msgstr "マクロ B<sigmask>()  は I<signum> に対する「シグナルマスク」を構成して返す。 例えば、以下のようなコードを使うと、 B<sigvec>()  に渡す I<vec.sv_mask> を初期化できる。"
7534
7535 #. type: Plain text
7536 #: build/C/man3/sigvec.3:170
7537 #, no-wrap
7538 msgid ""
7539 "    vec.sv_mask = sigmask(SIGQUIT) | sigmask(SIGABRT);\n"
7540 "                /* Block SIGQUIT and SIGABRT during\n"
7541 "                   handler execution */\n"
7542 msgstr ""
7543 "    vec.sv_mask = sigmask(SIGQUIT) | sigmask(SIGABRT);\n"
7544 "                /* Block SIGQUIT and SIGABRT during\n"
7545 "                   handler execution */\n"
7546
7547 #. type: Plain text
7548 #: build/C/man3/sigvec.3:185
7549 msgid "The B<sigblock>()  function adds the signals in I<mask> to the process's signal mask (like POSIX I<sigprocmask(SIG_BLOCK)>), and returns the process's previous signal mask.  Attempts to block B<SIGKILL> or B<SIGSTOP> are silently ignored."
7550 msgstr "B<sigblock>()  関数は、 I<mask> にあるシグナルをプロセスのシグナルマスクに追加し (POSIX の I<sigprocmask(SIG_BLOCK)> と同様)、変更前のプロセスのシグナルマスクを返す。 B<SIGKILL> や B<SIGSTOP> をブロックしようとした場合には、黙って無視される。"
7551
7552 #. type: Plain text
7553 #: build/C/man3/sigvec.3:193
7554 msgid "The B<sigsetmask>()  function sets the process's signal mask to the value given in I<mask> (like POSIX I<sigprocmask(SIG_SETMASK)>), and returns the process's previous signal mask."
7555 msgstr "B<sigsetmask>()  関数はプロセスのシグナルマスクを I<mask> で指定された値に設定し (POSIX の I<sigprocmask(SIG_SETMASK)> と同様)、変更前のプロセスのシグナルマスクを返す。"
7556
7557 #. type: Plain text
7558 #: build/C/man3/sigvec.3:199
7559 msgid "The B<siggetmask>()  function returns the process's current signal mask.  This call is equivalent to I<sigblock(0)>."
7560 msgstr "B<siggetmask>()  関数はプロセスの現在のシグナルマスクを返す。この関数は I<sigblock(0)> と等価である。"
7561
7562 #. type: Plain text
7563 #: build/C/man3/sigvec.3:205
7564 msgid "The B<sigvec>()  function returns 0 on success; on error, it returns -1 and sets I<errno> to indicate the error."
7565 msgstr "B<sigvec>()  関数は成功すると 0 を返す。エラーの場合、-1 を返し、 I<errno> にエラーを示す値をセットする。"
7566
7567 #. type: Plain text
7568 #: build/C/man3/sigvec.3:211
7569 msgid "The B<sigblock>()  and B<sigsetmask>()  functions return the previous signal mask."
7570 msgstr "B<sigblock>()  と B<sigsetmask>()  は変更前のシグナルマスクを返す。"
7571
7572 #. type: Plain text
7573 #: build/C/man3/sigvec.3:216
7574 msgid "The B<sigmask>()  macro returns the signal mask for I<signum>."
7575 msgstr "B<sigmask>() マクロは I<signum> のシグナルマスクを返す。"
7576
7577 #. type: Plain text
7578 #: build/C/man3/sigvec.3:221
7579 msgid "See the ERRORS under B<sigaction>(2)  and B<sigprocmask>(2)."
7580 msgstr "B<sigaction>(2)  と B<sigprocmask>(2)  の「エラー」の節を参照。"
7581
7582 #. type: Plain text
7583 #: build/C/man3/sigvec.3:230
7584 msgid "The B<sigvec>(), B<sigblock>(), B<sigsetmask>(), and B<siggetmask>()  functions are thread-safe."
7585 msgstr "関数 B<sigvec>(), B<sigblock>(), B<sigsetmask>(), B<siggetmask>() はスレッドセーフである。"
7586
7587 #. type: Plain text
7588 #: build/C/man3/sigvec.3:234
7589 msgid "The B<sigmask>()  macro is thread-safe."
7590 msgstr "B<sigmask>() マクロはスレッドセーフである。"
7591
7592 #. type: Plain text
7593 #: build/C/man3/sigvec.3:241
7594 msgid "Starting with version 2.21, the GNU C library no longer exports the B<sigvec>()  function as part of the ABI.  (To ensure backward compatibility, the glibc symbol versioning scheme continues to export the interface to binaries linked against older versions of the library.)"
7595 msgstr "バージョン 2.21 以降では、 GNU C ライブラリはもはや B<sigvec>() 関数を ABI の一部として公開しなくなった。 (後方互換性を保証するために、glibc のシンボルのバージョン付け機構により、 古いバージョンのライブラリとリンクされたバイナリに対してはこのインターフェースが引き続き公開されている。)"
7596
7597 #. type: Plain text
7598 #: build/C/man3/sigvec.3:247
7599 msgid "All of these functions were in 4.3BSD, except B<siggetmask>(), whose origin is unclear.  These functions are obsolete: do not use them in new programs."
7600 msgstr "これらの関数のうち B<siggetmask>()  以外の全ては 4.3BSD にあった。 B<siggetmask>()  の出自ははっきりしない。 これらの関数は廃止予定であり、新しいプログラムでは使用しないこと。"
7601
7602 #. type: Plain text
7603 #: build/C/man3/sigvec.3:264
7604 msgid "On 4.3BSD, the B<signal>()  function provided reliable semantics (as when calling B<sigvec>()  with I<vec.sv_mask> equal to 0).  On System V, B<signal>()  provides unreliable semantics.  POSIX.1-2001 leaves these aspects of B<signal>()  unspecified.  See B<signal>(2)  for further details."
7605 msgstr "4.3BSD では、信頼性のあるシグナル処理機構を提供する (I<vec.sv_mask> を 0 で B<sigvec>()  を呼び出したときと同様)。 System V が提供する処理機構は信頼性のないものである。 POSIX.1-2001 では、 B<signal>()  のこの点は規定しないままとなっている。 さらなる詳細については B<signal>(2)  を参照。"
7606
7607 #. type: Plain text
7608 #: build/C/man3/sigvec.3:282
7609 msgid "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), B<raise>(3), B<sigpause>(3), B<sigset>(3), B<signal>(7)"
7610 msgstr "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), B<raise>(3), B<sigpause>(3), B<sigset>(3), B<signal>(7)"
7611
7612 #. type: TH
7613 #: build/C/man3/sigwait.3:26
7614 #, no-wrap
7615 msgid "SIGWAIT"
7616 msgstr "SIGWAIT"
7617
7618 #. type: Plain text
7619 #: build/C/man3/sigwait.3:29
7620 msgid "sigwait - wait for a signal"
7621 msgstr "sigwait - シグナルを待つ"
7622
7623 #. type: Plain text
7624 #: build/C/man3/sigwait.3:34
7625 #, no-wrap
7626 msgid "B< int sigwait(const sigset_t *>I<set>B<, int *>I<sig>B<);>\n"
7627 msgstr "B< int sigwait(const sigset_t *>I<set>B<, int *>I<sig>B<);>\n"
7628
7629 #. type: Plain text
7630 #: build/C/man3/sigwait.3:44
7631 msgid "B<sigwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
7632 msgstr "B<sigwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
7633
7634 #. type: Plain text
7635 #: build/C/man3/sigwait.3:56
7636 msgid "The B<sigwait>()  function suspends execution of the calling thread until one of the signals specified in the signal set I<set> becomes pending.  The function accepts the signal (removes it from the pending list of signals), and returns the signal number in I<sig>."
7637 msgstr "B<sigwait>()  関数は、シグナル集合 I<set> で指定されたシグナルの一つが処理待ち (pending) になるまで、 呼び出したスレッドの実行を中断する。 この関数はそのシグナルを受け取り (つまり、処理待ちのシグナルのリスト からそのシグナルを削除し)、そのシグナル番号を I<sig> に格納して返す。"
7638
7639 #. type: Plain text
7640 #: build/C/man3/sigwait.3:62
7641 msgid "The operation of B<sigwait>()  is the same as B<sigwaitinfo>(2), except that:"
7642 msgstr "B<sigwait>()  の動作は B<sigwaitinfo>(2)  と同じだが、以下の点が異なる。"
7643
7644 #. type: Plain text
7645 #: build/C/man3/sigwait.3:67
7646 msgid "B<sigwait>()  returns only the signal number, rather than a I<siginfo_t> structure describing the signal."
7647 msgstr "B<sigwait>()  は、シグナルの内容を表す I<siginfo_t> 構造体を返すのではなく、単にシグナル番号を返す。"
7648
7649 #. type: Plain text
7650 #: build/C/man3/sigwait.3:69
7651 msgid "The return values of the two functions are different."
7652 msgstr "返り値が B<sigwaitinfo>(2)  とは異なる。"
7653
7654 #. type: Plain text
7655 #: build/C/man3/sigwait.3:74
7656 msgid "On success, B<sigwait>()  returns 0.  On error, it returns a positive error number (listed in ERRORS)."
7657 msgstr "成功すると、 B<sigwait>()  は 0 を返す。 エラーの場合、(「エラー」の節のリストにある) 正のエラー番号を返す。"
7658
7659 #.  Does not occur for glibc.
7660 #. type: Plain text
7661 #: build/C/man3/sigwait.3:80
7662 msgid "I<set> contains an invalid signal number."
7663 msgstr "I<set> に無効なシグナル番号が入っている。"
7664
7665 #. type: Plain text
7666 #: build/C/man3/sigwait.3:85
7667 msgid "The B<sigwait>()  function is thread-safe."
7668 msgstr "B<sigwait>() 関数はスレッドセーフである。"
7669
7670 #. type: Plain text
7671 #: build/C/man3/sigwait.3:91
7672 msgid "B<sigwait>()  is implemented using B<sigtimedwait>(2)."
7673 msgstr "B<sigwait>()  は B<sigtimedwait>(2)  を使って実装されている。"
7674
7675 #. type: Plain text
7676 #: build/C/man3/sigwait.3:94
7677 msgid "See B<pthread_sigmask>(3)."
7678 msgstr "B<pthread_sigmask>(3)  を参照。"
7679
7680 #. type: Plain text
7681 #: build/C/man3/sigwait.3:102
7682 msgid "B<sigaction>(2), B<signalfd>(2), B<sigpending>(2), B<sigsuspend>(2), B<sigwaitinfo>(2), B<sigsetops>(3), B<signal>(7)"
7683 msgstr "B<sigaction>(2), B<signalfd>(2), B<sigpending>(2), B<sigsuspend>(2), B<sigwaitinfo>(2), B<sigsetops>(3), B<signal>(7)"
7684
7685 #. type: TH
7686 #: build/C/man2/sigwaitinfo.2:25
7687 #, no-wrap
7688 msgid "SIGWAITINFO"
7689 msgstr "SIGWAITINFO"
7690
7691 #. type: Plain text
7692 #: build/C/man2/sigwaitinfo.2:28
7693 msgid "sigwaitinfo, sigtimedwait - synchronously wait for queued signals"
7694 msgstr "sigwaitinfo, sigtimedwait - キューに入れられたシグナルを同期して待つ"
7695
7696 #. type: Plain text
7697 #: build/C/man2/sigwaitinfo.2:33
7698 #, no-wrap
7699 msgid "B<int sigwaitinfo(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<);>\n"
7700 msgstr "B<int sigwaitinfo(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<);>\n"
7701
7702 #. type: Plain text
7703 #: build/C/man2/sigwaitinfo.2:36
7704 #, no-wrap
7705 msgid ""
7706 "B<int sigtimedwait(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<, >\n"
7707 "B<                 const struct timespec *>I<timeout>B<);>\n"
7708 msgstr ""
7709 "B<int sigtimedwait(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<, >\n"
7710 "B<                 const struct timespec *>I<timeout>B<);>\n"
7711
7712 #. type: Plain text
7713 #: build/C/man2/sigwaitinfo.2:46
7714 msgid "B<sigwaitinfo>(), B<sigtimedwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
7715 msgstr "B<sigwaitinfo>(), B<sigtimedwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
7716
7717 #. type: Plain text
7718 #: build/C/man2/sigwaitinfo.2:56
7719 msgid "B<sigwaitinfo>()  suspends execution of the calling thread until one of the signals in I<set> is pending (If one of the signals in I<set> is already pending for the calling thread, B<sigwaitinfo>()  will return immediately.)"
7720 msgstr "B<sigwaitinfo>()  は I<set> のうちのどれかのシグナルが処理待ちになるまで、 呼び出しスレッドの実行を一時停止する (呼び出しスレッドに対して I<set> のうちのどれかのシグナルが既に待機中 (pending) である場合、 B<sigwaitinfo>()  はすぐに戻る)。"
7721
7722 #. type: Plain text
7723 #: build/C/man2/sigwaitinfo.2:68
7724 msgid "B<sigwaitinfo>()  removes the signal from the set of pending signals and returns the signal number as its function result.  If the I<info> argument is not NULL, then the buffer that it points to is used to return a structure of type I<siginfo_t> (see B<sigaction>(2))  containing information about the signal."
7725 msgstr "B<sigwaitinfo>()  はそのシグナルを待機中のシグナルの集合から削除し、関数の結果としてシグナル番号を返す。 I<info> 引き数が NULL でない場合、配送されたシグナルの情報が入った I<siginfo_t> 型 (B<sigaction>(2)  を参照) の構造体を I<info> が指すバッファーに入れて返す。"
7726
7727 #. type: Plain text
7728 #: build/C/man2/sigwaitinfo.2:76
7729 msgid "If multiple signals in I<set> are pending for the caller, the signal that is retrieved by B<sigwaitinfo>()  is determined according to the usual ordering rules; see B<signal>(7)  for further details."
7730 msgstr "呼び出し元に対して I<set> の複数のシグナルが処理待ちの場合、 B<sigwaitinfo>() で取得するシグナルは通常の順序決定ルールに基づいて決定される。 詳細は B<signal>(7) を参照のこと。"
7731
7732 #. type: Plain text
7733 #: build/C/man2/sigwaitinfo.2:88
7734 msgid "B<sigtimedwait>()  operates in exactly the same way as B<sigwaitinfo>()  except that it has an additional argument, I<timeout>, which specifies the interval for which the thread is suspended waiting for a signal.  (This interval will be rounded up to the system clock granularity, and kernel scheduling delays mean that the interval may overrun by a small amount.)  This argument is of the following type:"
7735 msgstr "B<sigtimedwait>() は、 B<sigwaitinfo>() と次の点を除いて全く同じように動作する。この関数にはもう 1 つの引き数 I<timeout> があり、シグナル待ちでスレッドが一時停止する時間を指定することができる(この時間はシステムクロックの粒度に切り上げられ、カーネルのスケジューリング遅延により少しだけ長くなる可能性がある)。この引き数の型は以下のとおりである:"
7736
7737 #. type: Plain text
7738 #: build/C/man2/sigwaitinfo.2:95
7739 #, no-wrap
7740 msgid ""
7741 "struct timespec {\n"
7742 "    long    tv_sec;         /* seconds */\n"
7743 "    long    tv_nsec;        /* nanoseconds */\n"
7744 "}\n"
7745 msgstr ""
7746 "struct timespec {\n"
7747 "    long    tv_sec;         /* 秒 */\n"
7748 "    long    tv_nsec;        /* ナノ秒 */\n"
7749 "}\n"
7750
7751 #. type: Plain text
7752 #: build/C/man2/sigwaitinfo.2:105
7753 msgid "If both fields of this structure are specified as 0, a poll is performed: B<sigtimedwait>()  returns immediately, either with information about a signal that was pending for the caller, or with an error if none of the signals in I<set> was pending."
7754 msgstr "この構造体の 2 つのフィールドがともに 0 の場合、ポーリングが行われる: B<sigtimedwait>()  は、呼び出し側プロセスに対して 待機しているシグナルの情報を返して戻るか、 I<set> のうちのどのシグナルも待機していない場合はエラーを返して戻る。"
7755
7756 #. type: Plain text
7757 #: build/C/man2/sigwaitinfo.2:114
7758 msgid "On success, both B<sigwaitinfo>()  and B<sigtimedwait>()  return a signal number (i.e., a value greater than zero).  On failure both calls return -1, with I<errno> set to indicate the error."
7759 msgstr "成功した場合、 B<sigwaitinfo>()  と B<sigtimedwait>()  はシグナル番号 (すなわち 0 より大きい数) を返す。 失敗した場合、2 つの関数は -1 を返し、 I<errno> はエラーを表す値に設定される。"
7760
7761 #. type: Plain text
7762 #: build/C/man2/sigwaitinfo.2:123
7763 msgid "No signal in I<set> was became pending within the I<timeout> period specified to B<sigtimedwait>()."
7764 msgstr "I<set> のうちのどのシグナルも B<sigtimedwait>()  に指定された I<timeout> の期間内に処理待ちにならなかった。"
7765
7766 #. type: Plain text
7767 #: build/C/man2/sigwaitinfo.2:129
7768 msgid "The wait was interrupted by a signal handler; see B<signal>(7).  (This handler was for a signal other than one of those in I<set>.)"
7769 msgstr "シグナル待ちがシグナルハンドラーによって中断 (interrupt) された (このハンドラーは I<set> にあるシグナル以外のものである)。 B<signal>(7)  参照。"
7770
7771 #. type: Plain text
7772 #: build/C/man2/sigwaitinfo.2:133
7773 msgid "I<timeout> was invalid."
7774 msgstr "I<timeout> が不正である。"
7775
7776 #. type: Plain text
7777 #: build/C/man2/sigwaitinfo.2:153
7778 msgid "In normal usage, the calling program blocks the signals in I<set> via a prior call to B<sigprocmask>(2)  (so that the default disposition for these signals does not occur if they become pending between successive calls to B<sigwaitinfo>()  or B<sigtimedwait>())  and does not establish handlers for these signals.  In a multithreaded program, the signal should be blocked in all threads, in order to prevent the signal being treated according to its default disposition in a thread other than the one calling B<sigwaitinfo>()  or B<sigtimedwait>())."
7779 msgstr "通常の使用法では、呼び出し側プロセスはこれらの関数より先に B<sigprocmask>(2)  の呼び出すことにより I<set> に含まれるシグナルをブロックし (そのためにこれらのシグナルがこの後に続く B<sigwaitinfo>()  や B<sigtimedwait>()  の呼び出しの間に処理待ちになった場合には、デフォルトの動作は行われず)、 これらのシグナルに対するハンドラーは設定しない。 マルチスレッドプログラムでは、 B<sigwaitinfo>()  や B<sigtimedwait>() を呼び出したスレッド以外のスレッドで、そのシグナルがデフォルトの動作に基いて処理されないように、全てのスレッドで該当シグナルをブロックすべきである。"
7780
7781 #. type: Plain text
7782 #: build/C/man2/sigwaitinfo.2:158
7783 msgid "The set of signals that is pending for a given thread is the union of the set of signals that is pending specifically for that thread and the set of signals that is pending for the process as a whole (see B<signal>(7))."
7784 msgstr "指定されたスレッドに対する処理待ちのシグナルの集合は、 そのスレッド自体宛ての処理待ちのシグナル集合と、プロセス全体宛ての 処理待ちのシグナル集合をあわせたものである (B<signal>(7)  参照)。"
7785
7786 #. type: Plain text
7787 #: build/C/man2/sigwaitinfo.2:164
7788 msgid "Attempts to wait for B<SIGKILL> and B<SIGSTOP> are silently ignored."
7789 msgstr "B<SIGKILL> と B<SIGSTOP> を待とうとした場合、黙って無視される。"
7790
7791 #. type: Plain text
7792 #: build/C/man2/sigwaitinfo.2:173
7793 msgid "If multiple threads of a process are blocked waiting for the same signal(s) in B<sigwaitinfo>()  or B<sigtimedwait>(), then exactly one of the threads will actually receive the signal if it becomes pending for the process as a whole; which of the threads receives the signal is indeterminate."
7794 msgstr "一つのプロセス内の複数のスレッドが B<sigwaitinfo>()  や B<sigtimedwait>()  で同じシグナルを待って停止した場合、 プロセス全体宛てのシグナルが処理待ちになると、複数のスレッドのうち一つだけが 実際にそのシグナルを受信することになる。 どのスレッドがシグナルを受信するかは決まっていない。"
7795
7796 #. type: Plain text
7797 #: build/C/man2/sigwaitinfo.2:183
7798 msgid "POSIX leaves the meaning of a NULL value for the I<timeout> argument of B<sigtimedwait>()  unspecified, permitting the possibility that this has the same meaning as a call to B<sigwaitinfo>(), and indeed this is what is done on Linux."
7799 msgstr "POSIX では B<sigtimedwait>()  の引き数 I<timeout> の値を NULL にした場合の意味を未定義としている。 B<sigwaitinfo>()  を呼び出したのと同じ意味としてもよいことになっており、 実際 Linux ではこのように動作する。"
7800
7801 #. type: Plain text
7802 #: build/C/man2/sigwaitinfo.2:188
7803 msgid "On Linux, B<sigwaitinfo>()  is a library function implemented on top of B<sigtimedwait>()."
7804 msgstr "Linux では、 B<sigwaitinfo>()  は B<sigtimedwait>()  を用いて実装されたライブラリ関数である。"
7805
7806 #. type: Plain text
7807 #: build/C/man2/sigwaitinfo.2:201
7808 msgid "The raw B<sigtimedwait>()  system call has a fifth argument, I<size_t sigsetsize>, which specifies the size in bytes of the I<set> argument.  The glibc B<sigtimedwait>()  wrapper function specifies this argument as a fixed value (equal to I<sizeof(sigset_t)>)."
7809 msgstr "素の B<sigtimedwait>() システムコールは 5 番目の引き数 I<size_t sigsetsize> を取る。 この引き数は I<set> 引き数のバイト単位のサイズを指定する。 glibc の B<sigtimedwait>() のラッパー関数はこの引き数に固定値 (I<sizeof(sigset_t)> と同じ) を指定する。"
7810
7811 #. type: Plain text
7812 #: build/C/man2/sigwaitinfo.2:213
7813 msgid "B<kill>(2), B<sigaction>(2), B<signal>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), B<sigqueue>(3), B<sigsetops>(3), B<sigwait>(3), B<signal>(7), B<time>(7)"
7814 msgstr "B<kill>(2), B<sigaction>(2), B<signal>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), B<sigqueue>(3), B<sigsetops>(3), B<sigwait>(3), B<signal>(7), B<time>(7)"
7815
7816 #. type: TH
7817 #: build/C/man3/sysv_signal.3:25
7818 #, no-wrap
7819 msgid "SYSV_SIGNAL"
7820 msgstr "SYSV_SIGNAL"
7821
7822 #. type: TH
7823 #: build/C/man3/sysv_signal.3:25
7824 #, no-wrap
7825 msgid "2014-01-06"
7826 msgstr "2014-01-06"
7827
7828 #. type: Plain text
7829 #: build/C/man3/sysv_signal.3:28
7830 msgid "sysv_signal - signal handling with System V semantics"
7831 msgstr "sysv_signal - System V 方式のシグナル処理"
7832
7833 #. type: Plain text
7834 #: build/C/man3/sysv_signal.3:30
7835 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
7836 msgstr "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */"
7837
7838 #. type: Plain text
7839 #: build/C/man3/sysv_signal.3:36
7840 msgid "B<sighandler_t sysv_signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
7841 msgstr "B<sighandler_t sysv_signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
7842
7843 #. type: Plain text
7844 #: build/C/man3/sysv_signal.3:41
7845 msgid "The B<sysv_signal>()  function takes the same arguments, and performs the same task, as B<signal>(2)."
7846 msgstr "B<sysv_signal>()  関数は B<signal>(2)  と同じ引き数をとり、同じ処理を実行する。"
7847
7848 #. type: Plain text
7849 #: build/C/man3/sysv_signal.3:51
7850 msgid "However B<sysv_signal>()  provides the System V unreliable signal semantics, that is: a) the disposition of the signal is reset to the default when the handler is invoked; b) delivery of further instances of the signal is not blocked while the signal handler is executing; and c) if the handler interrupts (certain) blocking system calls, then the system call is not automatically restarted."
7851 msgstr "しかしながら、 B<sysv_signal>()  は System V の信頼性に欠けるシグナル処理方式を提供している。 信頼性に欠けるシグナル処理方式は以下の特徴を持つ。 a) ハンドラーが起動されると、シグナルの処理方法 (disposition) が デフォルトにリセットされる、 b) シグナルハンドラーの実行中は、それ以降に発生した同じシグナルの配送が ブロックされない、 c) ハンドラーが停止中の (blocking している) システムコールを中断した場合、 自動的に再開されないシステムコールがある。"
7852
7853 #. type: Plain text
7854 #: build/C/man3/sysv_signal.3:57
7855 msgid "The B<sysv_signal>()  function returns the previous value of the signal handler, or B<SIG_ERR> on error."
7856 msgstr "B<sysv_signal>()  関数はシグナルハンドラーの直前の値を返す。 エラーの場合、 B<SIG_ERR> を返す。"
7857
7858 #. type: Plain text
7859 #: build/C/man3/sysv_signal.3:65
7860 msgid "The B<sysv_signal>()  function is thread-safe."
7861 msgstr "B<sysv_signal>() 関数はスレッドセーフである。"
7862
7863 #. type: Plain text
7864 #: build/C/man3/sysv_signal.3:67
7865 msgid "This function is nonstandard."
7866 msgstr "この関数は非標準である。"
7867
7868 #. type: Plain text
7869 #: build/C/man3/sysv_signal.3:73
7870 msgid "Use of B<sysv_signal>()  should be avoided; use B<sigaction>(2)  instead."
7871 msgstr "B<sysv_signal>()  の使用は避けるべきである。代わりに B<sigaction>(2)  を使うこと。"
7872
7873 #. type: Plain text
7874 #: build/C/man3/sysv_signal.3:84
7875 msgid "On older Linux systems, B<sysv_signal>()  and B<signal>(2)  were equivalent.  But on newer systems, B<signal>(2)  provides reliable signal semantics; see B<signal>(2)  for details."
7876 msgstr "以前の Linux システムでは、 B<sysv_signal>()  と B<signal>(2)  は等価であった。しかし、新しめのシステムでは、 B<signal>(2)  は信頼性のあるシグナル処理方式を提供している。 詳細は B<signal>(2)  を参照。"
7877
7878 #. type: Plain text
7879 #: build/C/man3/sysv_signal.3:97
7880 msgid "B<sigaction>(2), B<signal>(2), B<bsd_signal>(3), B<signal>(7)"
7881 msgstr "B<sigaction>(2), B<signal>(2), B<bsd_signal>(3), B<signal>(7)"
7882
7883 #. type: TH
7884 #: build/C/man2/timer_create.2:33
7885 #, no-wrap
7886 msgid "TIMER_CREATE"
7887 msgstr "TIMER_CREATE"
7888
7889 #. type: Plain text
7890 #: build/C/man2/timer_create.2:36
7891 msgid "timer_create - create a POSIX per-process timer"
7892 msgstr ""
7893
7894 #. type: Plain text
7895 #: build/C/man2/timer_create.2:40
7896 #, no-wrap
7897 msgid ""
7898 "B<#include E<lt>signal.hE<gt>>\n"
7899 "B<#include E<lt>time.hE<gt>>\n"
7900 msgstr ""
7901 "B<#include E<lt>signal.hE<gt>>\n"
7902 "B<#include E<lt>time.hE<gt>>\n"
7903
7904 #. type: Plain text
7905 #: build/C/man2/timer_create.2:43
7906 #, no-wrap
7907 msgid ""
7908 "B<int timer_create(clockid_t >I<clockid>B<, struct sigevent *>I<sevp>B<,>\n"
7909 "B<                 timer_t *>I<timerid>B<);>\n"
7910 msgstr ""
7911 "B<int timer_create(clockid_t >I<clockid>B<, struct sigevent *>I<sevp>B<,>\n"
7912 "B<                 timer_t *>I<timerid>B<);>\n"
7913
7914 #. type: Plain text
7915 #: build/C/man2/timer_create.2:46 build/C/man2/timer_delete.2:37
7916 #: build/C/man2/timer_getoverrun.2:37 build/C/man2/timer_settime.2:41
7917 msgid "Link with I<-lrt>."
7918 msgstr "I<-lrt> でリンクする。"
7919
7920 #. type: Plain text
7921 #: build/C/man2/timer_create.2:54
7922 msgid "B<timer_create>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
7923 msgstr "B<timer_create>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
7924
7925 #. type: Plain text
7926 #: build/C/man2/timer_create.2:62
7927 msgid "B<timer_create>()  creates a new per-process interval timer.  The ID of the new timer is returned in the buffer pointed to by I<timerid>, which must be a non-null pointer.  This ID is unique within the process, until the timer is deleted.  The new timer is initially disarmed."
7928 msgstr ""
7929
7930 #. type: Plain text
7931 #: build/C/man2/timer_create.2:67
7932 msgid "The I<clockid> argument specifies the clock that the new timer uses to measure time.  It can be specified as one of the following values:"
7933 msgstr ""
7934
7935 #. type: TP
7936 #: build/C/man2/timer_create.2:67
7937 #, no-wrap
7938 msgid "B<CLOCK_REALTIME>"
7939 msgstr "B<CLOCK_REALTIME>"
7940
7941 #. type: Plain text
7942 #: build/C/man2/timer_create.2:70
7943 msgid "A settable system-wide real-time clock."
7944 msgstr ""
7945
7946 #. type: TP
7947 #: build/C/man2/timer_create.2:70
7948 #, no-wrap
7949 msgid "B<CLOCK_MONOTONIC>"
7950 msgstr "B<CLOCK_MONOTONIC>"
7951
7952 #.  Note: the CLOCK_MONOTONIC_RAW clock added for clock_gettime()
7953 #.  in 2.6.28 is not supported for POSIX timers -- mtk, Feb 2009
7954 #. type: Plain text
7955 #: build/C/man2/timer_create.2:77
7956 msgid "A nonsettable monotonically increasing clock that measures time from some unspecified point in the past that does not change after system startup."
7957 msgstr ""
7958
7959 #. type: TP
7960 #: build/C/man2/timer_create.2:77
7961 #, no-wrap
7962 msgid "B<CLOCK_PROCESS_CPUTIME_ID> (since Linux 2.6.12)"
7963 msgstr ""
7964
7965 #. type: Plain text
7966 #: build/C/man2/timer_create.2:81
7967 msgid "A clock that measures (user and system) CPU time consumed by (all of the threads in) the calling process."
7968 msgstr ""
7969
7970 #. type: TP
7971 #: build/C/man2/timer_create.2:81
7972 #, no-wrap
7973 msgid "B<CLOCK_THREAD_CPUTIME_ID> (since Linux 2.6.12)"
7974 msgstr ""
7975
7976 #.  The CLOCK_MONOTONIC_RAW that was added in 2.6.28 can't be used
7977 #.  to create a timer -- mtk, Feb 2009
7978 #. type: Plain text
7979 #: build/C/man2/timer_create.2:87
7980 msgid "A clock that measures (user and system) CPU time consumed by the calling thread."
7981 msgstr ""
7982
7983 #. type: Plain text
7984 #: build/C/man2/timer_create.2:96
7985 msgid "As well as the above values, I<clockid> can be specified as the I<clockid> returned by a call to B<clock_getcpuclockid>(3)  or B<pthread_getcpuclockid>(3)."
7986 msgstr ""
7987
7988 #. type: Plain text
7989 #: build/C/man2/timer_create.2:105
7990 msgid "The I<sevp> argument points to a I<sigevent> structure that specifies how the caller should be notified when the timer expires.  For the definition and general details of this structure, see B<sigevent>(7)."
7991 msgstr ""
7992
7993 #. type: Plain text
7994 #: build/C/man2/timer_create.2:109
7995 msgid "The I<sevp.sigev_notify> field can have the following values:"
7996 msgstr ""
7997
7998 #. type: Plain text
7999 #: build/C/man2/timer_create.2:114
8000 msgid "Don't asynchronously notify when the timer expires.  Progress of the timer can be monitored using B<timer_gettime>(2)."
8001 msgstr ""
8002
8003 #. type: Plain text
8004 #: build/C/man2/timer_create.2:132
8005 msgid "Upon timer expiration, generate the signal I<sigev_signo> for the process.  See B<sigevent>(7)  for general details.  The I<si_code> field of the I<siginfo_t> structure will be set to B<SI_TIMER>.  At any point in time, at most one signal is queued to the process for a given timer; see B<timer_getoverrun>(2)  for more details."
8006 msgstr ""
8007
8008 #. type: Plain text
8009 #: build/C/man2/timer_create.2:140
8010 msgid "Upon timer expiration, invoke I<sigev_notify_function> as if it were the start function of a new thread.  See B<sigevent>(7)  for details."
8011 msgstr ""
8012
8013 #. type: Plain text
8014 #: build/C/man2/timer_create.2:154
8015 msgid "As for B<SIGEV_SIGNAL>, but the signal is targeted at the thread whose ID is given in I<sigev_notify_thread_id>, which must be a thread in the same process as the caller.  The I<sigev_notify_thread_id> field specifies a kernel thread ID, that is, the value returned by B<clone>(2)  or B<gettid>(2).  This flag is intended only for use by threading libraries."
8016 msgstr ""
8017
8018 #. type: Plain text
8019 #: build/C/man2/timer_create.2:169
8020 msgid "Specifying I<sevp> as NULL is equivalent to specifying a pointer to a I<sigevent> structure in which I<sigev_notify> is B<SIGEV_SIGNAL>, I<sigev_signo> is B<SIGALRM>, and I<sigev_value.sival_int> is the timer ID."
8021 msgstr ""
8022
8023 #. type: Plain text
8024 #: build/C/man2/timer_create.2:177
8025 msgid "On success, B<timer_create>()  returns 0, and the ID of the new timer is placed in I<*timerid>.  On failure, -1 is returned, and I<errno> is set to indicate the error."
8026 msgstr ""
8027
8028 #. type: Plain text
8029 #: build/C/man2/timer_create.2:181
8030 msgid "Temporary error during kernel allocation of timer structures."
8031 msgstr ""
8032
8033 #. type: Plain text
8034 #: build/C/man2/timer_create.2:189
8035 msgid "Clock ID, I<sigev_notify>, I<sigev_signo>, or I<sigev_notify_thread_id> is invalid."
8036 msgstr ""
8037
8038 #.  glibc layer: malloc()
8039 #. type: Plain text
8040 #: build/C/man2/timer_create.2:193
8041 msgid "Could not allocate memory."
8042 msgstr ""
8043
8044 #. type: Plain text
8045 #: build/C/man2/timer_create.2:195 build/C/man2/timer_delete.2:67
8046 #: build/C/man2/timer_getoverrun.2:97
8047 msgid "This system call is available since Linux 2.6."
8048 msgstr "このシステムコールは Linux 2.6 以降で利用できる。"
8049
8050 #. type: Plain text
8051 #: build/C/man2/timer_create.2:200
8052 msgid "A program may create multiple interval timers using B<timer_create>()."
8053 msgstr ""
8054
8055 #. type: Plain text
8056 #: build/C/man2/timer_create.2:205
8057 msgid "Timers are not inherited by the child of a B<fork>(2), and are disarmed and deleted during an B<execve>(2)."
8058 msgstr ""
8059
8060 #. type: Plain text
8061 #: build/C/man2/timer_create.2:213
8062 msgid "The kernel preallocates a \"queued real-time signal\" for each timer created using B<timer_create>().  Consequently, the number of timers is limited by the B<RLIMIT_SIGPENDING> resource limit (see B<setrlimit>(2))."
8063 msgstr ""
8064
8065 #. type: Plain text
8066 #: build/C/man2/timer_create.2:218
8067 msgid "The timers created by B<timer_create>()  are commonly known as \"POSIX (interval) timers\".  The POSIX timers API consists of the following interfaces:"
8068 msgstr ""
8069
8070 #. type: Plain text
8071 #: build/C/man2/timer_create.2:221
8072 msgid "B<timer_create>(): Create a timer."
8073 msgstr ""
8074
8075 #. type: Plain text
8076 #: build/C/man2/timer_create.2:224
8077 msgid "B<timer_settime>(2): Arm (start) or disarm (stop) a timer."
8078 msgstr ""
8079
8080 #. type: Plain text
8081 #: build/C/man2/timer_create.2:228
8082 msgid "B<timer_gettime>(2): Fetch the time remaining until the next expiration of a timer, along with the interval setting of the timer."
8083 msgstr ""
8084
8085 #. type: Plain text
8086 #: build/C/man2/timer_create.2:231
8087 msgid "B<timer_getoverrun>(2): Return the overrun count for the last timer expiration."
8088 msgstr ""
8089
8090 #. type: Plain text
8091 #: build/C/man2/timer_create.2:234
8092 msgid "B<timer_delete>(2): Disarm and delete a timer."
8093 msgstr ""
8094
8095 #. type: Plain text
8096 #: build/C/man2/timer_create.2:243
8097 msgid "Since Linux 3.10, the I</proc/[pid]/timers> file can be used to list the POSIX timers for the process with PID I<pid>.  See B<proc>(5)  for further information."
8098 msgstr ""
8099
8100 #. type: Plain text
8101 #: build/C/man2/timer_create.2:246
8102 msgid "Part of the implementation of the POSIX timers API is provided by glibc.  In particular:"
8103 msgstr ""
8104
8105 #. type: Plain text
8106 #: build/C/man2/timer_create.2:250
8107 msgid "The functionality for B<SIGEV_THREAD> is implemented within glibc, rather than the kernel."
8108 msgstr ""
8109
8110 #.  See the glibc source file kernel-posix-timers.h for the structure
8111 #.  that glibc uses to map user-space timer IDs to kernel timer IDs
8112 #.  The kernel-level timer ID is exposed via siginfo.si_tid.
8113 #. type: Plain text
8114 #: build/C/man2/timer_create.2:256
8115 msgid "The timer IDs presented at user level are maintained by glibc, which maps these IDs to the timer IDs employed by the kernel."
8116 msgstr ""
8117
8118 #. type: Plain text
8119 #: build/C/man2/timer_create.2:264
8120 msgid "The POSIX timers system calls first appeared in Linux 2.6.  Prior to this, glibc provided an incomplete user-space implementation (B<CLOCK_REALTIME> timers only) using POSIX threads, and current glibc falls back to this implementation on systems running pre-2.6 Linux kernels."
8121 msgstr ""
8122
8123 #. type: Plain text
8124 #: build/C/man2/timer_create.2:276
8125 msgid "The program below takes two arguments: a sleep period in seconds, and a timer frequency in nanoseconds.  The program establishes a handler for the signal it uses for the timer, blocks that signal, creates and arms a timer that expires with the given frequency, sleeps for the specified number of seconds, and then unblocks the timer signal.  Assuming that the timer expired at least once while the program slept, the signal handler will be invoked, and the handler displays some information about the timer notification.  The program terminates after one invocation of the signal handler."
8126 msgstr ""
8127
8128 #. type: Plain text
8129 #: build/C/man2/timer_create.2:281
8130 msgid "In the following example run, the program sleeps for 1 second, after creating a timer that has a frequency of 100 nanoseconds.  By the time the signal is unblocked and delivered, there have been around ten million overruns."
8131 msgstr ""
8132
8133 #. type: Plain text
8134 #: build/C/man2/timer_create.2:293
8135 #, no-wrap
8136 msgid ""
8137 "$ B<./a.out 1 100>\n"
8138 "Establishing handler for signal 34\n"
8139 "Blocking signal 34\n"
8140 "timer ID is 0x804c008\n"
8141 "Sleeping for 1 seconds\n"
8142 "Unblocking signal 34\n"
8143 "Caught signal 34\n"
8144 "    sival_ptr = 0xbfb174f4;     *sival_ptr = 0x804c008\n"
8145 "    overrun count = 10004886\n"
8146 msgstr ""
8147
8148 #. type: Plain text
8149 #: build/C/man2/timer_create.2:303
8150 #, no-wrap
8151 msgid ""
8152 "#include E<lt>stdlib.hE<gt>\n"
8153 "#include E<lt>unistd.hE<gt>\n"
8154 "#include E<lt>stdio.hE<gt>\n"
8155 "#include E<lt>signal.hE<gt>\n"
8156 "#include E<lt>time.hE<gt>\n"
8157 msgstr ""
8158 "#include E<lt>stdlib.hE<gt>\n"
8159 "#include E<lt>unistd.hE<gt>\n"
8160 "#include E<lt>stdio.hE<gt>\n"
8161 "#include E<lt>signal.hE<gt>\n"
8162 "#include E<lt>time.hE<gt>\n"
8163
8164 #. type: Plain text
8165 #: build/C/man2/timer_create.2:306
8166 #, no-wrap
8167 msgid ""
8168 "#define CLOCKID CLOCK_REALTIME\n"
8169 "#define SIG SIGRTMIN\n"
8170 msgstr ""
8171 "#define CLOCKID CLOCK_REALTIME\n"
8172 "#define SIG SIGRTMIN\n"
8173
8174 #. type: Plain text
8175 #: build/C/man2/timer_create.2:309
8176 #, no-wrap
8177 msgid ""
8178 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
8179 "                        } while (0)\n"
8180 msgstr ""
8181 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
8182 "                        } while (0)\n"
8183
8184 #. type: Plain text
8185 #: build/C/man2/timer_create.2:315
8186 #, no-wrap
8187 msgid ""
8188 "static void\n"
8189 "print_siginfo(siginfo_t *si)\n"
8190 "{\n"
8191 "    timer_t *tidp;\n"
8192 "    int or;\n"
8193 msgstr ""
8194 "static void\n"
8195 "print_siginfo(siginfo_t *si)\n"
8196 "{\n"
8197 "    timer_t *tidp;\n"
8198 "    int or;\n"
8199
8200 #. type: Plain text
8201 #: build/C/man2/timer_create.2:317
8202 #, no-wrap
8203 msgid "    tidp = si-E<gt>si_value.sival_ptr;\n"
8204 msgstr "    tidp = si-E<gt>si_value.sival_ptr;\n"
8205
8206 #. type: Plain text
8207 #: build/C/man2/timer_create.2:320
8208 #, no-wrap
8209 msgid ""
8210 "    printf(\"    sival_ptr = %p; \", si-E<gt>si_value.sival_ptr);\n"
8211 "    printf(\"    *sival_ptr = 0x%lx\\en\", (long) *tidp);\n"
8212 msgstr ""
8213 "    printf(\"    sival_ptr = %p; \", si-E<gt>si_value.sival_ptr);\n"
8214 "    printf(\"    *sival_ptr = 0x%lx\\en\", (long) *tidp);\n"
8215
8216 #. type: Plain text
8217 #: build/C/man2/timer_create.2:327
8218 #, no-wrap
8219 msgid ""
8220 "    or = timer_getoverrun(*tidp);\n"
8221 "    if (or == -1)\n"
8222 "        errExit(\"timer_getoverrun\");\n"
8223 "    else\n"
8224 "        printf(\"    overrun count = %d\\en\", or);\n"
8225 "}\n"
8226 msgstr ""
8227 "    or = timer_getoverrun(*tidp);\n"
8228 "    if (or == -1)\n"
8229 "        errExit(\"timer_getoverrun\");\n"
8230 "    else\n"
8231 "        printf(\"    overrun count = %d\\en\", or);\n"
8232 "}\n"
8233
8234 #. type: Plain text
8235 #: build/C/man2/timer_create.2:334
8236 #, no-wrap
8237 msgid ""
8238 "static void\n"
8239 "handler(int sig, siginfo_t *si, void *uc)\n"
8240 "{\n"
8241 "    /* Note: calling printf() from a signal handler is not\n"
8242 "       strictly correct, since printf() is not async-signal-safe;\n"
8243 "       see signal(7) */\n"
8244 msgstr ""
8245 "static void\n"
8246 "handler(int sig, siginfo_t *si, void *uc)\n"
8247 "{\n"
8248 "    /* Note: calling printf() from a signal handler is not\n"
8249 "       strictly correct, since printf() is not async-signal-safe;\n"
8250 "       see signal(7) */\n"
8251
8252 #. type: Plain text
8253 #: build/C/man2/timer_create.2:339
8254 #, no-wrap
8255 msgid ""
8256 "    printf(\"Caught signal %d\\en\", sig);\n"
8257 "    print_siginfo(si);\n"
8258 "    signal(sig, SIG_IGN);\n"
8259 "}\n"
8260 msgstr ""
8261 "    printf(\"Caught signal %d\\en\", sig);\n"
8262 "    print_siginfo(si);\n"
8263 "    signal(sig, SIG_IGN);\n"
8264 "}\n"
8265
8266 #. type: Plain text
8267 #: build/C/man2/timer_create.2:349
8268 #, no-wrap
8269 msgid ""
8270 "int\n"
8271 "main(int argc, char *argv[])\n"
8272 "{\n"
8273 "    timer_t timerid;\n"
8274 "    struct sigevent sev;\n"
8275 "    struct itimerspec its;\n"
8276 "    long long freq_nanosecs;\n"
8277 "    sigset_t mask;\n"
8278 "    struct sigaction sa;\n"
8279 msgstr ""
8280 "int\n"
8281 "main(int argc, char *argv[])\n"
8282 "{\n"
8283 "    timer_t timerid;\n"
8284 "    struct sigevent sev;\n"
8285 "    struct itimerspec its;\n"
8286 "    long long freq_nanosecs;\n"
8287 "    sigset_t mask;\n"
8288 "    struct sigaction sa;\n"
8289
8290 #. type: Plain text
8291 #: build/C/man2/timer_create.2:355
8292 #, no-wrap
8293 msgid ""
8294 "    if (argc != 3) {\n"
8295 "        fprintf(stderr, \"Usage: %s E<lt>sleep-secsE<gt> E<lt>freq-nanosecsE<gt>\\en\",\n"
8296 "                argv[0]);\n"
8297 "        exit(EXIT_FAILURE);\n"
8298 "    }\n"
8299 msgstr ""
8300 "    if (argc != 3) {\n"
8301 "        fprintf(stderr, \"Usage: %s E<lt>sleep-secsE<gt> E<lt>freq-nanosecsE<gt>\\en\",\n"
8302 "                argv[0]);\n"
8303 "        exit(EXIT_FAILURE);\n"
8304 "    }\n"
8305
8306 #. type: Plain text
8307 #: build/C/man2/timer_create.2:357
8308 #, no-wrap
8309 msgid "    /* Establish handler for timer signal */\n"
8310 msgstr "    /* Establish handler for timer signal */\n"
8311
8312 #. type: Plain text
8313 #: build/C/man2/timer_create.2:364
8314 #, no-wrap
8315 msgid ""
8316 "    printf(\"Establishing handler for signal %d\\en\", SIG);\n"
8317 "    sa.sa_flags = SA_SIGINFO;\n"
8318 "    sa.sa_sigaction = handler;\n"
8319 "    sigemptyset(&sa.sa_mask);\n"
8320 "    if (sigaction(SIG, &sa, NULL) == -1)\n"
8321 "        errExit(\"sigaction\");\n"
8322 msgstr ""
8323 "    printf(\"Establishing handler for signal %d\\en\", SIG);\n"
8324 "    sa.sa_flags = SA_SIGINFO;\n"
8325 "    sa.sa_sigaction = handler;\n"
8326 "    sigemptyset(&sa.sa_mask);\n"
8327 "    if (sigaction(SIG, &sa, NULL) == -1)\n"
8328 "        errExit(\"sigaction\");\n"
8329
8330 #. type: Plain text
8331 #: build/C/man2/timer_create.2:366
8332 #, no-wrap
8333 msgid "    /* Block timer signal temporarily */\n"
8334 msgstr "    /* Block timer signal temporarily */\n"
8335
8336 #. type: Plain text
8337 #: build/C/man2/timer_create.2:372
8338 #, no-wrap
8339 msgid ""
8340 "    printf(\"Blocking signal %d\\en\", SIG);\n"
8341 "    sigemptyset(&mask);\n"
8342 "    sigaddset(&mask, SIG);\n"
8343 "    if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1)\n"
8344 "        errExit(\"sigprocmask\");\n"
8345 msgstr ""
8346 "    printf(\"Blocking signal %d\\en\", SIG);\n"
8347 "    sigemptyset(&mask);\n"
8348 "    sigaddset(&mask, SIG);\n"
8349 "    if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1)\n"
8350 "        errExit(\"sigprocmask\");\n"
8351
8352 #. type: Plain text
8353 #: build/C/man2/timer_create.2:374
8354 #, no-wrap
8355 msgid "    /* Create the timer */\n"
8356 msgstr "    /* Create the timer */\n"
8357
8358 #. type: Plain text
8359 #: build/C/man2/timer_create.2:380
8360 #, no-wrap
8361 msgid ""
8362 "    sev.sigev_notify = SIGEV_SIGNAL;\n"
8363 "    sev.sigev_signo = SIG;\n"
8364 "    sev.sigev_value.sival_ptr = &timerid;\n"
8365 "    if (timer_create(CLOCKID, &sev, &timerid) == -1)\n"
8366 "        errExit(\"timer_create\");\n"
8367 msgstr ""
8368 "    sev.sigev_notify = SIGEV_SIGNAL;\n"
8369 "    sev.sigev_signo = SIG;\n"
8370 "    sev.sigev_value.sival_ptr = &timerid;\n"
8371 "    if (timer_create(CLOCKID, &sev, &timerid) == -1)\n"
8372 "        errExit(\"timer_create\");\n"
8373
8374 #. type: Plain text
8375 #: build/C/man2/timer_create.2:382
8376 #, no-wrap
8377 msgid "    printf(\"timer ID is 0x%lx\\en\", (long) timerid);\n"
8378 msgstr "    printf(\"timer ID is 0x%lx\\en\", (long) timerid);\n"
8379
8380 #. type: Plain text
8381 #: build/C/man2/timer_create.2:384
8382 #, no-wrap
8383 msgid "    /* Start the timer */\n"
8384 msgstr "    /* Start the timer */\n"
8385
8386 #. type: Plain text
8387 #: build/C/man2/timer_create.2:390
8388 #, no-wrap
8389 msgid ""
8390 "    freq_nanosecs = atoll(argv[2]);\n"
8391 "    its.it_value.tv_sec = freq_nanosecs / 1000000000;\n"
8392 "    its.it_value.tv_nsec = freq_nanosecs % 1000000000;\n"
8393 "    its.it_interval.tv_sec = its.it_value.tv_sec;\n"
8394 "    its.it_interval.tv_nsec = its.it_value.tv_nsec;\n"
8395 msgstr ""
8396 "    freq_nanosecs = atoll(argv[2]);\n"
8397 "    its.it_value.tv_sec = freq_nanosecs / 1000000000;\n"
8398 "    its.it_value.tv_nsec = freq_nanosecs % 1000000000;\n"
8399 "    its.it_interval.tv_sec = its.it_value.tv_sec;\n"
8400 "    its.it_interval.tv_nsec = its.it_value.tv_nsec;\n"
8401
8402 #. type: Plain text
8403 #: build/C/man2/timer_create.2:393
8404 #, no-wrap
8405 msgid ""
8406 "    if (timer_settime(timerid, 0, &its, NULL) == -1)\n"
8407 "         errExit(\"timer_settime\");\n"
8408 msgstr ""
8409 "    if (timer_settime(timerid, 0, &its, NULL) == -1)\n"
8410 "         errExit(\"timer_settime\");\n"
8411
8412 #. type: Plain text
8413 #: build/C/man2/timer_create.2:396
8414 #, no-wrap
8415 msgid ""
8416 "    /* Sleep for a while; meanwhile, the timer may expire\n"
8417 "       multiple times */\n"
8418 msgstr ""
8419 "    /* Sleep for a while; meanwhile, the timer may expire\n"
8420 "       multiple times */\n"
8421
8422 #. type: Plain text
8423 #: build/C/man2/timer_create.2:399
8424 #, no-wrap
8425 msgid ""
8426 "    printf(\"Sleeping for %d seconds\\en\", atoi(argv[1]));\n"
8427 "    sleep(atoi(argv[1]));\n"
8428 msgstr ""
8429 "    printf(\"Sleeping for %d seconds\\en\", atoi(argv[1]));\n"
8430 "    sleep(atoi(argv[1]));\n"
8431
8432 #. type: Plain text
8433 #: build/C/man2/timer_create.2:402
8434 #, no-wrap
8435 msgid ""
8436 "    /* Unlock the timer signal, so that timer notification\n"
8437 "       can be delivered */\n"
8438 msgstr ""
8439 "    /* Unlock the timer signal, so that timer notification\n"
8440 "       can be delivered */\n"
8441
8442 #. type: Plain text
8443 #: build/C/man2/timer_create.2:406
8444 #, no-wrap
8445 msgid ""
8446 "    printf(\"Unblocking signal %d\\en\", SIG);\n"
8447 "    if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1)\n"
8448 "        errExit(\"sigprocmask\");\n"
8449 msgstr ""
8450 "    printf(\"Unblocking signal %d\\en\", SIG);\n"
8451 "    if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1)\n"
8452 "        errExit(\"sigprocmask\");\n"
8453
8454 #. type: Plain text
8455 #: build/C/man2/timer_create.2:409 build/C/man2/timerfd_create.2:547
8456 #, no-wrap
8457 msgid ""
8458 "    exit(EXIT_SUCCESS);\n"
8459 "}\n"
8460 msgstr ""
8461 "    exit(EXIT_SUCCESS);\n"
8462 "}\n"
8463
8464 #. type: Plain text
8465 #: build/C/man2/timer_create.2:425
8466 msgid "B<clock_gettime>(2), B<setitimer>(2), B<timer_delete>(2), B<timer_getoverrun>(2), B<timer_settime>(2), B<timerfd_create>(2), B<clock_getcpuclockid>(3), B<pthread_getcpuclockid>(3), B<pthreads>(7), B<sigevent>(7), B<signal>(7), B<time>(7)"
8467 msgstr "B<clock_gettime>(2), B<setitimer>(2), B<timer_delete>(2), B<timer_getoverrun>(2), B<timer_settime>(2), B<timerfd_create>(2), B<clock_getcpuclockid>(3), B<pthread_getcpuclockid>(3), B<pthreads>(7), B<sigevent>(7), B<signal>(7), B<time>(7)"
8468
8469 #. type: TH
8470 #: build/C/man2/timer_delete.2:26
8471 #, no-wrap
8472 msgid "TIMER_DELETE"
8473 msgstr "TIMER_DELETE"
8474
8475 #. type: TH
8476 #: build/C/man2/timer_delete.2:26 build/C/man2/timer_getoverrun.2:26
8477 #, no-wrap
8478 msgid "2009-02-20"
8479 msgstr "2009-02-20"
8480
8481 #. type: Plain text
8482 #: build/C/man2/timer_delete.2:29
8483 msgid "timer_delete - delete a POSIX per-process timer"
8484 msgstr "timer_delete - プロセス単位の POSIX タイマーを削除する"
8485
8486 #. type: Plain text
8487 #: build/C/man2/timer_delete.2:32 build/C/man2/timer_getoverrun.2:32
8488 #: build/C/man2/timer_settime.2:33
8489 #, no-wrap
8490 msgid "B<#include E<lt>time.hE<gt>>\n"
8491 msgstr "B<#include E<lt>time.hE<gt>>\n"
8492
8493 #. type: Plain text
8494 #: build/C/man2/timer_delete.2:34
8495 #, no-wrap
8496 msgid "B<int timer_delete(timer_t >I<timerid>B<);>\n"
8497 msgstr "B<int timer_delete(timer_t >I<timerid>B<);>\n"
8498
8499 #. type: Plain text
8500 #: build/C/man2/timer_delete.2:45
8501 msgid "B<timer_delete>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8502 msgstr "B<timer_delete>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8503
8504 #. type: Plain text
8505 #: build/C/man2/timer_delete.2:53
8506 msgid "B<timer_delete>()  deletes the timer whose ID is given in I<timerid>.  If the timer was armed at the time of this call, it is disarmed before being deleted.  The treatment of any pending signal generated by the deleted timer is unspecified."
8507 msgstr "B<timer_delete>() は I<timerid> で指定された ID のタイマーを削除する。 B<timer_delete>() が呼び出された時点でタイマーが開始されている場合は、 削除する前にタイマーの解除が行われる。 削除されるタイマーにより生成された処理待ちシグナルの扱いは不定 (unspecified) である。"
8508
8509 #. type: Plain text
8510 #: build/C/man2/timer_delete.2:60
8511 msgid "On success, B<timer_delete>()  returns 0.  On failure, -1 is returned, and I<errno> is set to indicate the error."
8512 msgstr "成功すると、 B<timer_delete>() は 0 を返す。 失敗すると、 -1 が返り、 I<errno> にエラーを示す値が設定される。"
8513
8514 #. type: Plain text
8515 #: build/C/man2/timer_delete.2:65 build/C/man2/timer_getoverrun.2:95
8516 msgid "I<timerid> is not a valid timer ID."
8517 msgstr "I<timerid> が有効なタイマー ID ではない。"
8518
8519 #. type: Plain text
8520 #: build/C/man2/timer_delete.2:75
8521 msgid "B<clock_gettime>(2), B<timer_create>(2), B<timer_getoverrun>(2), B<timer_settime>(2), B<time>(7)"
8522 msgstr "B<clock_gettime>(2), B<timer_create>(2), B<timer_getoverrun>(2), B<timer_settime>(2), B<time>(7)"
8523
8524 #. type: TH
8525 #: build/C/man2/timer_getoverrun.2:26
8526 #, no-wrap
8527 msgid "TIMER_GETOVERRUN"
8528 msgstr "TIMER_GETOVERRUN"
8529
8530 #. type: Plain text
8531 #: build/C/man2/timer_getoverrun.2:29
8532 msgid "timer_getoverrun - get overrun count for a POSIX per-process timer"
8533 msgstr ""
8534
8535 #. type: Plain text
8536 #: build/C/man2/timer_getoverrun.2:34
8537 #, no-wrap
8538 msgid "B<int timer_getoverrun(timer_t >I<timerid>B<);>\n"
8539 msgstr "B<int timer_getoverrun(timer_t >I<timerid>B<);>\n"
8540
8541 #. type: Plain text
8542 #: build/C/man2/timer_getoverrun.2:45
8543 msgid "B<timer_getoverrun>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8544 msgstr "B<timer_getoverrun>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8545
8546 #. type: Plain text
8547 #: build/C/man2/timer_getoverrun.2:56
8548 msgid "B<timer_getoverrun>()  returns the \"overrun count\" for the timer referred to by I<timerid>.  An application can use the overrun count to accurately calculate the number of timer expirations that would have occurred over a given time interval.  Timer overruns can occur both when receiving expiration notifications via signals (B<SIGEV_SIGNAL>), and via threads (B<SIGEV_THREAD>)."
8549 msgstr ""
8550
8551 #. type: Plain text
8552 #: build/C/man2/timer_getoverrun.2:76
8553 msgid "When expiration notifications are delivered via a signal, overruns can occur as follows.  Regardless of whether or not a real-time signal is used for timer notifications, the system queues at most one signal per timer.  (This is the behavior specified by POSIX.1-2001.  The alternative, queuing one signal for each timer expiration, could easily result in overflowing the allowed limits for queued signals on the system.)  Because of system scheduling delays, or because the signal may be temporarily blocked, there can be a delay between the time when the notification signal is generated and the time when it is delivered (e.g., caught by a signal handler) or accepted (e.g., using B<sigwaitinfo>(2)).  In this interval, further timer expirations may occur.  The timer overrun count is the number of additional timer expirations that occurred between the time when the signal was generated and when it was delivered or accepted."
8554 msgstr ""
8555
8556 #. type: Plain text
8557 #: build/C/man2/timer_getoverrun.2:82
8558 msgid "Timer overruns can also occur when expiration notifications are delivered via invocation of a thread, since there may be an arbitrary delay between an expiration of the timer and the invocation of the notification thread, and in that delay interval, additional timer expirations may occur."
8559 msgstr ""
8560
8561 #. type: Plain text
8562 #: build/C/man2/timer_getoverrun.2:90
8563 msgid "On success, B<timer_getoverrun>()  returns the overrun count of the specified timer; this count may be 0 if no overruns have occurred.  On failure, -1 is returned, and I<errno> is set to indicate the error."
8564 msgstr ""
8565
8566 #. type: Plain text
8567 #: build/C/man2/timer_getoverrun.2:111
8568 msgid "When timer notifications are delivered via signals (B<SIGEV_SIGNAL>), on Linux it is also possible to obtain the overrun count via the I<si_overrun> field of the I<siginfo_t> structure (see B<sigaction>(2)).  This allows an application to avoid the overhead of making a system call to obtain the overrun count, but is a nonportable extension to POSIX.1-2001."
8569 msgstr ""
8570
8571 #.  FIXME . Austin bug filed, 11 Feb 09
8572 #. type: Plain text
8573 #: build/C/man2/timer_getoverrun.2:115
8574 msgid "POSIX.1-2001 discusses timer overruns only in the context of timer notifications using signals."
8575 msgstr ""
8576
8577 #.  Bug filed: http://bugzilla.kernel.org/show_bug.cgi?id=12665
8578 #.  http://thread.gmane.org/gmane.linux.kernel/113276/
8579 #. type: Plain text
8580 #: build/C/man2/timer_getoverrun.2:128
8581 msgid "POSIX.1-2001 specifies that if the timer overrun count is equal to or greater than an implementation-defined maximum, B<DELAYTIMER_MAX>, then B<timer_getoverrun>()  should return B<DELAYTIMER_MAX>.  However, Linux does not implement this feature: instead, if the timer overrun value exceeds the maximum representable integer, the counter cycles, starting once more from low values."
8582 msgstr ""
8583
8584 #. type: Plain text
8585 #: build/C/man2/timer_getoverrun.2:131 build/C/man2/timer_settime.2:212
8586 msgid "See B<timer_create>(2)."
8587 msgstr ""
8588
8589 #. type: Plain text
8590 #: build/C/man2/timer_getoverrun.2:141
8591 msgid "B<clock_gettime>(2), B<sigaction>(2), B<signalfd>(2), B<sigwaitinfo>(2), B<timer_create>(2), B<timer_delete>(2), B<timer_settime>(2), B<signal>(7), B<time>(7)"
8592 msgstr "B<clock_gettime>(2), B<sigaction>(2), B<signalfd>(2), B<sigwaitinfo>(2), B<timer_create>(2), B<timer_delete>(2), B<timer_settime>(2), B<signal>(7), B<time>(7)"
8593
8594 #. type: TH
8595 #: build/C/man2/timer_settime.2:26
8596 #, no-wrap
8597 msgid "TIMER_SETTIME"
8598 msgstr "TIMER_SETTIME"
8599
8600 #. type: TH
8601 #: build/C/man2/timer_settime.2:26
8602 #, no-wrap
8603 msgid "2012-10-15"
8604 msgstr "2012-10-15"
8605
8606 #. type: Plain text
8607 #: build/C/man2/timer_settime.2:30
8608 msgid "timer_settime, timer_gettime - arm/disarm and fetch state of POSIX per-process timer"
8609 msgstr ""
8610
8611 #. type: Plain text
8612 #: build/C/man2/timer_settime.2:38
8613 #, no-wrap
8614 msgid ""
8615 "B<int timer_settime(timer_t >I<timerid>B<, int >I<flags>B<,>\n"
8616 "B<                  const struct itimerspec *>I<new_value>B<,>\n"
8617 "B<                  struct itimerspec *>I<old_value>B<);>\n"
8618 "B<int timer_gettime(timer_t >I<timerid>B<, struct itimerspec *>I<curr_value>B<);>\n"
8619 msgstr ""
8620 "B<int timer_settime(timer_t >I<timerid>B<, int >I<flags>B<,>\n"
8621 "B<                  const struct itimerspec *>I<new_value>B<,>\n"
8622 "B<                  struct itimerspec *>I<old_value>B<);>\n"
8623 "B<int timer_gettime(timer_t >I<timerid>B<, struct itimerspec *>I<curr_value>B<);>\n"
8624
8625 #. type: Plain text
8626 #: build/C/man2/timer_settime.2:50
8627 msgid "B<timer_settime>(), B<timer_gettime>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8628 msgstr "B<timer_settime>(), B<timer_gettime>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8629
8630 #. type: Plain text
8631 #: build/C/man2/timer_settime.2:63
8632 msgid "B<timer_settime>()  arms or disarms the timer identified by I<timerid>.  The I<new_value> argument is pointer to an I<itimerspec> structure that specifies the new initial value and the new interval for the timer.  The I<itimerspec> structure is defined as follows:"
8633 msgstr ""
8634
8635 #. type: Plain text
8636 #: build/C/man2/timer_settime.2:70 build/C/man2/timerfd_create.2:135
8637 #, no-wrap
8638 msgid ""
8639 "struct timespec {\n"
8640 "    time_t tv_sec;                /* Seconds */\n"
8641 "    long   tv_nsec;               /* Nanoseconds */\n"
8642 "};\n"
8643 msgstr ""
8644 "struct timespec {\n"
8645 "    time_t tv_sec;                /* Seconds */\n"
8646 "    long   tv_nsec;               /* Nanoseconds */\n"
8647 "};\n"
8648
8649 #. type: Plain text
8650 #: build/C/man2/timer_settime.2:75
8651 #, no-wrap
8652 msgid ""
8653 "struct itimerspec {\n"
8654 "    struct timespec it_interval;  /* Timer interval */\n"
8655 "    struct timespec it_value;     /* Initial expiration */\n"
8656 "};\n"
8657 msgstr ""
8658 "struct itimerspec {\n"
8659 "    struct timespec it_interval;  /* Timer interval */\n"
8660 "    struct timespec it_value;     /* Initial expiration */\n"
8661 "};\n"
8662
8663 #. type: Plain text
8664 #: build/C/man2/timer_settime.2:87
8665 msgid "Each of the substructures of the I<itimerspec> structure is a I<timespec> structure that allows a time value to be specified in seconds and nanoseconds.  These time values are measured according to the clock that was specified when the timer was created by B<timer_create>(2)."
8666 msgstr ""
8667
8668 #. type: Plain text
8669 #: build/C/man2/timer_settime.2:101
8670 msgid "If I<new_value-E<gt>it_value> specifies a nonzero value (i.e., either subfield is nonzero), then B<timer_settime>()  arms (starts) the timer, setting it to initially expire at the given time.  (If the timer was already armed, then the previous settings are overwritten.)  If I<new_value-E<gt>it_value> specifies a zero value (i.e., both subfields are zero), then the timer is disarmed."
8671 msgstr ""
8672
8673 #. type: Plain text
8674 #: build/C/man2/timer_settime.2:113
8675 msgid "The I<new_value-E<gt>it_interval> field specifies the period of the timer, in seconds and nanoseconds.  If this field is nonzero, then each time that an armed timer expires, the timer is reloaded from the value specified in I<new_value-E<gt>it_interval>.  If I<new_value-E<gt>it_interval> specifies a zero value, then the timer expires just once, at the time specified by I<it_value>."
8676 msgstr ""
8677
8678 #.  By experiment: the overrun count is set correctly, for CLOCK_REALTIME.
8679 #. type: Plain text
8680 #: build/C/man2/timer_settime.2:134
8681 msgid "By default, the initial expiration time specified in I<new_value-E<gt>it_value> is interpreted relative to the current time on the timer's clock at the time of the call.  This can be modified by specifying B<TIMER_ABSTIME> in I<flags>, in which case I<new_value-E<gt>it_value> is interpreted as an absolute value as measured on the timer's clock; that is, the timer will expire when the clock value reaches the value specified by I<new_value-E<gt>it_value>.  If the specified absolute time has already passed, then the timer expires immediately, and the overrun count (see B<timer_getoverrun>(2))  will be set correctly."
8682 msgstr ""
8683
8684 #.  Similar remarks might apply with respect to process and thread CPU time
8685 #.  clocks, but these clocks are not currently (2.6.28) settable on Linux.
8686 #. type: Plain text
8687 #: build/C/man2/timer_settime.2:144
8688 msgid "If the value of the B<CLOCK_REALTIME> clock is adjusted while an absolute timer based on that clock is armed, then the expiration of the timer will be appropriately adjusted.  Adjustments to the B<CLOCK_REALTIME> clock have no effect on relative timers based on that clock."
8689 msgstr ""
8690
8691 #. type: Plain text
8692 #: build/C/man2/timer_settime.2:153
8693 msgid "If I<old_value> is not NULL, then it points to a buffer that is used to return the previous interval of the timer (in I<old_value-E<gt>it_interval>)  and the amount of time until the timer would previously have next expired (in I<old_value-E<gt>it_value>)."
8694 msgstr ""
8695
8696 #. type: Plain text
8697 #: build/C/man2/timer_settime.2:173
8698 msgid "B<timer_gettime>()  returns the time until next expiration, and the interval, for the timer specified by I<timerid>, in the buffer pointed to by I<curr_value>.  The time remaining until the next timer expiration is returned in I<curr_value-E<gt>it_value>; this is always a relative value, regardless of whether the B<TIMER_ABSTIME> flag was used when arming the timer.  If the value returned in I<curr_value-E<gt>it_value> is zero, then the timer is currently disarmed.  The timer interval is returned in I<curr_value-E<gt>it_interval>.  If the value returned in I<curr_value-E<gt>it_interval> is zero, then this is a \"one-shot\" timer."
8699 msgstr ""
8700
8701 #. type: Plain text
8702 #: build/C/man2/timer_settime.2:182
8703 msgid "On success, B<timer_settime>()  and B<timer_gettime>()  return 0.  On error, -1 is returned, and I<errno> is set to indicate the error."
8704 msgstr ""
8705
8706 #. type: Plain text
8707 #: build/C/man2/timer_settime.2:184
8708 msgid "These functions may fail with the following errors:"
8709 msgstr ""
8710
8711 #. type: Plain text
8712 #: build/C/man2/timer_settime.2:191
8713 msgid "I<new_value>, I<old_value>, or I<curr_value> is not a valid pointer."
8714 msgstr ""
8715
8716 #.  FIXME . eventually: invalid value in flags
8717 #. type: Plain text
8718 #: build/C/man2/timer_settime.2:196
8719 msgid "I<timerid> is invalid."
8720 msgstr ""
8721
8722 #. type: Plain text
8723 #: build/C/man2/timer_settime.2:199
8724 msgid "B<timer_settime>()  may fail with the following errors:"
8725 msgstr ""
8726
8727 #. type: Plain text
8728 #: build/C/man2/timer_settime.2:205
8729 msgid "I<new_value.it_value> is negative; or I<new_value.it_value.tv_nsec> is negative or greater than 999,999,999."
8730 msgstr ""
8731
8732 #. type: Plain text
8733 #: build/C/man2/timer_settime.2:207
8734 msgid "These system calls are available since Linux 2.6."
8735 msgstr "これらのシステムコールは Linux 2.6 以降で利用可能である。"
8736
8737 #. type: Plain text
8738 #: build/C/man2/timer_settime.2:216
8739 msgid "B<timer_create>(2), B<timer_getoverrun>(2), B<time>(7)"
8740 msgstr "B<timer_create>(2), B<timer_getoverrun>(2), B<time>(7)"
8741
8742 #. type: TH
8743 #: build/C/man2/timerfd_create.2:22
8744 #, no-wrap
8745 msgid "TIMERFD_CREATE"
8746 msgstr "TIMERFD_CREATE"
8747
8748 #. type: TH
8749 #: build/C/man2/timerfd_create.2:22
8750 #, no-wrap
8751 msgid "2011-09-14"
8752 msgstr "2011-09-14"
8753
8754 #. type: Plain text
8755 #: build/C/man2/timerfd_create.2:26
8756 msgid "timerfd_create, timerfd_settime, timerfd_gettime - timers that notify via file descriptors"
8757 msgstr "timerfd_create, timerfd_settime, timerfd_gettime - ファイルディスクリプター経由で通知するタイマー"
8758
8759 #. type: Plain text
8760 #: build/C/man2/timerfd_create.2:29
8761 #, no-wrap
8762 msgid "B<#include E<lt>sys/timerfd.hE<gt>>\n"
8763 msgstr "B<#include E<lt>sys/timerfd.hE<gt>>\n"
8764
8765 #. type: Plain text
8766 #: build/C/man2/timerfd_create.2:31
8767 #, no-wrap
8768 msgid "B<int timerfd_create(int >I<clockid>B<, int >I<flags>B<);>\n"
8769 msgstr "B<int timerfd_create(int >I<clockid>B<, int >I<flags>B<);>\n"
8770
8771 #. type: Plain text
8772 #: build/C/man2/timerfd_create.2:35
8773 #, no-wrap
8774 msgid ""
8775 "B<int timerfd_settime(int >I<fd>B<, int >I<flags>B<,>\n"
8776 "B<                    const struct itimerspec *>I<new_value>B<,>\n"
8777 "B<                    struct itimerspec *>I<old_value>B<);>\n"
8778 msgstr ""
8779 "B<int timerfd_settime(int >I<fd>B<, int >I<flags>B<,>\n"
8780 "B<                    const struct itimerspec *>I<new_value>B<,>\n"
8781 "B<                    struct itimerspec *>I<old_value>B<);>\n"
8782
8783 #. type: Plain text
8784 #: build/C/man2/timerfd_create.2:37
8785 #, no-wrap
8786 msgid "B<int timerfd_gettime(int >I<fd>B<, struct itimerspec *>I<curr_value>B<);>\n"
8787 msgstr "B<int timerfd_gettime(int >I<fd>B<, struct itimerspec *>I<curr_value>B<);>\n"
8788
8789 #. type: Plain text
8790 #: build/C/man2/timerfd_create.2:50
8791 msgid "These system calls create and operate on a timer that delivers timer expiration notifications via a file descriptor.  They provide an alternative to the use of B<setitimer>(2)  or B<timer_create>(2), with the advantage that the file descriptor may be monitored by B<select>(2), B<poll>(2), and B<epoll>(7)."
8792 msgstr "これらのシステムコールは、満了通知をファイルディスクリプター経由で配送する タイマーの生成と操作を行う。 これらは、 B<setitimer>(2)  や B<timer_create>(2)  を用いる方法の代わりとなるものであり、このファイルディスクリプターを B<select>(2), B<poll>(2), B<epoll>(7)  で監視できるという利点がある。"
8793
8794 #. type: Plain text
8795 #: build/C/man2/timerfd_create.2:62
8796 msgid "The use of these three system calls is analogous to the use of B<timer_create>(2), B<timer_settime>(2), and B<timer_gettime>(2).  (There is no analog of B<timer_getoverrun>(2), since that functionality is provided by B<read>(2), as described below.)"
8797 msgstr "これらのシステムコールを使うのは、それぞれ B<timer_create>(2), B<timer_settime>(2), B<timer_gettime>(2)  を使うのと同様である (B<timer_getoverrun>(2)  に対応するものはなく、以下で説明するように この機能は B<read>(2)  により提供される)。"
8798
8799 #. type: SS
8800 #: build/C/man2/timerfd_create.2:62
8801 #, no-wrap
8802 msgid "timerfd_create()"
8803 msgstr "timerfd_create()"
8804
8805 #.  FIXME
8806 #.  Additional clocks are now supported:
8807 #.  CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM
8808 #.     Since Linux 3.11, commit 11ffa9d6065f344a9bd769a2452f26f2f671e5f8
8809 #.  CLOCK_BOOTTIME
8810 #.     Since Linux 3.15, commit 4a2378a943f09907fb1ae35c15de917f60289c14
8811 #. type: Plain text
8812 #: build/C/man2/timerfd_create.2:87
8813 msgid "B<timerfd_create>()  creates a new timer object, and returns a file descriptor that refers to that timer.  The I<clockid> argument specifies the clock that is used to mark the progress of the timer, and must be either B<CLOCK_REALTIME> or B<CLOCK_MONOTONIC>.  B<CLOCK_REALTIME> is a settable system-wide clock.  B<CLOCK_MONOTONIC> is a nonsettable clock that is not affected by discontinuous changes in the system clock (e.g., manual changes to system time).  The current value of each of these clocks can be retrieved using B<clock_gettime>(2)."
8814 msgstr "B<timerfd_create>()  は新規のタイマーオブジェクトを生成し、そのタイマーを参照するファイル ディスクリプターを返す。 I<clockid> 引き数は、タイマーの進捗を管理するためのクロックを指定するもので、 B<CLOCK_REALTIME> か B<CLOCK_MONOTONIC> のいずれかでなければならない。 B<CLOCK_REALTIME> はシステム全体で使用されるクロックで、このクロックは変更可能である。 B<CLOCK_MONOTONIC> は変更されることのないクロックで、(システム時刻の手動での変更などの)  システムクロックの不連続な変化の影響を受けない。 これらのクロックの現在の値は B<clock_gettime>(2)  を使って取得できる。"
8815
8816 #. type: Plain text
8817 #: build/C/man2/timerfd_create.2:92
8818 msgid "Starting with Linux 2.6.27, the following values may be bitwise ORed in I<flags> to change the behavior of B<timerfd_create>():"
8819 msgstr "Linux 2.6.27 以降では、 以下の値のいくつかをビット単位の論理和 (OR) で指定することで、 B<timerfd_create>()  の振舞いを変更することができる。"
8820
8821 #. type: TP
8822 #: build/C/man2/timerfd_create.2:92
8823 #, no-wrap
8824 msgid "B<TFD_NONBLOCK>"
8825 msgstr "B<TFD_NONBLOCK>"
8826
8827 #. type: TP
8828 #: build/C/man2/timerfd_create.2:100
8829 #, no-wrap
8830 msgid "B<TFD_CLOEXEC>"
8831 msgstr "B<TFD_CLOEXEC>"
8832
8833 #. type: Plain text
8834 #: build/C/man2/timerfd_create.2:114
8835 msgid "In Linux versions up to and including 2.6.26, I<flags> must be specified as zero."
8836 msgstr "バージョン 2.6.26 以前の Linux では、 I<flags> 引き数は未使用であり、0 を指定しなければならない。"
8837
8838 #. type: SS
8839 #: build/C/man2/timerfd_create.2:114
8840 #, no-wrap
8841 msgid "timerfd_settime()"
8842 msgstr "timerfd_settime()"
8843
8844 #. type: Plain text
8845 #: build/C/man2/timerfd_create.2:119
8846 msgid "B<timerfd_settime>()  arms (starts) or disarms (stops)  the timer referred to by the file descriptor I<fd>."
8847 msgstr "B<timerfd_settime>()  は、ファイルディスクリプター I<fd> により参照されるタイマーを開始したり停止したりする。"
8848
8849 #. type: Plain text
8850 #: build/C/man2/timerfd_create.2:128
8851 msgid "The I<new_value> argument specifies the initial expiration and interval for the timer.  The I<itimer> structure used for this argument contains two fields, each of which is in turn a structure of type I<timespec>:"
8852 msgstr "I<new_value> 引き数は、タイマーの満了時間 (expiration) の初期値と間隔 (interval) を 指定する。この引き数で使用されている I<itimerspec> 構造体には 2 つのフィールドがあり、各フィールドは I<timespec> 型の構造体である。"
8853
8854 #. type: Plain text
8855 #: build/C/man2/timerfd_create.2:140
8856 #, no-wrap
8857 msgid ""
8858 "struct itimerspec {\n"
8859 "    struct timespec it_interval;  /* Interval for periodic timer */\n"
8860 "    struct timespec it_value;     /* Initial expiration */\n"
8861 "};\n"
8862 msgstr ""
8863 "struct itimerspec {\n"
8864 "    struct timespec it_interval;  /* Interval for periodic timer */\n"
8865 "    struct timespec it_value;     /* Initial expiration */\n"
8866 "};\n"
8867
8868 #. type: Plain text
8869 #: build/C/man2/timerfd_create.2:152
8870 msgid "I<new_value.it_value> specifies the initial expiration of the timer, in seconds and nanoseconds.  Setting either field of I<new_value.it_value> to a nonzero value arms the timer.  Setting both fields of I<new_value.it_value> to zero disarms the timer."
8871 msgstr "I<new_value.it_value> はタイマーの満了時間の初期値を、秒とナノ秒で指定する。 I<new_value.it_value> のフィールドのうち少なくとも一方に 0 以外の値を設定すると、 タイマーが開始される。 両方のフィールドに 0 を設定すると、タイマーが停止する。"
8872
8873 #. type: Plain text
8874 #: build/C/man2/timerfd_create.2:161
8875 msgid "Setting one or both fields of I<new_value.it_interval> to nonzero values specifies the period, in seconds and nanoseconds, for repeated timer expirations after the initial expiration.  If both fields of I<new_value.it_interval> are zero, the timer expires just once, at the time specified by I<new_value.it_value>."
8876 msgstr "I<new_value.it_interval> はタイマーの一回目の満了後に繰り返しタイマーの満了間隔を、秒とナノ秒で指定する。 I<new_value.it_interval> のフィールドのうち少なくとも一方に 0 以外の値を設定すると、 繰り返しタイマーが有効になる。 両方のフィールドに 0 を設定した場合、タイマーは I<new_value.it_value> で指定された時間後に、一回だけ満了して停止する。"
8877
8878 #. type: Plain text
8879 #: build/C/man2/timerfd_create.2:177
8880 msgid "The I<flags> argument is either 0, to start a relative timer (I<new_value.it_value> specifies a time relative to the current value of the clock specified by I<clockid>), or B<TFD_TIMER_ABSTIME>, to start an absolute timer (I<new_value.it_value> specifies an absolute time for the clock specified by I<clockid>; that is, the timer will expire when the value of that clock reaches the value specified in I<new_value.it_value>)."
8881 msgstr "I<flags> 引き数には 0 か B<TFD_TIMER_ABSTIME> を指定する。 0 は相対時刻タイマーを意味し、 I<new_value.it_value> では I<clockid> で指定されたクロックの現在の値からの相対的な時刻を指定する。 B<TFD_TIMER_ABSTIME> は絶対時刻タイマーを意味し、 I<new_value.it_interval> では I<clockid> で指定されたクロックの絶対時刻を指定する。 つまり、クロックの値が I<new_value.it_interval> で指定された時刻に達したら、タイマーが満了する。"
8882
8883 #. type: Plain text
8884 #: build/C/man2/timerfd_create.2:188
8885 msgid "If the I<old_value> argument is not NULL, then the I<itimerspec> structure that it points to is used to return the setting of the timer that was current at the time of the call; see the description of B<timerfd_gettime>()  following."
8886 msgstr "I<old_value> 引き数が NULL でない場合、 I<old_value> 引き数が指す I<itimerspec> 構造体は、 B<timerfd_settime>() を呼び出した時点でのタイマーの設定を返すのに使用される。 下記の B<timerfd_gettime>() の説明を参照。"
8887
8888 #. type: SS
8889 #: build/C/man2/timerfd_create.2:188
8890 #, no-wrap
8891 msgid "timerfd_gettime()"
8892 msgstr "timerfd_gettime()"
8893
8894 #. type: Plain text
8895 #: build/C/man2/timerfd_create.2:197
8896 msgid "B<timerfd_gettime>()  returns, in I<curr_value>, an I<itimerspec> structure that contains the current setting of the timer referred to by the file descriptor I<fd>."
8897 msgstr "B<timerfd_gettime>()  は、ファイルディスクリプター I<fd> で参照されるタイマーの現在の設定が入った I<itimerspec> 構造体を、 I<curr_value> に格納して返す。"
8898
8899 #. type: Plain text
8900 #: build/C/man2/timerfd_create.2:207
8901 msgid "The I<it_value> field returns the amount of time until the timer will next expire.  If both fields of this structure are zero, then the timer is currently disarmed.  This field always contains a relative value, regardless of whether the B<TFD_TIMER_ABSTIME> flag was specified when setting the timer."
8902 msgstr "I<it_value> フィールドは、タイマーが次に満了するまでの残り時間を返す。 この構造体の両方のフィールドが 0 であれば、タイマーは現在停止している。 タイマー設定時に B<TFD_TIMER_ABSTIME> フラグが指定されたかに関わらず、このフィールドは常に相対値が格納される。"
8903
8904 #. type: Plain text
8905 #: build/C/man2/timerfd_create.2:214
8906 msgid "The I<it_interval> field returns the interval of the timer.  If both fields of this structure are zero, then the timer is set to expire just once, at the time specified by I<curr_value.it_value>."
8907 msgstr "I<it_interval> フィールドは、タイマーの間隔を返す。 この構造体の両方のフィールドが 0 であれば、タイマーは I<new_value.it_value> で指定された時間後に一回だけ満了して停止するように設定されている。"
8908
8909 #. type: SS
8910 #: build/C/man2/timerfd_create.2:214
8911 #, no-wrap
8912 msgid "Operating on a timer file descriptor"
8913 msgstr "タイマーファイルディスクリプターに対する操作"
8914
8915 #. type: Plain text
8916 #: build/C/man2/timerfd_create.2:218
8917 msgid "The file descriptor returned by B<timerfd_create>()  supports the following operations:"
8918 msgstr "B<timerfd_create>()  が返すファイルディスクリプターは以下の操作をサポートしている。"
8919
8920 #. type: Plain text
8921 #: build/C/man2/timerfd_create.2:232
8922 msgid "If the timer has already expired one or more times since its settings were last modified using B<timerfd_settime>(), or since the last successful B<read>(2), then the buffer given to B<read>(2)  returns an unsigned 8-byte integer (I<uint64_t>)  containing the number of expirations that have occurred.  (The returned value is in host byte order\\(emthat is, the native byte order for integers on the host machine.)"
8923 msgstr "B<timerfd_settime>()  を使ってタイマーの設定が最後変更されて以降、または B<read>(2)  の呼び出しに最後に成功して以降に、タイマーの満了が一回以上発生していれば、 B<read>(2)  に渡されたバッファーに、タイマー満了回数を示す 8 バイトの unsigned 型の整数 (I<uint64_t>)  が返される (返される値はホストバイトオーダ、つまりそのホストマシンにおける 整数の通常のバイトオーダである)。"
8924
8925 #. type: Plain text
8926 #: build/C/man2/timerfd_create.2:245
8927 msgid "If no timer expirations have occurred at the time of the B<read>(2), then the call either blocks until the next timer expiration, or fails with the error B<EAGAIN> if the file descriptor has been made nonblocking (via the use of the B<fcntl>(2)  B<F_SETFL> operation to set the B<O_NONBLOCK> flag)."
8928 msgstr "B<read>(2)  を行った時点でタイマーの満了が発生していなければ、 B<read>(2)  は停止 (block) する、もしくはファイルディスクリプターが 非停止 (nonblocking) に設定されている場合はエラー B<EAGAIN> で失敗する (非停止モードにするには、 B<fcntl>(2)  の B<F_SETFL> 命令で B<O_NONBLOCK> フラグをセットする)。"
8929
8930 #. type: Plain text
8931 #: build/C/man2/timerfd_create.2:251
8932 msgid "A B<read>(2)  will fail with the error B<EINVAL> if the size of the supplied buffer is less than 8 bytes."
8933 msgstr "渡されたバッファーの大きさが 8 バイト未満の場合、 B<read>(2)  はエラー B<EINVAL> で失敗する。"
8934
8935 #. type: Plain text
8936 #: build/C/man2/timerfd_create.2:262
8937 msgid "The file descriptor is readable (the B<select>(2)  I<readfds> argument; the B<poll>(2)  B<POLLIN> flag)  if one or more timer expirations have occurred."
8938 msgstr "一つ以上のタイマー満了が発生していれば、 ファイルディスクリプターは読み出し可能となる (B<select>(2)  の I<readfds> 引き数や B<poll>(2)  の B<POLLIN> フラグ)。"
8939
8940 #. type: Plain text
8941 #: build/C/man2/timerfd_create.2:269
8942 msgid "The file descriptor also supports the other file-descriptor multiplexing APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
8943 msgstr "このファイルディスクリプターは、他のファイルディスクリプター多重 API である B<pselect>(2), B<ppoll>(2), B<epoll>(7)  もサポートしている。"
8944
8945 #. type: Plain text
8946 #: build/C/man2/timerfd_create.2:276
8947 msgid "When the file descriptor is no longer required it should be closed.  When all file descriptors associated with the same timer object have been closed, the timer is disarmed and its resources are freed by the kernel."
8948 msgstr "ファイルディスクリプターがそれ以降は必要なくなった際には、クローズすべきである。 同じ timer オブジェクトに関連付けられたファイルディスクリプターが全て クローズされると、そのタイマーは解除され、 そのオブジェクト用の資源がカーネルにより解放される。"
8949
8950 #. type: Plain text
8951 #: build/C/man2/timerfd_create.2:288
8952 msgid "After a B<fork>(2), the child inherits a copy of the file descriptor created by B<timerfd_create>().  The file descriptor refers to the same underlying timer object as the corresponding file descriptor in the parent, and B<read>(2)s in the child will return information about expirations of the timer."
8953 msgstr "B<fork>(2)  が行われると、子プロセスは B<timerfd_create>()  により生成されたファイルディスクリプターのコピーを 継承する。そのファイルディスクリプターは、親プロセスの対応する ファイルディスクリプターと同じタイマーオブジェクトを参照しており、 子プロセスの B<read>(2)  でも同じタイマーの満了に関する情報が返される。"
8954
8955 #. type: Plain text
8956 #: build/C/man2/timerfd_create.2:294
8957 msgid "A file descriptor created by B<timerfd_create>()  is preserved across B<execve>(2), and continues to generate timer expirations if the timer was armed."
8958 msgstr "B<execve>(2)  の前後で B<timerfd_create>()  により生成されたファイルディスクリプターは保持され、 タイマーが開始されていた場合にはタイマーの満了が発生し続ける。"
8959
8960 #. type: Plain text
8961 #: build/C/man2/timerfd_create.2:301
8962 msgid "On success, B<timerfd_create>()  returns a new file descriptor.  On error, -1 is returned and I<errno> is set to indicate the error."
8963 msgstr "成功すると、 B<timerfd_create>()  は新しいファイルディスクリプターを返す。 エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
8964
8965 #. type: Plain text
8966 #: build/C/man2/timerfd_create.2:309
8967 msgid "B<timerfd_settime>()  and B<timerfd_gettime>()  return 0 on success; on error they return -1, and set I<errno> to indicate the error."
8968 msgstr "B<timerfd_settime>()  と B<timerfd_gettime>()  は成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
8969
8970 #. type: Plain text
8971 #: build/C/man2/timerfd_create.2:312
8972 msgid "B<timerfd_create>()  can fail with the following errors:"
8973 msgstr "B<timerfd_create>()  は以下のエラーで失敗する可能性がある。"
8974
8975 #. type: Plain text
8976 #: build/C/man2/timerfd_create.2:320
8977 msgid "The I<clockid> argument is neither B<CLOCK_MONOTONIC> nor B<CLOCK_REALTIME>;"
8978 msgstr "I<clockid> 引き数が B<CLOCK_MONOTONIC> でも B<CLOCK_REALTIME> でもない。"
8979
8980 #. type: Plain text
8981 #: build/C/man2/timerfd_create.2:340
8982 msgid "There was insufficient kernel memory to create the timer."
8983 msgstr "タイマーを作成するのに十分なカーネルメモリーがなかった。"
8984
8985 #. type: Plain text
8986 #: build/C/man2/timerfd_create.2:345
8987 msgid "B<timerfd_settime>()  and B<timerfd_gettime>()  can fail with the following errors:"
8988 msgstr "B<timerfd_settime>()  と B<timerfd_gettime>()  は以下のエラーで失敗する可能性がある。"
8989
8990 #. type: Plain text
8991 #: build/C/man2/timerfd_create.2:349
8992 msgid "I<fd> is not a valid file descriptor."
8993 msgstr "I<fd> が有効なファイルディスクリプターでない。"
8994
8995 #. type: Plain text
8996 #: build/C/man2/timerfd_create.2:360
8997 msgid "I<fd> is not a valid timerfd file descriptor."
8998 msgstr "I<fd> が有効な timerfd ファイルディスクリプターでない。"
8999
9000 #. type: Plain text
9001 #: build/C/man2/timerfd_create.2:363
9002 msgid "B<timerfd_settime>()  can also fail with the following errors:"
9003 msgstr "B<timerfd_settime>()  は以下のエラーで失敗することもある。"
9004
9005 #. type: Plain text
9006 #: build/C/man2/timerfd_create.2:369
9007 msgid "I<new_value> is not properly initialized (one of the I<tv_nsec> falls outside the range zero to 999,999,999)."
9008 msgstr "I<new_value> が適切に初期化されていない (I<tv_nsec> の一つが 0 から 999,999,999 までの範囲に入っていない)。"
9009
9010 #.  This case only checked since 2.6.29, and 2.2.2[78].some-stable-version.
9011 #.  In older kernel versions, no check was made for invalid flags.
9012 #. type: Plain text
9013 #: build/C/man2/timerfd_create.2:375
9014 msgid "I<flags> is invalid."
9015 msgstr "I<flags> が無効である。"
9016
9017 #. type: Plain text
9018 #: build/C/man2/timerfd_create.2:378
9019 msgid "These system calls are available on Linux since kernel 2.6.25.  Library support is provided by glibc since version 2.8."
9020 msgstr "これらのシステムコールはカーネル 2.6.25 以降の Linux で利用可能である。 ライブラリ側のサポートはバージョン 2.8 以降の glibc で提供されている。"
9021
9022 #.  2.6.29
9023 #. type: Plain text
9024 #: build/C/man2/timerfd_create.2:386
9025 msgid "Currently, B<timerfd_create>()  supports fewer types of clock IDs than B<timer_create>(2)."
9026 msgstr "現在のところ、 B<timerfd_create>()  が対応している clockid の種類は B<timer_create>(2)  よりも少ない。"
9027
9028 #. type: Plain text
9029 #: build/C/man2/timerfd_create.2:395
9030 msgid "The following program creates a timer and then monitors its progress.  The program accepts up to three command-line arguments.  The first argument specifies the number of seconds for the initial expiration of the timer.  The second argument specifies the interval for the timer, in seconds.  The third argument specifies the number of times the program should allow the timer to expire before terminating.  The second and third command-line arguments are optional."
9031 msgstr "以下のプログラムは、タイマーを作成し、その進捗をモニターするものである。 このプログラムは最大で 3 個のコマンドライン引き数を取り、 第一引き数ではタイマーの満了時間の初期値 (秒数単位) を、 第二引き数ではタイマーの間隔 (秒数単位) を、 第三引き数ではタイマーが何回満了したらプログラムが終了するかを指定する。 第二引き数と第三引き数は省略可能である。"
9032
9033 #. type: Plain text
9034 #: build/C/man2/timerfd_create.2:397 build/C/man2/wait.2:571
9035 msgid "The following shell session demonstrates the use of the program:"
9036 msgstr "以下のシェルのセッションはこのプログラムの使用例を示したものである。"
9037
9038 #. type: Plain text
9039 #: build/C/man2/timerfd_create.2:412
9040 #, no-wrap
9041 msgid ""
9042 "$B< a.out 3 1 100>\n"
9043 "0.000: timer started\n"
9044 "3.000: read: 1; total=1\n"
9045 "4.000: read: 1; total=2\n"
9046 "B<^Z >                 # type control-Z to suspend the program\n"
9047 "[1]+  Stopped                 ./timerfd3_demo 3 1 100\n"
9048 "$ B<fg>                # Resume execution after a few seconds\n"
9049 "a.out 3 1 100\n"
9050 "9.660: read: 5; total=7\n"
9051 "10.000: read: 1; total=8\n"
9052 "11.000: read: 1; total=9\n"
9053 "B<^C >                 # type control-C to suspend the program\n"
9054 msgstr ""
9055 "$B< a.out 3 1 100>\n"
9056 "0.000: timer started\n"
9057 "3.000: read: 1; total=1\n"
9058 "4.000: read: 1; total=2\n"
9059 "B<^Z >                 # type control-Z to suspend the program\n"
9060 "[1]+  Stopped                 ./timerfd3_demo 3 1 100\n"
9061 "$ B<fg>                # Resume execution after a few seconds\n"
9062 "a.out 3 1 100\n"
9063 "9.660: read: 5; total=7\n"
9064 "10.000: read: 1; total=8\n"
9065 "11.000: read: 1; total=9\n"
9066 "B<^C >                 # type control-C to suspend the program\n"
9067
9068 #.  The commented out code here is what we currently need until
9069 #.  the required stuff is in glibc
9070 #. /* Link with -lrt */
9071 #. #define _GNU_SOURCE
9072 #. #include <sys/syscall.h>
9073 #. #include <unistd.h>
9074 #. #include <time.h>
9075 #. #if defined(__i386__)
9076 #. #define __NR_timerfd_create 322
9077 #. #define __NR_timerfd_settime 325
9078 #. #define __NR_timerfd_gettime 326
9079 #. #endif
9080 #. static int
9081 #. timerfd_create(int clockid, int flags)
9082 #. {
9083 #.     return syscall(__NR_timerfd_create, clockid, flags);
9084 #. }
9085 #. static int
9086 #. timerfd_settime(int fd, int flags, struct itimerspec *new_value,
9087 #.         struct itimerspec *curr_value)
9088 #. {
9089 #.     return syscall(__NR_timerfd_settime, fd, flags, new_value,
9090 #.                    curr_value);
9091 #. }
9092 #. static int
9093 #. timerfd_gettime(int fd, struct itimerspec *curr_value)
9094 #. {
9095 #.     return syscall(__NR_timerfd_gettime, fd, curr_value);
9096 #. }
9097 #. #define TFD_TIMER_ABSTIME (1 << 0)
9098 #. ////////////////////////////////////////////////////////////
9099 #. type: Plain text
9100 #: build/C/man2/timerfd_create.2:461
9101 #, no-wrap
9102 msgid ""
9103 "#include E<lt>sys/timerfd.hE<gt>\n"
9104 "#include E<lt>time.hE<gt>\n"
9105 "#include E<lt>unistd.hE<gt>\n"
9106 "#include E<lt>stdlib.hE<gt>\n"
9107 "#include E<lt>stdio.hE<gt>\n"
9108 "#include E<lt>stdint.hE<gt>        /* Definition of uint64_t */\n"
9109 msgstr ""
9110 "#include E<lt>sys/timerfd.hE<gt>\n"
9111 "#include E<lt>time.hE<gt>\n"
9112 "#include E<lt>unistd.hE<gt>\n"
9113 "#include E<lt>stdlib.hE<gt>\n"
9114 "#include E<lt>stdio.hE<gt>\n"
9115 "#include E<lt>stdint.hE<gt>        /* Definition of uint64_t */\n"
9116
9117 #. type: Plain text
9118 #: build/C/man2/timerfd_create.2:464
9119 #, no-wrap
9120 msgid ""
9121 "#define handle_error(msg) \\e\n"
9122 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
9123 msgstr ""
9124 "#define handle_error(msg) \\e\n"
9125 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
9126
9127 #. type: Plain text
9128 #: build/C/man2/timerfd_create.2:472
9129 #, no-wrap
9130 msgid ""
9131 "static void\n"
9132 "print_elapsed_time(void)\n"
9133 "{\n"
9134 "    static struct timespec start;\n"
9135 "    struct timespec curr;\n"
9136 "    static int first_call = 1;\n"
9137 "    int secs, nsecs;\n"
9138 msgstr ""
9139 "static void\n"
9140 "print_elapsed_time(void)\n"
9141 "{\n"
9142 "    static struct timespec start;\n"
9143 "    struct timespec curr;\n"
9144 "    static int first_call = 1;\n"
9145 "    int secs, nsecs;\n"
9146
9147 #. type: Plain text
9148 #: build/C/man2/timerfd_create.2:478
9149 #, no-wrap
9150 msgid ""
9151 "    if (first_call) {\n"
9152 "        first_call = 0;\n"
9153 "        if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
9154 "            handle_error(\"clock_gettime\");\n"
9155 "    }\n"
9156 msgstr ""
9157 "    if (first_call) {\n"
9158 "        first_call = 0;\n"
9159 "        if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
9160 "            handle_error(\"clock_gettime\");\n"
9161 "    }\n"
9162
9163 #. type: Plain text
9164 #: build/C/man2/timerfd_create.2:481
9165 #, no-wrap
9166 msgid ""
9167 "    if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
9168 "        handle_error(\"clock_gettime\");\n"
9169 msgstr ""
9170 "    if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
9171 "        handle_error(\"clock_gettime\");\n"
9172
9173 #. type: Plain text
9174 #: build/C/man2/timerfd_create.2:490
9175 #, no-wrap
9176 msgid ""
9177 "    secs = curr.tv_sec - start.tv_sec;\n"
9178 "    nsecs = curr.tv_nsec - start.tv_nsec;\n"
9179 "    if (nsecs E<lt> 0) {\n"
9180 "        secs--;\n"
9181 "        nsecs += 1000000000;\n"
9182 "    }\n"
9183 "    printf(\"%d.%03d: \", secs, (nsecs + 500000) / 1000000);\n"
9184 "}\n"
9185 msgstr ""
9186 "    secs = curr.tv_sec - start.tv_sec;\n"
9187 "    nsecs = curr.tv_nsec - start.tv_nsec;\n"
9188 "    if (nsecs E<lt> 0) {\n"
9189 "        secs--;\n"
9190 "        nsecs += 1000000000;\n"
9191 "    }\n"
9192 "    printf(\"%d.%03d: \", secs, (nsecs + 500000) / 1000000);\n"
9193 "}\n"
9194
9195 #. type: Plain text
9196 #: build/C/man2/timerfd_create.2:499
9197 #, no-wrap
9198 msgid ""
9199 "int\n"
9200 "main(int argc, char *argv[])\n"
9201 "{\n"
9202 "    struct itimerspec new_value;\n"
9203 "    int max_exp, fd;\n"
9204 "    struct timespec now;\n"
9205 "    uint64_t exp, tot_exp;\n"
9206 "    ssize_t s;\n"
9207 msgstr ""
9208 "int\n"
9209 "main(int argc, char *argv[])\n"
9210 "{\n"
9211 "    struct itimerspec new_value;\n"
9212 "    int max_exp, fd;\n"
9213 "    struct timespec now;\n"
9214 "    uint64_t exp, tot_exp;\n"
9215 "    ssize_t s;\n"
9216
9217 #. type: Plain text
9218 #: build/C/man2/timerfd_create.2:505
9219 #, no-wrap
9220 msgid ""
9221 "    if ((argc != 2) && (argc != 4)) {\n"
9222 "        fprintf(stderr, \"%s init-secs [interval-secs max-exp]\\en\",\n"
9223 "                argv[0]);\n"
9224 "        exit(EXIT_FAILURE);\n"
9225 "    }\n"
9226 msgstr ""
9227 "    if ((argc != 2) && (argc != 4)) {\n"
9228 "        fprintf(stderr, \"%s init-secs [interval-secs max-exp]\\en\",\n"
9229 "                argv[0]);\n"
9230 "        exit(EXIT_FAILURE);\n"
9231 "    }\n"
9232
9233 #. type: Plain text
9234 #: build/C/man2/timerfd_create.2:508
9235 #, no-wrap
9236 msgid ""
9237 "    if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
9238 "        handle_error(\"clock_gettime\");\n"
9239 msgstr ""
9240 "    if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
9241 "        handle_error(\"clock_gettime\");\n"
9242
9243 #. type: Plain text
9244 #: build/C/man2/timerfd_create.2:511
9245 #, no-wrap
9246 msgid ""
9247 "    /* Create a CLOCK_REALTIME absolute timer with initial\n"
9248 "       expiration and interval as specified in command line */\n"
9249 msgstr ""
9250 "    /* Create a CLOCK_REALTIME absolute timer with initial\n"
9251 "       expiration and interval as specified in command line */\n"
9252
9253 #. type: Plain text
9254 #: build/C/man2/timerfd_create.2:522
9255 #, no-wrap
9256 msgid ""
9257 "    new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
9258 "    new_value.it_value.tv_nsec = now.tv_nsec;\n"
9259 "    if (argc == 2) {\n"
9260 "        new_value.it_interval.tv_sec = 0;\n"
9261 "        max_exp = 1;\n"
9262 "    } else {\n"
9263 "        new_value.it_interval.tv_sec = atoi(argv[2]);\n"
9264 "        max_exp = atoi(argv[3]);\n"
9265 "    }\n"
9266 "    new_value.it_interval.tv_nsec = 0;\n"
9267 msgstr ""
9268 "    new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
9269 "    new_value.it_value.tv_nsec = now.tv_nsec;\n"
9270 "    if (argc == 2) {\n"
9271 "        new_value.it_interval.tv_sec = 0;\n"
9272 "        max_exp = 1;\n"
9273 "    } else {\n"
9274 "        new_value.it_interval.tv_sec = atoi(argv[2]);\n"
9275 "        max_exp = atoi(argv[3]);\n"
9276 "    }\n"
9277 "    new_value.it_interval.tv_nsec = 0;\n"
9278
9279 #. type: Plain text
9280 #: build/C/man2/timerfd_create.2:526
9281 #, no-wrap
9282 msgid ""
9283 "    fd = timerfd_create(CLOCK_REALTIME, 0);\n"
9284 "    if (fd == -1)\n"
9285 "        handle_error(\"timerfd_create\");\n"
9286 msgstr ""
9287 "    fd = timerfd_create(CLOCK_REALTIME, 0);\n"
9288 "    if (fd == -1)\n"
9289 "        handle_error(\"timerfd_create\");\n"
9290
9291 #. type: Plain text
9292 #: build/C/man2/timerfd_create.2:529
9293 #, no-wrap
9294 msgid ""
9295 "    if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
9296 "        handle_error(\"timerfd_settime\");\n"
9297 msgstr ""
9298 "    if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
9299 "        handle_error(\"timerfd_settime\");\n"
9300
9301 #. type: Plain text
9302 #: build/C/man2/timerfd_create.2:532
9303 #, no-wrap
9304 msgid ""
9305 "    print_elapsed_time();\n"
9306 "    printf(\"timer started\\en\");\n"
9307 msgstr ""
9308 "    print_elapsed_time();\n"
9309 "    printf(\"timer started\\en\");\n"
9310
9311 #. type: Plain text
9312 #: build/C/man2/timerfd_create.2:537
9313 #, no-wrap
9314 msgid ""
9315 "    for (tot_exp = 0; tot_exp E<lt> max_exp;) {\n"
9316 "        s = read(fd, &exp, sizeof(uint64_t));\n"
9317 "        if (s != sizeof(uint64_t))\n"
9318 "            handle_error(\"read\");\n"
9319 msgstr ""
9320 "    for (tot_exp = 0; tot_exp E<lt> max_exp;) {\n"
9321 "        s = read(fd, &exp, sizeof(uint64_t));\n"
9322 "        if (s != sizeof(uint64_t))\n"
9323 "            handle_error(\"read\");\n"
9324
9325 #. type: Plain text
9326 #: build/C/man2/timerfd_create.2:544
9327 #, no-wrap
9328 msgid ""
9329 "        tot_exp += exp;\n"
9330 "        print_elapsed_time();\n"
9331 "        printf(\"read: %llu; total=%llu\\en\",\n"
9332 "                (unsigned long long) exp,\n"
9333 "                (unsigned long long) tot_exp);\n"
9334 "    }\n"
9335 msgstr ""
9336 "        tot_exp += exp;\n"
9337 "        print_elapsed_time();\n"
9338 "        printf(\"read: %llu; total=%llu\\en\",\n"
9339 "                (unsigned long long) exp,\n"
9340 "                (unsigned long long) tot_exp);\n"
9341 "    }\n"
9342
9343 #. type: Plain text
9344 #: build/C/man2/timerfd_create.2:560
9345 msgid "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<setitimer>(2), B<signalfd>(2), B<timer_create>(2), B<timer_gettime>(2), B<timer_settime>(2), B<epoll>(7), B<time>(7)"
9346 msgstr "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<setitimer>(2), B<signalfd>(2), B<timer_create>(2), B<timer_gettime>(2), B<timer_settime>(2), B<epoll>(7), B<time>(7)"
9347
9348 #. type: TH
9349 #: build/C/man2/tkill.2:29
9350 #, no-wrap
9351 msgid "TKILL"
9352 msgstr "TKILL"
9353
9354 #. type: Plain text
9355 #: build/C/man2/tkill.2:32
9356 msgid "tkill, tgkill - send a signal to a thread"
9357 msgstr "tkill, tgkill - スレッドにシグナルを送る"
9358
9359 #. type: Plain text
9360 #: build/C/man2/tkill.2:35
9361 #, no-wrap
9362 msgid "B<int tkill(int >I<tid>B<, int >I<sig>B<);>\n"
9363 msgstr "B<int tkill(int >I<tid>B<, int >I<sig>B<);>\n"
9364
9365 #. type: Plain text
9366 #: build/C/man2/tkill.2:37
9367 #, no-wrap
9368 msgid "B<int tgkill(int >I<tgid>B<, int >I<tid>B<, int >I<sig>B<);>\n"
9369 msgstr "B<int tgkill(int >I<tgid>B<, int >I<tid>B<, int >I<sig>B<);>\n"
9370
9371 #. type: Plain text
9372 #: build/C/man2/tkill.2:54
9373 msgid "B<tgkill>()  sends the signal I<sig> to the thread with the thread ID I<tid> in the thread group I<tgid>.  (By contrast, B<kill>(2)  can be used to send a signal only to a process (i.e., thread group)  as a whole, and the signal will be delivered to an arbitrary thread within that process.)"
9374 msgstr "B<tgkill>()  はスレッドグループ I<tgid> に属するスレッド ID が I<tid> のスレッドにシグナル I<sig> を送る。 (これに対し、 B<kill>(2)  は一つのプロセス (すなわち、スレッドグループ) にまとめてシグナルを 送るのにだけ利用できる。 B<kill>(2)  で送信されたシグナルはプロセス内の任意のスレッドに配送される。)"
9375
9376 #.  FIXME Maybe say something about the following:
9377 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=12889
9378 #.      Rich Felker <bugdal@aerifal.cx>
9379 #.      There is a race condition in pthread_kill: it is possible that,
9380 #.      between the time pthread_kill reads the pid/tid from the target
9381 #.      thread descriptor and the time it makes the tgkill syscall,
9382 #.      the target thread terminates and the same tid gets assigned
9383 #.      to a new thread in the same process.
9384 #.      (The tgkill syscall was designed to eliminate a similar race
9385 #.      condition in tkill, but it only succeeded in eliminating races
9386 #.      where the tid gets reused in a different process, and does not
9387 #.      help if the same tid gets assigned to a new thread in the
9388 #.      same process.)
9389 #.      The only solution I can see is to introduce a mutex that ensures
9390 #.      that a thread cannot exit while pthread_kill is being called on it.
9391 #.      Note that in most real-world situations, like almost all race
9392 #.      conditions, this one will be extremely rare. To make it
9393 #.      measurable, one could exhaust all but 1-2 available pid values,
9394 #.      possibly by lowering the max pid parameter in /proc, forcing
9395 #.      the same tid to be reused rapidly.
9396 #. type: Plain text
9397 #: build/C/man2/tkill.2:85
9398 msgid "B<tkill>()  is an obsolete predecessor to B<tgkill>().  It allows only the target thread ID to be specified, which may result in the wrong thread being signaled if a thread terminates and its thread ID is recycled.  Avoid using this system call."
9399 msgstr "B<tkill>()  はもう使われなくなった B<tgkill>()  の先祖である。 B<tkill>()  ではシグナルの送り先のスレッド ID しか指定できない。 そのため、スレッドが終了して、そのスレッド ID が再利用される場合に、 意図しないスレッドにシグナルが送られる可能性がある。 このシステムコールの使用は避けること。"
9400
9401 #. type: Plain text
9402 #: build/C/man2/tkill.2:88
9403 msgid "These are the raw system call interfaces, meant for internal thread library use."
9404 msgstr "これらはシステムコールへの直接のインターフェースであり、 スレッドライブラリ内部での使用を意図したものである。"
9405
9406 #. type: Plain text
9407 #: build/C/man2/tkill.2:96
9408 msgid "An invalid thread ID, thread group ID, or signal was specified."
9409 msgstr "指定されたスレッド ID、スレッドグループ ID、シグナルが不正であった。"
9410
9411 #. type: Plain text
9412 #: build/C/man2/tkill.2:101
9413 msgid "Permission denied.  For the required permissions, see B<kill>(2)."
9414 msgstr "許可がなかった。どのような許可が必要かについては、 B<kill>(2)  を参照のこと。"
9415
9416 #. type: Plain text
9417 #: build/C/man2/tkill.2:104
9418 msgid "No process with the specified thread ID (and thread group ID) exists."
9419 msgstr "指定されたスレッドID (とスレッドグループID) を持つプロセスが存在しない。"
9420
9421 #. type: Plain text
9422 #: build/C/man2/tkill.2:109
9423 msgid "B<tkill>()  is supported since Linux 2.4.19 / 2.5.4.  B<tgkill>()  was added in Linux 2.5.75."
9424 msgstr "B<tkill>()  は Linux 2.4.19 / 2.5.4 以降でサポートされ、 B<tgkill>()  は Linux 2.5.75 で追加された。"
9425
9426 #. type: Plain text
9427 #: build/C/man2/tkill.2:115
9428 msgid "B<tkill>()  and B<tgkill>()  are Linux-specific and should not be used in programs that are intended to be portable."
9429 msgstr "B<tkill>()  と B<tgkill>()  は Linux 固有であり、 移植を想定したプログラムでは使用すべきではない。"
9430
9431 #. type: Plain text
9432 #: build/C/man2/tkill.2:121
9433 msgid "See the description of B<CLONE_THREAD> in B<clone>(2)  for an explanation of thread groups."
9434 msgstr "スレッドグループの説明については B<clone>(2)  の B<CLONE_THREAD> の説明を参照のこと。"
9435
9436 #. type: Plain text
9437 #: build/C/man2/tkill.2:124
9438 msgid "Glibc does not provide wrappers for these system calls; call them using B<syscall>(2)."
9439 msgstr "glibc はこれらのシステムコールに対するラッパー関数を提供していない。 B<syscall>(2)  を使って呼び出すこと。"
9440
9441 #. type: Plain text
9442 #: build/C/man2/tkill.2:129
9443 msgid "B<clone>(2), B<gettid>(2), B<kill>(2), B<rt_sigqueueinfo>(2)"
9444 msgstr "B<clone>(2), B<gettid>(2), B<kill>(2), B<rt_sigqueueinfo>(2)"
9445
9446 #. type: TH
9447 #: build/C/man2/wait.2:49
9448 #, no-wrap
9449 msgid "WAIT"
9450 msgstr "WAIT"
9451
9452 #. type: Plain text
9453 #: build/C/man2/wait.2:52
9454 msgid "wait, waitpid, waitid - wait for process to change state"
9455 msgstr "wait, waitpid, waitid - プロセスの状態変化を待つ"
9456
9457 #. type: Plain text
9458 #: build/C/man2/wait.2:54
9459 msgid "B<#include E<lt>sys/types.hE<gt>>"
9460 msgstr "B<#include E<lt>sys/types.hE<gt>>"
9461
9462 #. type: Plain text
9463 #: build/C/man2/wait.2:56
9464 msgid "B<#include E<lt>sys/wait.hE<gt>>"
9465 msgstr "B<#include E<lt>sys/wait.hE<gt>>"
9466
9467 #. type: Plain text
9468 #: build/C/man2/wait.2:58
9469 msgid "B<pid_t wait(int *>I<status>B<);>"
9470 msgstr "B<pid_t wait(int *>I<status>B<);>"
9471
9472 #. type: Plain text
9473 #: build/C/man2/wait.2:60
9474 msgid "B<pid_t waitpid(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<);>"
9475 msgstr "B<pid_t waitpid(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<);>"
9476
9477 #. type: Plain text
9478 #: build/C/man2/wait.2:65
9479 #, no-wrap
9480 msgid ""
9481 "B<int waitid(idtype_t >I<idtype>B<, id_t >I<id>B<, siginfo_t *>I<infop>B<, int >I<options>B<);>\n"
9482 "                /* This is the glibc and POSIX interface; see\n"
9483 "                   NOTES for information on the raw system call. */\n"
9484 msgstr ""
9485 "B<int waitid(idtype_t >I<idtype>B<, id_t >I<id>B<, siginfo_t *>I<infop>B<, int >I<options>B<);>\n"
9486 "                /* これは glibc と POSIX のインターフェイスである。\n"
9487 "                   生のシステムコールについての情報は「注意」の節を参照。 */\n"
9488
9489 #. type: Plain text
9490 #: build/C/man2/wait.2:74
9491 msgid "B<waitid>():"
9492 msgstr "B<waitid>():"
9493
9494 #. type: Plain text
9495 #: build/C/man2/wait.2:78
9496 msgid "_SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
9497 msgstr "_SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
9498
9499 #. type: Plain text
9500 #: build/C/man2/wait.2:93
9501 msgid "All of these system calls are used to wait for state changes in a child of the calling process, and obtain information about the child whose state has changed.  A state change is considered to be: the child terminated; the child was stopped by a signal; or the child was resumed by a signal.  In the case of a terminated child, performing a wait allows the system to release the resources associated with the child; if a wait is not performed, then the terminated child remains in a \"zombie\" state (see NOTES below)."
9502 msgstr "これらのシステムコールはいずれも、呼び出し元プロセスの子プロセスの 状態変化を待ち、状態が変化したその子プロセスの情報を取得するのに 使用される。 状態変化とは以下のいずれかである: 子プロセスの終了、シグナルによる子プロセスの停止、 シグナルによる子プロセスの再開。 子プロセスが終了した場合は、wait を実行することで、 システムがその子プロセスに関連するリソースを解放できるようになる。 wait が実行されなかった場合には、終了した子プロセスは 「ゾンビ」状態で残り続ける (下記の注意の章を参照のこと)。"
9503
9504 #. type: Plain text
9505 #: build/C/man2/wait.2:105
9506 msgid "If a child has already changed state, then these calls return immediately.  Otherwise, they block until either a child changes state or a signal handler interrupts the call (assuming that system calls are not automatically restarted using the B<SA_RESTART> flag of B<sigaction>(2)).  In the remainder of this page, a child whose state has changed and which has not yet been waited upon by one of these system calls is termed I<waitable>."
9507 msgstr "子プロセスの状態変化がすでに発生していた場合、これらのコールは すぐに復帰する。それ以外の場合は、子プロセスの状態変化が起こるか、 シグナルハンドラーによりシステムコールが中断されるまで、 停止 (block) する (後者は、 B<sigaction>(2)  の B<SA_RESTART> フラグによりシステムコールが自動的に再スタートするようになっていない 場合の動作である)。 以下の説明では、状態変化が起こったがこれらのシステムコールのいずれかに よって待たれていない子プロセスを I<waitable> (待ち可能) と呼ぶ。"
9508
9509 #. type: SS
9510 #: build/C/man2/wait.2:105
9511 #, no-wrap
9512 msgid "wait() and waitpid()"
9513 msgstr "wait() と waitpid()"
9514
9515 #. type: Plain text
9516 #: build/C/man2/wait.2:113
9517 msgid "The B<wait>()  system call suspends execution of the calling process until one of its children terminates.  The call I<wait(&status)> is equivalent to:"
9518 msgstr "B<wait>()  システムコールは、子プロセスのいずれかが終了するまで 呼び出し元のプロセスの実行を一時停止する。 呼び出し I<wait(&status)> は以下と等価である:"
9519
9520 #. type: Plain text
9521 #: build/C/man2/wait.2:116
9522 #, no-wrap
9523 msgid "    waitpid(-1, &status, 0);\n"
9524 msgstr "    waitpid(-1, &status, 0);\n"
9525
9526 #. type: Plain text
9527 #: build/C/man2/wait.2:130
9528 msgid "The B<waitpid>()  system call suspends execution of the calling process until a child specified by I<pid> argument has changed state.  By default, B<waitpid>()  waits only for terminated children, but this behavior is modifiable via the I<options> argument, as described below."
9529 msgstr "B<waitpid>()  システムコールは、 I<pid> 引き数で指定した子プロセスの状態変化が起こるまで、 呼び出し元のプロセスの実行を一時停止する。デフォルトでは、 B<waitpid>()  は子プロセスの終了だけを待つが、この動作は I<options> 引き数により変更可能である。"
9530
9531 #. type: Plain text
9532 #: build/C/man2/wait.2:134
9533 msgid "The value of I<pid> can be:"
9534 msgstr "I<pid> に指定できる値は以下の通り:"
9535
9536 #. type: IP
9537 #: build/C/man2/wait.2:134
9538 #, no-wrap
9539 msgid "E<lt> -1"
9540 msgstr "E<lt> -1"
9541
9542 #. type: Plain text
9543 #: build/C/man2/wait.2:138
9544 msgid "meaning wait for any child process whose process group ID is equal to the absolute value of I<pid>."
9545 msgstr "プロセスグループID が I<pid> の絶対値に等しい子プロセスのいずれかが終了するまでを待つ。"
9546
9547 #. type: IP
9548 #: build/C/man2/wait.2:138
9549 #, no-wrap
9550 msgid "-1"
9551 msgstr "-1"
9552
9553 #. type: Plain text
9554 #: build/C/man2/wait.2:140
9555 msgid "meaning wait for any child process."
9556 msgstr "子プロセスのどれかが終了するまで待つ。"
9557
9558 #. type: IP
9559 #: build/C/man2/wait.2:140
9560 #, no-wrap
9561 msgid "0"
9562 msgstr "0"
9563
9564 #. type: Plain text
9565 #: build/C/man2/wait.2:143
9566 msgid "meaning wait for any child process whose process group ID is equal to that of the calling process."
9567 msgstr "プロセスグループID が呼び出したプロセスのものと等しい 子プロセスを待つ。"
9568
9569 #. type: IP
9570 #: build/C/man2/wait.2:143
9571 #, no-wrap
9572 msgid "E<gt> 0"
9573 msgstr "E<gt> 0"
9574
9575 #. type: Plain text
9576 #: build/C/man2/wait.2:147
9577 msgid "meaning wait for the child whose process ID is equal to the value of I<pid>."
9578 msgstr "プロセスID が I<pid> に等しい子プロセスを待つ。"
9579
9580 #. type: Plain text
9581 #: build/C/man2/wait.2:151
9582 msgid "The value of I<options> is an OR of zero or more of the following constants:"
9583 msgstr "I<options> の値は次の定数の 0 個以上の論理和である:"
9584
9585 #. type: TP
9586 #: build/C/man2/wait.2:151 build/C/man2/wait.2:280
9587 #, no-wrap
9588 msgid "B<WNOHANG>"
9589 msgstr "B<WNOHANG>"
9590
9591 #. type: Plain text
9592 #: build/C/man2/wait.2:154
9593 msgid "return immediately if no child has exited."
9594 msgstr "状態変化が起こった子プロセスがない場合にすぐに復帰する。"
9595
9596 #. type: TP
9597 #: build/C/man2/wait.2:154
9598 #, no-wrap
9599 msgid "B<WUNTRACED>"
9600 msgstr "B<WUNTRACED>"
9601
9602 #. type: Plain text
9603 #: build/C/man2/wait.2:163
9604 msgid "also return if a child has stopped (but not traced via B<ptrace>(2)).  Status for I<traced> children which have stopped is provided even if this option is not specified."
9605 msgstr "子プロセスが停止した場合にも復帰する (子プロセスが B<ptrace>(2)  でトレースされている場合は除く)。 このオプションが指定されていない場合でも、停止したプロセスが 「トレース (traced)」されていれば、子プロセスの状態が報告される。"
9606
9607 #. type: TP
9608 #: build/C/man2/wait.2:163
9609 #, no-wrap
9610 msgid "B<WCONTINUED> (since Linux 2.6.10)"
9611 msgstr "B<WCONTINUED> (Linux 2.6.10 以降)"
9612
9613 #. type: Plain text
9614 #: build/C/man2/wait.2:167
9615 msgid "also return if a stopped child has been resumed by delivery of B<SIGCONT>."
9616 msgstr "停止した子プロセスが B<SIGCONT> の配送により再開した場合にも復帰する。"
9617
9618 #. type: Plain text
9619 #: build/C/man2/wait.2:169
9620 msgid "(For Linux-only options, see below.)"
9621 msgstr "(Linux 専用オプションについては後述する)"
9622
9623 #. type: Plain text
9624 #: build/C/man2/wait.2:183
9625 msgid "If I<status> is not NULL, B<wait>()  and B<waitpid>()  store status information in the I<int> to which it points.  This integer can be inspected with the following macros (which take the integer itself as an argument, not a pointer to it, as is done in B<wait>()  and B<waitpid>()!):"
9626 msgstr "I<status> が NULL でなければ、 B<wait>()  や B<waitpid>()  は I<status> で指す I<int> に状態情報を格納する。 この整数は以下のマクロを使って検査できる。 (これらのマクロの引き数には、 B<wait>()  や B<waitpid>()  が書き込んだ整数そのものを指定する。ポインターではない!)"
9627
9628 #. type: TP
9629 #: build/C/man2/wait.2:183
9630 #, no-wrap
9631 msgid "B<WIFEXITED(>I<status>B<)>"
9632 msgstr "B<WIFEXITED(>I<status>B<)>"
9633
9634 #. type: Plain text
9635 #: build/C/man2/wait.2:191
9636 msgid "returns true if the child terminated normally, that is, by calling B<exit>(3)  or B<_exit>(2), or by returning from main()."
9637 msgstr "子プロセスが正常に終了した場合に真を返す。 「正常に」とは、 B<exit>(3)  か B<_exit>(2)  が呼び出された場合、もしくは main() から復帰した場合である。"
9638
9639 #. type: TP
9640 #: build/C/man2/wait.2:191
9641 #, no-wrap
9642 msgid "B<WEXITSTATUS(>I<status>B<)>"
9643 msgstr "B<WEXITSTATUS(>I<status>B<)>"
9644
9645 #. type: Plain text
9646 #: build/C/man2/wait.2:204
9647 msgid "returns the exit status of the child.  This consists of the least significant 8 bits of the I<status> argument that the child specified in a call to B<exit>(3)  or B<_exit>(2)  or as the argument for a return statement in main().  This macro should be employed only if B<WIFEXITED> returned true."
9648 msgstr "子プロセスの終了ステータスを返す。 終了ステータスは I<status> 引き数の下位 8ビットで構成されており、 B<exit>(3)  や B<_exit>(2)  の呼び出し時に渡された値、もしくは main() の return 文の 引き数として指定された値である。 このマクロを使用するのは B<WIFEXITED> が真を返した場合だけにすべきである。"
9649
9650 #. type: TP
9651 #: build/C/man2/wait.2:204
9652 #, no-wrap
9653 msgid "B<WIFSIGNALED(>I<status>B<)>"
9654 msgstr "B<WIFSIGNALED(>I<status>B<)>"
9655
9656 #. type: Plain text
9657 #: build/C/man2/wait.2:207
9658 msgid "returns true if the child process was terminated by a signal."
9659 msgstr "子プロセスがシグナルにより終了した場合に真を返す。"
9660
9661 #. type: TP
9662 #: build/C/man2/wait.2:207
9663 #, no-wrap
9664 msgid "B<WTERMSIG(>I<status>B<)>"
9665 msgstr "B<WTERMSIG(>I<status>B<)>"
9666
9667 #. type: Plain text
9668 #: build/C/man2/wait.2:214
9669 msgid "returns the number of the signal that caused the child process to terminate.  This macro should be employed only if B<WIFSIGNALED> returned true."
9670 msgstr "子プロセス終了の原因となったシグナルの番号を返す。 このマクロを使用するのは B<WIFSIGNALED> が真を返した場合だけにすべきである。"
9671
9672 #. type: TP
9673 #: build/C/man2/wait.2:214
9674 #, no-wrap
9675 msgid "B<WCOREDUMP(>I<status>B<)>"
9676 msgstr "B<WCOREDUMP(>I<status>B<)>"
9677
9678 #. type: Plain text
9679 #: build/C/man2/wait.2:223
9680 msgid "returns true if the child produced a core dump.  This macro should be employed only if B<WIFSIGNALED> returned true.  This macro is not specified in POSIX.1-2001 and is not available on some UNIX implementations (e.g., AIX, SunOS).  Only use this enclosed in #ifdef WCOREDUMP ... #endif."
9681 msgstr "子プロセスがコアダンプを生成した場合に真を返す。 このマクロを使用するのは B<WIFSIGNALED> が真を返した場合だけにすべきである。 このマクロは POSIX.1-2001 では規定されておらず、 (AIX, SunOS などの) いくつかの UNIX の実装では利用できない。 必ず #ifdef WCOREDUMP ... #endif で括って使用すること。"
9682
9683 #. type: TP
9684 #: build/C/man2/wait.2:223
9685 #, no-wrap
9686 msgid "B<WIFSTOPPED(>I<status>B<)>"
9687 msgstr "B<WIFSTOPPED(>I<status>B<)>"
9688
9689 #. type: Plain text
9690 #: build/C/man2/wait.2:230
9691 msgid "returns true if the child process was stopped by delivery of a signal; this is possible only if the call was done using B<WUNTRACED> or when the child is being traced (see B<ptrace>(2))."
9692 msgstr "子プロセスがシグナルの配送により停止した場合に真を返す。 これが真になるのは、システムコールが B<WUNTRACED> を指定して呼び出された場合か、子プロセスがトレースされている場合 (B<ptrace>(2)  参照) だけである。"
9693
9694 #. type: TP
9695 #: build/C/man2/wait.2:230
9696 #, no-wrap
9697 msgid "B<WSTOPSIG(>I<status>B<)>"
9698 msgstr "B<WSTOPSIG(>I<status>B<)>"
9699
9700 #. type: Plain text
9701 #: build/C/man2/wait.2:236
9702 msgid "returns the number of the signal which caused the child to stop.  This macro should be employed only if B<WIFSTOPPED> returned true."
9703 msgstr "子プロセスを停止させたシグナルの番号を返す。 このマクロを使用するのは B<WIFSTOPPED> が 0 以外を返した場合だけにすべきである。"
9704
9705 #. type: TP
9706 #: build/C/man2/wait.2:236
9707 #, no-wrap
9708 msgid "B<WIFCONTINUED(>I<status>B<)>"
9709 msgstr "B<WIFCONTINUED(>I<status>B<)>"
9710
9711 #. type: Plain text
9712 #: build/C/man2/wait.2:241
9713 msgid "(since Linux 2.6.10)  returns true if the child process was resumed by delivery of B<SIGCONT>."
9714 msgstr "(Linux 2.6.10 以降)  子プロセスが B<SIGCONT> の配送により再開した場合に真を返す。"
9715
9716 #. type: SS
9717 #: build/C/man2/wait.2:241
9718 #, no-wrap
9719 msgid "waitid()"
9720 msgstr "waitid()"
9721
9722 #. type: Plain text
9723 #: build/C/man2/wait.2:246
9724 msgid "The B<waitid>()  system call (available since Linux 2.6.9) provides more precise control over which child state changes to wait for."
9725 msgstr "B<waitid>()  システムコール (Linux 2.6.9 以降で利用可能) を使うと、 子プロセスのどの状態変化を待つかについてより細かな制御ができる。"
9726
9727 #. type: Plain text
9728 #: build/C/man2/wait.2:252
9729 msgid "The I<idtype> and I<id> arguments select the child(ren) to wait for, as follows:"
9730 msgstr "引き数 I<idtype> と I<id> でどの子プロセスを待つかを選択する:"
9731
9732 #. type: IP
9733 #: build/C/man2/wait.2:252
9734 #, no-wrap
9735 msgid "I<idtype> == B<P_PID>"
9736 msgstr "I<idtype> == B<P_PID>"
9737
9738 #. type: Plain text
9739 #: build/C/man2/wait.2:255
9740 msgid "Wait for the child whose process ID matches I<id>."
9741 msgstr "プロセスID が I<id> と一致する子プロセスを待つ。"
9742
9743 #. type: IP
9744 #: build/C/man2/wait.2:255
9745 #, no-wrap
9746 msgid "I<idtype> == B<P_PGID>"
9747 msgstr "I<idtype> == B<P_PGID>"
9748
9749 #. type: Plain text
9750 #: build/C/man2/wait.2:258
9751 msgid "Wait for any child whose process group ID matches I<id>."
9752 msgstr "プロセスグループID が I<id> と一致する子プロセスを待つ。"
9753
9754 #. type: IP
9755 #: build/C/man2/wait.2:258
9756 #, no-wrap
9757 msgid "I<idtype> == B<P_ALL>"
9758 msgstr "I<idtype> == B<P_ALL>"
9759
9760 #. type: Plain text
9761 #: build/C/man2/wait.2:262
9762 msgid "Wait for any child; I<id> is ignored."
9763 msgstr "子プロセス全部を対象に待つ。 I<id> は無視される。"
9764
9765 #. type: Plain text
9766 #: build/C/man2/wait.2:266
9767 msgid "The child state changes to wait for are specified by ORing one or more of the following flags in I<options>:"
9768 msgstr "子プロセスのどの状態変化を待つかは以下のフラグで指定する (I<options> には 1個以上のフラグの論理和をとって指定する):"
9769
9770 #. type: TP
9771 #: build/C/man2/wait.2:266
9772 #, no-wrap
9773 msgid "B<WEXITED>"
9774 msgstr "B<WEXITED>"
9775
9776 #. type: Plain text
9777 #: build/C/man2/wait.2:269
9778 msgid "Wait for children that have terminated."
9779 msgstr "子プロセスの終了を待つ。"
9780
9781 #. type: TP
9782 #: build/C/man2/wait.2:269
9783 #, no-wrap
9784 msgid "B<WSTOPPED>"
9785 msgstr "B<WSTOPPED>"
9786
9787 #. type: Plain text
9788 #: build/C/man2/wait.2:272
9789 msgid "Wait for children that have been stopped by delivery of a signal."
9790 msgstr "子プロセスがシグナルの配送により停止するのを待つ。"
9791
9792 #. type: TP
9793 #: build/C/man2/wait.2:272
9794 #, no-wrap
9795 msgid "B<WCONTINUED>"
9796 msgstr "B<WCONTINUED>"
9797
9798 #. type: Plain text
9799 #: build/C/man2/wait.2:277
9800 msgid "Wait for (previously stopped) children that have been resumed by delivery of B<SIGCONT>."
9801 msgstr "(停止していた) 子プロセスが B<SIGCONT> が配送されて再開するのを待つ。"
9802
9803 #. type: Plain text
9804 #: build/C/man2/wait.2:280
9805 msgid "The following flags may additionally be ORed in I<options>:"
9806 msgstr "さらに以下のフラグを論理和の形で I<options> に指定できる:"
9807
9808 #. type: Plain text
9809 #: build/C/man2/wait.2:284
9810 msgid "As for B<waitpid>()."
9811 msgstr "B<waitpid>()  と同様。"
9812
9813 #. type: TP
9814 #: build/C/man2/wait.2:284
9815 #, no-wrap
9816 msgid "B<WNOWAIT>"
9817 msgstr "B<WNOWAIT>"
9818
9819 #. type: Plain text
9820 #: build/C/man2/wait.2:288
9821 msgid "Leave the child in a waitable state; a later wait call can be used to again retrieve the child status information."
9822 msgstr "waitable 状態のプロセスをそのままにする。この後で wait コールを 使って、同じ子プロセスの状態情報をもう一度取得することができる。"
9823
9824 #. type: Plain text
9825 #: build/C/man2/wait.2:295
9826 msgid "Upon successful return, B<waitid>()  fills in the following fields of the I<siginfo_t> structure pointed to by I<infop>:"
9827 msgstr "成功した場合には、 B<waitid>()  は I<infop> が指す I<siginfo_t> 構造体の以下のフィールドを設定する:"
9828
9829 #. type: Plain text
9830 #: build/C/man2/wait.2:298
9831 msgid "The process ID of the child."
9832 msgstr "子プロセスのプロセスID。"
9833
9834 #. type: Plain text
9835 #: build/C/man2/wait.2:302
9836 msgid "The real user ID of the child.  (This field is not set on most other implementations.)"
9837 msgstr "子プロセスの実ユーザーID (このフィールドは他のほとんどの実装では設定されない)。"
9838
9839 #. type: Plain text
9840 #: build/C/man2/wait.2:306
9841 msgid "Always set to B<SIGCHLD>."
9842 msgstr "常に B<SIGCHLD> が設定される。"
9843
9844 #. type: TP
9845 #: build/C/man2/wait.2:306
9846 #, no-wrap
9847 msgid "I<si_status>"
9848 msgstr "I<si_status>"
9849
9850 #. type: Plain text
9851 #: build/C/man2/wait.2:316
9852 msgid "Either the exit status of the child, as given to B<_exit>(2)  (or B<exit>(3)), or the signal that caused the child to terminate, stop, or continue.  The I<si_code> field can be used to determine how to interpret this field."
9853 msgstr "B<_exit>(2)  (か B<exit>(3))  に指定された子プロセスの終了ステータス、もしくは 子プロセスの終了、停止、再開の原因となったシグナルが設定される。 このフィールドをどう解釈するかは、 I<si_code> フィールドを参照して決めることができる。"
9854
9855 #. type: Plain text
9856 #: build/C/man2/wait.2:333
9857 msgid "Set to one of: B<CLD_EXITED> (child called B<_exit>(2)); B<CLD_KILLED> (child killed by signal); B<CLD_DUMPED> (child killed by signal, and dumped core); B<CLD_STOPPED> (child stopped by signal); B<CLD_TRAPPED> (traced child has trapped); or B<CLD_CONTINUED> (child continued by B<SIGCONT>)."
9858 msgstr "以下のいずれかが設定される: B<CLD_EXITED> (子プロセスが B<_exit>(2)  を呼び出した); B<CLD_KILLED> (シグナルにより子プロセスが kill された); B<CLD_DUMPED> (シグナルにより子プロセスが kill され、コアダンプが行われた); B<CLD_STOPPED> (シグナルにより子プロセスが停止した); B<CLD_TRAPPED> (トレースされていた子プロセスがトラップを受信した); B<CLD_CONTINUED> (B<SIGCONT> により子プロセスが再開された)。"
9859
9860 #.  POSIX.1-2001 leaves this possibility unspecified; most
9861 #.  implementations (including Linux) zero out the structure
9862 #.  in this case, but at least one implementation (AIX 5.1)
9863 #.  does not -- MTK Nov 04
9864 #. type: Plain text
9865 #: build/C/man2/wait.2:355
9866 msgid "If B<WNOHANG> was specified in I<options> and there were no children in a waitable state, then B<waitid>()  returns 0 immediately and the state of the I<siginfo_t> structure pointed to by I<infop> is unspecified.  To distinguish this case from that where a child was in a waitable state, zero out the I<si_pid> field before the call and check for a nonzero value in this field after the call returns."
9867 msgstr "B<WNOHANG> が I<options> に指定されていて、 waitable 状態の子プロセスがなかった場合には、 B<waitid>()  はすぐに 0 を返す。このとき、 I<infop> が指す I<siginfo_t> 構造体の内容は不定である。 この場合を waitable 状態の子プロセスがあった場合と区別するには、 B<waitid>()  を呼び出す前に I<si_pid> を 0 にしておき、コールが復帰した後でこのフィールドが 0 以外の値かどうか をチェックすればよい。"
9868
9869 #. type: Plain text
9870 #: build/C/man2/wait.2:359
9871 msgid "B<wait>(): on success, returns the process ID of the terminated child; on error, -1 is returned."
9872 msgstr "B<wait>(): 成功すると、終了した子プロセスのプロセスID を返す。 エラーの場合 -1 を返す。"
9873
9874 #. type: Plain text
9875 #: build/C/man2/wait.2:368
9876 msgid "B<waitpid>(): on success, returns the process ID of the child whose state has changed; if B<WNOHANG> was specified and one or more child(ren) specified by I<pid> exist, but have not yet changed state, then 0 is returned.  On error, -1 is returned."
9877 msgstr "B<waitpid>(): 成功すると、状態が変化した子プロセスのプロセスID を返す。 B<WNOHANG> が指定されていて、 I<pid> で指示された子プロセスが一つ以上存在するが、どの子プロセスでも 状態変化が起こっていなかった場合は、 0 を返す。 エラーの場合 -1 を返す。"
9878
9879 #.  FIXME As reported by Vegard Nossum, if infop is NULL, then waitid()
9880 #.  returns the PID of the child.  Either this is a bug, or it is intended
9881 #.  behavior that needs to be documented.  See my Jan 2009 LKML mail
9882 #.  "waitid() return value strangeness when infop is NULL".
9883 #. type: Plain text
9884 #: build/C/man2/wait.2:381
9885 msgid "B<waitid>(): returns 0 on success or if B<WNOHANG> was specified and no child(ren) specified by I<id> has yet changed state; on error, -1 is returned."
9886 msgstr "B<waitid>(): 成功すると 0 を返す。 B<WNOHANG> が指定されていて、 I<pid> で指示された子プロセスで状態変化が起こっていなかった場合にも 0 を返す。"
9887
9888 #. type: Plain text
9889 #: build/C/man2/wait.2:385
9890 msgid "Each of these calls sets I<errno> to an appropriate value in the case of an error."
9891 msgstr "エラーの場合 -1 を返す。 エラーの場合、これらのシステムコールはいずれも I<errno> に適切な値を設定する。"
9892
9893 #. type: TP
9894 #: build/C/man2/wait.2:386 build/C/man2/wait.2:391
9895 #, no-wrap
9896 msgid "B<ECHILD>"
9897 msgstr "B<ECHILD>"
9898
9899 #. type: Plain text
9900 #: build/C/man2/wait.2:391
9901 msgid "(for B<wait>())  The calling process does not have any unwaited-for children."
9902 msgstr "(B<wait>()  の場合)  呼び出し元プロセスには、wait を行っていない子プロセスはない。"
9903
9904 #. type: Plain text
9905 #: build/C/man2/wait.2:411
9906 msgid "(for B<waitpid>()  or B<waitid>())  The process specified by I<pid> (B<waitpid>())  or I<idtype> and I<id> (B<waitid>())  does not exist or is not a child of the calling process.  (This can happen for one's own child if the action for B<SIGCHLD> is set to B<SIG_IGN>.  See also the I<Linux Notes> section about threads.)"
9907 msgstr "(B<waitpid>()  か B<waitid>()  の場合)  I<pid> (B<waitpid>())  か I<idtype> と I<id> (B<waitid>())  で指定したプロセスが存在しないか、呼び出し元プロセスの子プロセスでない (B<SIGCHLD> の動作に B<SIG_IGN> を設定した場合には、自分自身の子プロセスでも起こりうる。 スレッドに関しては「Linux での注意」の節も参照すること)。"
9908
9909 #. type: Plain text
9910 #: build/C/man2/wait.2:418
9911 msgid "B<WNOHANG> was not set and an unblocked signal or a B<SIGCHLD> was caught; see B<signal>(7)."
9912 msgstr "B<WNOHANG> が設定されておらず、禁止 (block) されていないシグナルや B<SIGCHLD> を受信した。 B<signal>(7)  参照。"
9913
9914 #. type: Plain text
9915 #: build/C/man2/wait.2:423
9916 msgid "The I<options> argument was invalid."
9917 msgstr "I<options> 引き数が不正である。"
9918
9919 #. type: Plain text
9920 #: build/C/man2/wait.2:438
9921 msgid "A child that terminates, but has not been waited for becomes a \"zombie\".  The kernel maintains a minimal set of information about the zombie process (PID, termination status, resource usage information)  in order to allow the parent to later perform a wait to obtain information about the child.  As long as a zombie is not removed from the system via a wait, it will consume a slot in the kernel process table, and if this table fills, it will not be possible to create further processes.  If a parent process terminates, then its \"zombie\" children (if any)  are adopted by B<init>(1), which automatically performs a wait to remove the zombies."
9922 msgstr "終了したが、wait されていない子プロセスは「ゾンビ」になる。 後で親プロセスが wait を実行して子プロセスについての情報を取得できるように、 カーネルはゾンビプロセスについて最小限の情報 (PID、終了ステータス、 リソース使用状況) を保持する。 ゾンビプロセスは、 wait によってシステムから削除されない限り、 カーネルのプロセステーブルの 1 エントリを消費する。このプロセステーブルが 一杯になると、新たにプロセスを作ることができなくなる。 親プロセスが終了すると、その親プロセスの「ゾンビ」の 子プロセスは (もしあれば)  B<init>(1)  の養子となる。 B<init>(1)  は wait を自動的に実行し、ゾンビを削除する。"
9923
9924 #. type: Plain text
9925 #: build/C/man2/wait.2:467
9926 msgid "POSIX.1-2001 specifies that if the disposition of B<SIGCHLD> is set to B<SIG_IGN> or the B<SA_NOCLDWAIT> flag is set for B<SIGCHLD> (see B<sigaction>(2)), then children that terminate do not become zombies and a call to B<wait>()  or B<waitpid>()  will block until all children have terminated, and then fail with I<errno> set to B<ECHILD>.  (The original POSIX standard left the behavior of setting B<SIGCHLD> to B<SIG_IGN> unspecified.  Note that even though the default disposition of B<SIGCHLD> is \"ignore\", explicitly setting the disposition to B<SIG_IGN> results in different treatment of zombie process children.)"
9927 msgstr "POSIX.1-2001 では以下のように規定されている。 B<SIGCHLD> の動作が B<SIG_IGN> に設定されたか、 B<SIGCHLD> に対して B<SA_NOCLDWAIT> フラグが設定された場合 (B<sigaction>(2)  参照)、終了した子プロセスはゾンビにはならず、 B<wait>()  や B<waitpid>()  の呼び出しは全ての子プロセスが終了するまで停止し、 子プロセスが全部終了した後 I<errno> に B<ECHILD> を設定して失敗する。 (もともとの POSIX 標準は B<SIGCHLD> に B<SIG_IGN> を設定した場合の振る舞いを未規定のままにしている。 B<SIGCHLD> のデフォルトの動作が「無視」であるにもかかわらず、 B<SIGCHLD> の動作として B<SIG_IGN> を明示的に設定した場合にはゾンビプロセスの子プロセスの扱いが 異なる点に注意すること。)"
9928
9929 #. type: Plain text
9930 #: build/C/man2/wait.2:480
9931 msgid "Linux 2.6 conforms to the POSIX requirements.  However, Linux 2.4 (and earlier) does not: if a B<wait>()  or B<waitpid>()  call is made while B<SIGCHLD> is being ignored, the call behaves just as though B<SIGCHLD> were not being ignored, that is, the call blocks until the next child terminates and then returns the process ID and status of that child."
9932 msgstr "Linux 2.6 はこの仕様に準拠している。 しかし、Linux 2.4 (とそれ以前のバージョン) はそうではない: B<SIGCHLD> が無視される状態で B<wait>()  または B<waitpid>()  が呼び出された場合、 B<SIGCHLD> が無視されていないかのように振る舞う。 つまり、呼び出しによって次の子プロセスの終了までブロックされ、 終了した子プロセスの PID と状態が返される。"
9933
9934 #. type: Plain text
9935 #: build/C/man2/wait.2:496
9936 msgid "In the Linux kernel, a kernel-scheduled thread is not a distinct construct from a process.  Instead, a thread is simply a process that is created using the Linux-unique B<clone>(2)  system call; other routines such as the portable B<pthread_create>(3)  call are implemented using B<clone>(2).  Before Linux 2.4, a thread was just a special case of a process, and as a consequence one thread could not wait on the children of another thread, even when the latter belongs to the same thread group.  However, POSIX prescribes such functionality, and since Linux 2.4 a thread can, and by default will, wait on children of other threads in the same thread group."
9937 msgstr "Linux カーネルでは、カーネルによってスケジュールされるスレッドは プロセスと明確に区別できる構成要素ではない。スレッドは Linux 固有の B<clone>(2)  システムコールを使用して生成されるプロセスに過ぎない。 移植性のある B<pthread_create>(3)  コールのような他のルーチンは B<clone>(2)  を使用して実装されている; これらでは B<waitid>()  を使うことはできない。 Linux 2.4 より前では、スレッドは単に特殊なプロセスであったので、 例え同じスレッドグループであっても、 あるスレッドが別のスレッドの子プロセスが終了するのを待つことは出来なかった。 しかし、POSIX ではこのような機能を規定しており、 Linux 2.4 以降では、あるスレッドが同じスレッドグループの他のスレッドの 子プロセスが終了するのを待つことができるようになった。 そして将来はこれがデフォルトの動作になるであろう。"
9938
9939 #. type: Plain text
9940 #: build/C/man2/wait.2:503
9941 msgid "The following Linux-specific I<options> are for use with children created using B<clone>(2); they cannot be used with B<waitid>():"
9942 msgstr "B<clone>(2)  を用いて作られた子プロセスには、以下の Linux 固有の I<options> が使用できる。"
9943
9944 #. type: TP
9945 #: build/C/man2/wait.2:503
9946 #, no-wrap
9947 msgid "B<__WCLONE>"
9948 msgstr "B<__WCLONE>"
9949
9950 #.  since 0.99pl10
9951 #. type: Plain text
9952 #: build/C/man2/wait.2:514
9953 msgid "Wait for \"clone\" children only.  If omitted, then wait for \"non-clone\" children only.  (A \"clone\" child is one which delivers no signal, or a signal other than B<SIGCHLD> to its parent upon termination.)  This option is ignored if B<__WALL> is also specified."
9954 msgstr "\"clone\" な子プロセスだけを待つ。 指定されなかった場合は非 \"clone\" な子プロセスだけを待つ (\"clone\" な子プロセスは、終了時に親プロセスへ全くシグナルを送らないか、 B<SIGCHLD> 以外のシグナルを送る)。 このオプションは B<__WALL> も指定された場合は無視される。"
9955
9956 #. type: TP
9957 #: build/C/man2/wait.2:514
9958 #, no-wrap
9959 msgid "B<__WALL> (since Linux 2.4)"
9960 msgstr "B<__WALL> (Linux 2.4 以降)"
9961
9962 #.  since patch-2.3.48
9963 #. type: Plain text
9964 #: build/C/man2/wait.2:519
9965 msgid "Wait for all children, regardless of type (\"clone\" or \"non-clone\")."
9966 msgstr "\"clone\" であるかないかに関わらず、 全ての子プロセスを待つ。"
9967
9968 #. type: TP
9969 #: build/C/man2/wait.2:519
9970 #, no-wrap
9971 msgid "B<__WNOTHREAD> (since Linux 2.4)"
9972 msgstr "B<__WNOTHREAD> (Linux 2.4 以降)"
9973
9974 #.  since patch-2.4.0-test8
9975 #. type: Plain text
9976 #: build/C/man2/wait.2:525
9977 msgid "Do not wait for children of other threads in the same thread group.  This was the default before Linux 2.4."
9978 msgstr "同じスレッドグループの他のスレッドの子プロセスは待たない。 Linux 2.4 より前ではデフォルトであった。"
9979
9980 #. type: Plain text
9981 #: build/C/man2/wait.2:537
9982 msgid "The raw B<waitid>()  system call takes a fifth argument, of type I<struct rusage\\ *>.  If this argument is non-NULL, then it is used to return resource usage information about the child, in the same manner as B<wait4>(2).  See B<getrusage>(2)  for details."
9983 msgstr "生の B<waitid>() システムコールは I<struct rusage\\ *> 型の第 5 引数を取る。 この引数が NULL 以外の場合、 この引数が子プロセスのリソース使用状況を返すのに使用される。 これは B<wait4>(2) と同じ方法である。 詳細は B<getrusage>(2) を参照。"
9984
9985 #. type: Plain text
9986 #: build/C/man2/wait.2:552
9987 msgid "According to POSIX.1-2008, an application calling B<waitid>()  must ensure that I<infop> points to a I<siginfo_t> structure (i.e., that it is a non-null pointer).  On Linux, if I<infop> is NULL, B<waitid>()  succeeds, and returns the process ID of the waited-for child.  Applications should avoid relying on this inconsistent, nonstandard, and unnecessary feature."
9988 msgstr "POSIX.1-2008 によると、 B<waitid>() を呼び出すアプリケーションは、 I<infop> が I<siginfo_t> 構造体を指していること (つまり I<infop> が NULL でないポインターであること) を保証しなければならない。 Linux では、 I<infop> が NULL の場合、 B<waitid>() は成功し、wait している子プロセスのプロセス ID を返す。 アプリケーションは、この食い違った、非標準で、不必要な機能に依存しないようにすべきである。"
9989
9990 #.  fork.2 refers to this example program.
9991 #. type: Plain text
9992 #: build/C/man2/wait.2:569
9993 msgid "The following program demonstrates the use of B<fork>(2)  and B<waitpid>().  The program creates a child process.  If no command-line argument is supplied to the program, then the child suspends its execution using B<pause>(2), to allow the user to send signals to the child.  Otherwise, if a command-line argument is supplied, then the child exits immediately, using the integer supplied on the command line as the exit status.  The parent process executes a loop that monitors the child using B<waitpid>(), and uses the W*() macros described above to analyze the wait status value."
9994 msgstr "以下のプログラムは、 B<fork>(2)  と B<waitpid>()  の使用方法の例を示している。 このプログラムでは子プロセスを生成する。 コマンドライン引き数が指定されなかったときは、 子プロセスは B<pause>(2)  を使ってその実行を一時停止し、ユーザーがその子プロセスに シグナルを送信できるようにする。 コマンドライン引き数が指定された場合は、 子プロセスは直ちに終了し、 コマンドラインで指定された整数を終了ステータスとして使用する。 親プロセスは、 B<waitpid>()  を使って子プロセスを監視し、 wait のステータス値を上記の W*() マクロを使って解析するという ループを実行する。"
9995
9996 #. type: Plain text
9997 #: build/C/man2/wait.2:585
9998 #, no-wrap
9999 msgid ""
10000 "$B< ./a.out &>\n"
10001 "Child PID is 32360\n"
10002 "[1] 32359\n"
10003 "$B< kill -STOP 32360>\n"
10004 "stopped by signal 19\n"
10005 "$B< kill -CONT 32360>\n"
10006 "continued\n"
10007 "$B< kill -TERM 32360>\n"
10008 "killed by signal 15\n"
10009 "[1]+  Done                    ./a.out\n"
10010 "$\n"
10011 msgstr ""
10012 "$B< ./a.out &>\n"
10013 "Child PID is 32360\n"
10014 "[1] 32359\n"
10015 "$B< kill -STOP 32360>\n"
10016 "stopped by signal 19\n"
10017 "$B< kill -CONT 32360>\n"
10018 "continued\n"
10019 "$B< kill -TERM 32360>\n"
10020 "killed by signal 15\n"
10021 "[1]+  Done                    ./a.out\n"
10022 "$\n"
10023
10024 #. type: Plain text
10025 #: build/C/man2/wait.2:594
10026 #, no-wrap
10027 msgid ""
10028 "#include E<lt>sys/wait.hE<gt>\n"
10029 "#include E<lt>stdlib.hE<gt>\n"
10030 "#include E<lt>unistd.hE<gt>\n"
10031 "#include E<lt>stdio.hE<gt>\n"
10032 msgstr ""
10033 "#include E<lt>sys/wait.hE<gt>\n"
10034 "#include E<lt>stdlib.hE<gt>\n"
10035 "#include E<lt>unistd.hE<gt>\n"
10036 "#include E<lt>stdio.hE<gt>\n"
10037
10038 #. type: Plain text
10039 #: build/C/man2/wait.2:600
10040 #, no-wrap
10041 msgid ""
10042 "int\n"
10043 "main(int argc, char *argv[])\n"
10044 "{\n"
10045 "    pid_t cpid, w;\n"
10046 "    int status;\n"
10047 msgstr ""
10048 "int\n"
10049 "main(int argc, char *argv[])\n"
10050 "{\n"
10051 "    pid_t cpid, w;\n"
10052 "    int status;\n"
10053
10054 #. type: Plain text
10055 #: build/C/man2/wait.2:606
10056 #, no-wrap
10057 msgid ""
10058 "    cpid = fork();\n"
10059 "    if (cpid == -1) {\n"
10060 "        perror(\"fork\");\n"
10061 "        exit(EXIT_FAILURE);\n"
10062 "    }\n"
10063 msgstr ""
10064 "    cpid = fork();\n"
10065 "    if (cpid == -1) {\n"
10066 "        perror(\"fork\");\n"
10067 "        exit(EXIT_FAILURE);\n"
10068 "    }\n"
10069
10070 #. type: Plain text
10071 #: build/C/man2/wait.2:612
10072 #, no-wrap
10073 msgid ""
10074 "    if (cpid == 0) {            /* Code executed by child */\n"
10075 "        printf(\"Child PID is %ld\\en\", (long) getpid());\n"
10076 "        if (argc == 1)\n"
10077 "            pause();                    /* Wait for signals */\n"
10078 "        _exit(atoi(argv[1]));\n"
10079 msgstr ""
10080 "    if (cpid == 0) {            /* Code executed by child */\n"
10081 "        printf(\"Child PID is %ld\\en\", (long) getpid());\n"
10082 "        if (argc == 1)\n"
10083 "            pause();                    /* Wait for signals */\n"
10084 "        _exit(atoi(argv[1]));\n"
10085
10086 #. type: Plain text
10087 #: build/C/man2/wait.2:620
10088 #, no-wrap
10089 msgid ""
10090 "    } else {                    /* Code executed by parent */\n"
10091 "        do {\n"
10092 "            w = waitpid(cpid, &status, WUNTRACED | WCONTINUED);\n"
10093 "            if (w == -1) {\n"
10094 "                perror(\"waitpid\");\n"
10095 "                exit(EXIT_FAILURE);\n"
10096 "            }\n"
10097 msgstr ""
10098 "    } else {                    /* Code executed by parent */\n"
10099 "        do {\n"
10100 "            w = waitpid(cpid, &status, WUNTRACED | WCONTINUED);\n"
10101 "            if (w == -1) {\n"
10102 "                perror(\"waitpid\");\n"
10103 "                exit(EXIT_FAILURE);\n"
10104 "            }\n"
10105
10106 #. type: Plain text
10107 #: build/C/man2/wait.2:634
10108 #, no-wrap
10109 msgid ""
10110 "            if (WIFEXITED(status)) {\n"
10111 "                printf(\"exited, status=%d\\en\", WEXITSTATUS(status));\n"
10112 "            } else if (WIFSIGNALED(status)) {\n"
10113 "                printf(\"killed by signal %d\\en\", WTERMSIG(status));\n"
10114 "            } else if (WIFSTOPPED(status)) {\n"
10115 "                printf(\"stopped by signal %d\\en\", WSTOPSIG(status));\n"
10116 "            } else if (WIFCONTINUED(status)) {\n"
10117 "                printf(\"continued\\en\");\n"
10118 "            }\n"
10119 "        } while (!WIFEXITED(status) && !WIFSIGNALED(status));\n"
10120 "        exit(EXIT_SUCCESS);\n"
10121 "    }\n"
10122 "}\n"
10123 msgstr ""
10124 "            if (WIFEXITED(status)) {\n"
10125 "                printf(\"exited, status=%d\\en\", WEXITSTATUS(status));\n"
10126 "            } else if (WIFSIGNALED(status)) {\n"
10127 "                printf(\"killed by signal %d\\en\", WTERMSIG(status));\n"
10128 "            } else if (WIFSTOPPED(status)) {\n"
10129 "                printf(\"stopped by signal %d\\en\", WSTOPSIG(status));\n"
10130 "            } else if (WIFCONTINUED(status)) {\n"
10131 "                printf(\"continued\\en\");\n"
10132 "            }\n"
10133 "        } while (!WIFEXITED(status) && !WIFSIGNALED(status));\n"
10134 "        exit(EXIT_SUCCESS);\n"
10135 "    }\n"
10136 "}\n"
10137
10138 #. type: Plain text
10139 #: build/C/man2/wait.2:647
10140 msgid "B<_exit>(2), B<clone>(2), B<fork>(2), B<kill>(2), B<ptrace>(2), B<sigaction>(2), B<signal>(2), B<wait4>(2), B<pthread_create>(3), B<credentials>(7), B<signal>(7)"
10141 msgstr "B<_exit>(2), B<clone>(2), B<fork>(2), B<kill>(2), B<ptrace>(2), B<sigaction>(2), B<signal>(2), B<wait4>(2), B<pthread_create>(3), B<credentials>(7), B<signal>(7)"
10142
10143 #. type: TH
10144 #: build/C/man2/wait4.2:33
10145 #, no-wrap
10146 msgid "WAIT4"
10147 msgstr "WAIT4"
10148
10149 #. type: TH
10150 #: build/C/man2/wait4.2:33
10151 #, no-wrap
10152 msgid "2012-09-23"
10153 msgstr "2012-09-23"
10154
10155 #. type: Plain text
10156 #: build/C/man2/wait4.2:36
10157 msgid "wait3, wait4 - wait for process to change state, BSD style"
10158 msgstr "wait3, wait4 - BSD スタイルでプロセスの状態変化を待つ"
10159
10160 #. type: Plain text
10161 #: build/C/man2/wait4.2:42
10162 #, no-wrap
10163 msgid ""
10164 "B<#include E<lt>sys/types.hE<gt>>\n"
10165 "B<#include E<lt>sys/time.hE<gt>>\n"
10166 "B<#include E<lt>sys/resource.hE<gt>>\n"
10167 "B<#include E<lt>sys/wait.hE<gt>>\n"
10168 msgstr ""
10169 "B<#include E<lt>sys/types.hE<gt>>\n"
10170 "B<#include E<lt>sys/time.hE<gt>>\n"
10171 "B<#include E<lt>sys/resource.hE<gt>>\n"
10172 "B<#include E<lt>sys/wait.hE<gt>>\n"
10173
10174 #. type: Plain text
10175 #: build/C/man2/wait4.2:45
10176 #, no-wrap
10177 msgid ""
10178 "B<pid_t wait3(int *>I<status>B<, int >I<options>B<,>\n"
10179 "B<            struct rusage *>I<rusage>B<);>\n"
10180 msgstr ""
10181 "B<pid_t wait3(int *>I<status>B<, int >I<options>B<,>\n"
10182 "B<            struct rusage *>I<rusage>B<);>\n"
10183
10184 #. type: Plain text
10185 #: build/C/man2/wait4.2:48
10186 #, no-wrap
10187 msgid ""
10188 "B<pid_t wait4(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<,>\n"
10189 "B<            struct rusage *>I<rusage>B<);>\n"
10190 msgstr ""
10191 "B<pid_t wait4(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<,>\n"
10192 "B<            struct rusage *>I<rusage>B<);>\n"
10193
10194 #. type: Plain text
10195 #: build/C/man2/wait4.2:57
10196 msgid "B<wait3>():"
10197 msgstr "B<wait3>():"
10198
10199 #. type: Plain text
10200 #: build/C/man2/wait4.2:63
10201 msgid "B<wait4>():"
10202 msgstr "B<wait4>():"
10203
10204 #. type: Plain text
10205 #: build/C/man2/wait4.2:65
10206 msgid "_BSD_SOURCE"
10207 msgstr "_BSD_SOURCE"
10208
10209 #. type: Plain text
10210 #: build/C/man2/wait4.2:73
10211 msgid "These functions are obsolete; use B<waitpid>(2)  or B<waitid>(2)  in new programs."
10212 msgstr "これらの関数は廃止予定である。 新しいプログラムでは B<waitpid>(2) や B<waitid>(2) を使用すること。"
10213
10214 #. type: Plain text
10215 #: build/C/man2/wait4.2:83
10216 msgid "The B<wait3>()  and B<wait4>()  system calls are similar to B<waitpid>(2), but additionally return resource usage information about the child in the structure pointed to by I<rusage>."
10217 msgstr "システムコール B<wait3>()  と B<wait4>()  は B<waitpid>(2)  と同様の動作をする。それに加え、子プロセスのリソース使用状況の情報を I<rusage> が指す構造体に入れて返す。"
10218
10219 #. type: Plain text
10220 #: build/C/man2/wait4.2:89
10221 msgid "Other than the use of the I<rusage> argument, the following B<wait3>()  call:"
10222 msgstr "I<rusage> を使用する点を除けば、次の B<wait3>()  の呼び出し"
10223
10224 #. type: Plain text
10225 #: build/C/man2/wait4.2:92
10226 #, no-wrap
10227 msgid "    wait3(status, options, rusage);\n"
10228 msgstr "    wait3(status, options, rusage);\n"
10229
10230 #. type: Plain text
10231 #: build/C/man2/wait4.2:95 build/C/man2/wait4.2:109
10232 msgid "is equivalent to:"
10233 msgstr "は以下と等価である。"
10234
10235 #. type: Plain text
10236 #: build/C/man2/wait4.2:98
10237 #, no-wrap
10238 msgid "    waitpid(-1, status, options);\n"
10239 msgstr "    waitpid(-1, status, options);\n"
10240
10241 #. type: Plain text
10242 #: build/C/man2/wait4.2:103
10243 msgid "Similarly, the following B<wait4>()  call:"
10244 msgstr "同様に、次の B<wait4>()  の呼び出し"
10245
10246 #. type: Plain text
10247 #: build/C/man2/wait4.2:106
10248 #, no-wrap
10249 msgid "    wait4(pid, status, options, rusage);\n"
10250 msgstr "    wait4(pid, status, options, rusage);\n"
10251
10252 #. type: Plain text
10253 #: build/C/man2/wait4.2:112
10254 #, no-wrap
10255 msgid "    waitpid(pid, status, options);\n"
10256 msgstr "    waitpid(pid, status, options);\n"
10257
10258 #. type: Plain text
10259 #: build/C/man2/wait4.2:122
10260 msgid "In other words, B<wait3>()  waits of any child, while B<wait4>()  can be used to select a specific child, or children, on which to wait.  See B<wait>(2)  for further details."
10261 msgstr "言い換えると、 B<wait3>()  は全ての子プロセスを対象に待つが、 B<wait4>()  では特定の子プロセス (複数可) を選んで待つことができる。"
10262
10263 #. type: Plain text
10264 #: build/C/man2/wait4.2:132
10265 msgid "If I<rusage> is not NULL, the I<struct rusage> to which it points will be filled with accounting information about the child.  See B<getrusage>(2)  for details."
10266 msgstr "I<rusage> が NULL でない場合、 I<rusage> が指す I<rusage 構造体> には子プロセスのアカウント情報が格納される。 詳しくは B<getrusage>(2)  を参照のこと。"
10267
10268 #. type: Plain text
10269 #: build/C/man2/wait4.2:135 build/C/man2/wait4.2:138
10270 msgid "As for B<waitpid>(2)."
10271 msgstr "B<waitpid>(2)  と同様。"
10272
10273 #. type: Plain text
10274 #: build/C/man2/wait4.2:140
10275 msgid "4.3BSD."
10276 msgstr "4.3BSD."
10277
10278 #. type: Plain text
10279 #: build/C/man2/wait4.2:147
10280 msgid "SUSv1 included a specification of B<wait3>(); SUSv2 included B<wait3>(), but marked it LEGACY; SUSv3 removed it."
10281 msgstr "SUSv1 には B<wait3>() の規定があった。 SUSv2 には B<wait3>() が含まれていたが、「過去の名残 (LEGACY)」となっていた。 SUSv3 では B<wait3>() は削除された。"
10282
10283 #. type: Plain text
10284 #: build/C/man2/wait4.2:159
10285 msgid "Including I<E<lt>sys/time.hE<gt>> is not required these days, but increases portability.  (Indeed, I<E<lt>sys/resource.hE<gt>> defines the I<rusage> structure with fields of type I<struct timeval> defined in I<E<lt>sys/time.hE<gt>>.)"
10286 msgstr "現在では I<E<lt>sys/time.hE<gt>> をインクルードする必要はないが、インクルードしておくと 移植性を高めることができる (実際には I<E<lt>sys/resource.hE<gt>> で I<rusage> 構造体が定義されているが、そのフィールドで使用されている I<struct timeval> 型は I<E<lt>sys/time.hE<gt>> で定義されている)。"
10287
10288 #. type: Plain text
10289 #: build/C/man2/wait4.2:165
10290 msgid "On Linux, B<wait3>()  is a library function implemented on top of the B<wait4>()  system call."
10291 msgstr "Linux では、 B<wait3>()  はライブラリ関数であり、 B<wait4>()  システムコールを使って実装されている。"
10292
10293 #. type: Plain text
10294 #: build/C/man2/wait4.2:172
10295 msgid "B<fork>(2), B<getrusage>(2), B<sigaction>(2), B<signal>(2), B<wait>(2), B<signal>(7)"
10296 msgstr "B<fork>(2), B<getrusage>(2), B<sigaction>(2), B<signal>(2), B<wait>(2), B<signal>(7)"