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.
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2012-05-28 07:17+0900\n"
10 "PO-Revision-Date: 2012-06-22 14:02+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
19 #: build/C/man3/bsd_signal.3:23
25 #: build/C/man3/bsd_signal.3:23 build/C/man2/getitimer.2:7
31 #: build/C/man3/bsd_signal.3:23 build/C/man2/eventfd.2:21
32 #: build/C/man2/getitimer.2:7 build/C/man3/gsignal.3:25 build/C/man2/kill.2:44
33 #: build/C/man2/killpg.2:40 build/C/man2/pause.2:30 build/C/man2/prctl.2:48
34 #: build/C/man3/profil.3:28 build/C/man3/psignal.3:28 build/C/man3/raise.3:27
35 #: build/C/man2/rt_sigqueueinfo.2:23 build/C/man2/sgetmask.2:24
36 #: build/C/man2/sigaction.2:45 build/C/man2/sigaltstack.2:25
37 #: build/C/man7/sigevent.7:24 build/C/man3/siginterrupt.3:29
38 #: build/C/man2/signal.2:34 build/C/man7/signal.7:44
39 #: build/C/man2/signalfd.2:19 build/C/man3/sigpause.3:23
40 #: build/C/man2/sigpending.2:27 build/C/man2/sigprocmask.2:27
41 #: build/C/man3/sigqueue.3:26 build/C/man2/sigreturn.2:27
42 #: build/C/man3/sigset.3:24 build/C/man3/sigsetops.3:29
43 #: build/C/man2/sigsuspend.2:27 build/C/man3/sigvec.3:24
44 #: build/C/man3/sigwait.3:24 build/C/man2/sigwaitinfo.2:23
45 #: build/C/man3/sysv_signal.3:23 build/C/man2/timer_create.2:29
46 #: build/C/man2/timer_delete.2:23 build/C/man2/timer_getoverrun.2:23
47 #: build/C/man2/timer_settime.2:23 build/C/man2/timerfd_create.2:20
48 #: build/C/man2/tkill.2:29 build/C/man2/wait.2:50 build/C/man2/wait4.2:34
50 msgid "Linux Programmer's Manual"
51 msgstr "Linux Programmer's Manual"
54 #: build/C/man3/bsd_signal.3:24 build/C/man2/eventfd.2:22
55 #: build/C/man2/getitimer.2:8 build/C/man3/gsignal.3:26 build/C/man2/kill.2:45
56 #: build/C/man2/killpg.2:41 build/C/man2/pause.2:31 build/C/man2/prctl.2:49
57 #: build/C/man3/profil.3:29 build/C/man3/psignal.3:29 build/C/man3/raise.3:28
58 #: build/C/man2/rt_sigqueueinfo.2:24 build/C/man2/sgetmask.2:25
59 #: build/C/man2/sigaction.2:46 build/C/man2/sigaltstack.2:26
60 #: build/C/man7/sigevent.7:25 build/C/man3/siginterrupt.3:30
61 #: build/C/man2/signal.2:35 build/C/man7/signal.7:45
62 #: build/C/man2/signalfd.2:20 build/C/man3/sigpause.3:24
63 #: build/C/man2/sigpending.2:28 build/C/man2/sigprocmask.2:28
64 #: build/C/man3/sigqueue.3:27 build/C/man2/sigreturn.2:28
65 #: build/C/man3/sigset.3:25 build/C/man3/sigsetops.3:30
66 #: build/C/man2/sigsuspend.2:28 build/C/man3/sigvec.3:25
67 #: build/C/man3/sigwait.3:25 build/C/man2/sigwaitinfo.2:24
68 #: build/C/man3/sysv_signal.3:24 build/C/man2/timer_create.2:30
69 #: build/C/man2/timer_delete.2:24 build/C/man2/timer_getoverrun.2:24
70 #: build/C/man2/timer_settime.2:24 build/C/man2/timerfd_create.2:21
71 #: build/C/man2/tkill.2:30 build/C/man2/wait.2:51 build/C/man2/wait4.2:35
77 #: build/C/man3/bsd_signal.3:26
78 msgid "bsd_signal - signal handling with BSD semantics"
79 msgstr "bsd_signal - BSD 方式のシグナル処理"
82 #: build/C/man3/bsd_signal.3:26 build/C/man2/eventfd.2:24
83 #: build/C/man2/getitimer.2:10 build/C/man3/gsignal.3:28
84 #: build/C/man2/kill.2:47 build/C/man2/killpg.2:43 build/C/man2/pause.2:33
85 #: build/C/man2/prctl.2:51 build/C/man3/profil.3:31 build/C/man3/psignal.3:31
86 #: build/C/man3/raise.3:30 build/C/man2/rt_sigqueueinfo.2:26
87 #: build/C/man2/sgetmask.2:27 build/C/man2/sigaction.2:48
88 #: build/C/man2/sigaltstack.2:28 build/C/man7/sigevent.7:27
89 #: build/C/man3/siginterrupt.3:32 build/C/man2/signal.2:37
90 #: build/C/man2/signalfd.2:22 build/C/man3/sigpause.3:26
91 #: build/C/man2/sigpending.2:30 build/C/man2/sigprocmask.2:30
92 #: build/C/man3/sigqueue.3:29 build/C/man2/sigreturn.2:30
93 #: build/C/man3/sigset.3:27 build/C/man3/sigsetops.3:33
94 #: build/C/man2/sigsuspend.2:30 build/C/man3/sigvec.3:27
95 #: build/C/man3/sigwait.3:27 build/C/man2/sigwaitinfo.2:26
96 #: build/C/man3/sysv_signal.3:26 build/C/man2/timer_create.2:32
97 #: build/C/man2/timer_delete.2:26 build/C/man2/timer_getoverrun.2:26
98 #: build/C/man2/timer_settime.2:27 build/C/man2/timerfd_create.2:24
99 #: build/C/man2/tkill.2:32 build/C/man2/wait.2:53 build/C/man2/wait4.2:37
105 #: build/C/man3/bsd_signal.3:28
106 msgid "B<#define _XOPEN_SOURCE> /* See feature_test_macros(7) */"
107 msgstr "B<#define _XOPEN_SOURCE> /* feature_test_macros(7) 参照 */"
110 #: build/C/man3/bsd_signal.3:30 build/C/man2/killpg.2:45
111 #: build/C/man2/sigaltstack.2:30 build/C/man2/signal.2:39
112 #: build/C/man2/sigpending.2:32 build/C/man2/sigprocmask.2:32
113 #: build/C/man3/sigqueue.3:31 build/C/man3/sigset.3:29
114 #: build/C/man3/sigsetops.3:35 build/C/man2/sigsuspend.2:32
115 #: build/C/man3/sigvec.3:29 build/C/man3/sysv_signal.3:30
116 msgid "B<#include E<lt>signal.hE<gt>>"
117 msgstr "B<#include E<lt>signal.hE<gt>>"
120 #: build/C/man3/bsd_signal.3:32 build/C/man2/signal.2:41
121 #: build/C/man3/sigset.3:31 build/C/man3/sysv_signal.3:32
122 msgid "B<typedef void (*sighandler_t)(int);>"
123 msgstr "B<typedef void (*sighandler_t)(int);>"
126 #: build/C/man3/bsd_signal.3:34
128 "B<sighandler_t bsd_signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
130 "B<sighandler_t bsd_signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
133 #: build/C/man3/bsd_signal.3:34 build/C/man2/eventfd.2:28
134 #: build/C/man2/getitimer.2:19 build/C/man3/gsignal.3:47
135 #: build/C/man2/kill.2:65 build/C/man2/killpg.2:59 build/C/man2/pause.2:37
136 #: build/C/man2/prctl.2:58 build/C/man3/profil.3:44 build/C/man3/psignal.3:54
137 #: build/C/man3/raise.3:36 build/C/man2/rt_sigqueueinfo.2:33
138 #: build/C/man2/sgetmask.2:31 build/C/man2/sigaction.2:65
139 #: build/C/man2/sigaltstack.2:49 build/C/man7/sigevent.7:50
140 #: build/C/man3/siginterrupt.3:53 build/C/man2/signal.2:43
141 #: build/C/man7/signal.7:47 build/C/man2/signalfd.2:26
142 #: build/C/man3/sigpause.3:34 build/C/man2/sigpending.2:44
143 #: build/C/man2/sigprocmask.2:45 build/C/man3/sigqueue.3:41
144 #: build/C/man2/sigreturn.2:32 build/C/man3/sigset.3:56
145 #: build/C/man3/sigsetops.3:61 build/C/man2/sigsuspend.2:44
146 #: build/C/man3/sigvec.3:47 build/C/man3/sigwait.3:43
147 #: build/C/man2/sigwaitinfo.2:44 build/C/man3/sysv_signal.3:34
148 #: build/C/man2/timer_create.2:50 build/C/man2/timer_delete.2:42
149 #: build/C/man2/timer_getoverrun.2:42 build/C/man2/timer_settime.2:47
150 #: build/C/man2/timerfd_create.2:36 build/C/man2/tkill.2:38
151 #: build/C/man2/wait.2:82 build/C/man2/wait4.2:68
157 #: build/C/man3/bsd_signal.3:39
159 "The B<bsd_signal>() function takes the same arguments, and performs the "
160 "same task, as B<signal>(2)."
162 "B<bsd_signal>() 関数は B<signal>(2) と同じ引き数をとり、同じ処理を実行す"
166 #: build/C/man3/bsd_signal.3:52
168 "The difference between the two is that B<bsd_signal>() is guaranteed to "
169 "provide reliable signal semantics, that is: a) the disposition of the signal "
170 "is not reset to the default when the handler is invoked; b) delivery of "
171 "further instances of the signal is blocked while the signal handler is "
172 "executing; and c) if the handler interrupts a blocking system call, then the "
173 "system call is automatically restarted. A portable application cannot rely "
174 "on B<signal>(2) to provide these guarantees."
176 "両者の違いは、 B<bsd_signal>() では信頼性のあるシグナル処理方式の提供が保証"
177 "されていることである。 信頼性のあるシグナル処理方式は以下の特徴を持つ。 a) ハ"
178 "ンドラが起動された場合に、シグナルの処理方法 (disposition) が デフォルトにリ"
179 "セットされない、 b) シグナルハンドラの実行中は、それ以降に発生した同じシグナ"
180 "ルの配送が ブロックされない、 c) ハンドラが停止中の (blocking している) シス"
181 "テムコールを 中断した場合、そのシステムコールが自動的に再開される。 移植性が"
182 "必要なアプリケーションでは、 B<signal>(2) でこれらが保証されることを前提にす"
186 #: build/C/man3/bsd_signal.3:52 build/C/man2/eventfd.2:222
187 #: build/C/man2/getitimer.2:117 build/C/man2/kill.2:99
188 #: build/C/man2/killpg.2:88 build/C/man2/pause.2:42 build/C/man2/prctl.2:546
189 #: build/C/man3/profil.3:66 build/C/man3/psignal.3:87 build/C/man3/raise.3:59
190 #: build/C/man2/rt_sigqueueinfo.2:124 build/C/man2/sgetmask.2:54
191 #: build/C/man2/sigaction.2:656 build/C/man2/sigaltstack.2:131
192 #: build/C/man3/siginterrupt.3:71 build/C/man2/signal.2:95
193 #: build/C/man2/signalfd.2:248 build/C/man3/sigpause.3:46
194 #: build/C/man2/sigpending.2:51 build/C/man2/sigprocmask.2:91
195 #: build/C/man3/sigqueue.3:81 build/C/man2/sigreturn.2:51
196 #: build/C/man3/sigset.3:127 build/C/man3/sigsetops.3:105
197 #: build/C/man2/sigsuspend.2:68 build/C/man3/sigvec.3:197
198 #: build/C/man3/sigwait.3:66 build/C/man2/sigwaitinfo.2:101
199 #: build/C/man3/sysv_signal.3:49 build/C/man2/timer_create.2:165
200 #: build/C/man2/timer_delete.2:50 build/C/man2/timer_getoverrun.2:79
201 #: build/C/man2/timer_settime.2:169 build/C/man2/timerfd_create.2:286
202 #: build/C/man2/tkill.2:69 build/C/man2/wait.2:354 build/C/man2/wait4.2:127
208 #: build/C/man3/bsd_signal.3:58
210 "The B<bsd_signal>() function returns the previous value of the signal "
211 "handler, or B<SIG_ERR> on error."
213 "B<bsd_signal>() 関数はシグナルハンドラの直前の値を返す。 エラーの場合、 "
217 #: build/C/man3/bsd_signal.3:58 build/C/man2/eventfd.2:229
218 #: build/C/man2/getitimer.2:122 build/C/man2/kill.2:104
219 #: build/C/man2/killpg.2:93 build/C/man2/pause.2:53 build/C/man2/prctl.2:563
220 #: build/C/man2/rt_sigqueueinfo.2:129 build/C/man2/sgetmask.2:59
221 #: build/C/man2/sigaction.2:659 build/C/man2/sigaltstack.2:135
222 #: build/C/man3/siginterrupt.3:76 build/C/man2/signal.2:100
223 #: build/C/man2/signalfd.2:262 build/C/man2/sigpending.2:54
224 #: build/C/man2/sigprocmask.2:94 build/C/man3/sigqueue.3:89
225 #: build/C/man3/sigset.3:152 build/C/man3/sigsetops.3:121
226 #: build/C/man2/sigsuspend.2:72 build/C/man3/sigvec.3:214
227 #: build/C/man3/sigwait.3:71 build/C/man2/sigwaitinfo.2:110
228 #: build/C/man3/sysv_signal.3:55 build/C/man2/timer_create.2:173
229 #: build/C/man2/timer_delete.2:57 build/C/man2/timer_getoverrun.2:87
230 #: build/C/man2/timer_settime.2:178 build/C/man2/timerfd_create.2:301
231 #: build/C/man2/tkill.2:73 build/C/man2/wait.2:383 build/C/man2/wait4.2:130
237 #: build/C/man3/bsd_signal.3:61 build/C/man3/sysv_signal.3:58
238 msgid "As for B<signal>(2)."
239 msgstr "B<signal>(2) と同じ。"
242 #: build/C/man3/bsd_signal.3:61 build/C/man2/eventfd.2:266
243 #: build/C/man2/getitimer.2:143 build/C/man3/gsignal.3:93
244 #: build/C/man2/kill.2:120 build/C/man2/killpg.2:110 build/C/man2/pause.2:57
245 #: build/C/man2/prctl.2:725 build/C/man3/profil.3:68 build/C/man3/psignal.3:97
246 #: build/C/man3/raise.3:62 build/C/man2/rt_sigqueueinfo.2:171
247 #: build/C/man2/sgetmask.2:61 build/C/man2/sigaction.2:671
248 #: build/C/man2/sigaltstack.2:154 build/C/man7/sigevent.7:128
249 #: build/C/man3/siginterrupt.3:80 build/C/man2/signal.2:105
250 #: build/C/man7/signal.7:836 build/C/man2/signalfd.2:304
251 #: build/C/man3/sigpause.3:54 build/C/man2/sigpending.2:59
252 #: build/C/man2/sigprocmask.2:107 build/C/man3/sigqueue.3:112
253 #: build/C/man2/sigreturn.2:58 build/C/man3/sigset.3:171
254 #: build/C/man3/sigsetops.3:126 build/C/man2/sigsuspend.2:80
255 #: build/C/man3/sigvec.3:219 build/C/man3/sigwait.3:77
256 #: build/C/man2/sigwaitinfo.2:129 build/C/man3/sysv_signal.3:58
257 #: build/C/man2/timer_create.2:191 build/C/man2/timer_delete.2:64
258 #: build/C/man2/timer_getoverrun.2:94 build/C/man2/timer_settime.2:203
259 #: build/C/man2/timerfd_create.2:370 build/C/man2/tkill.2:90
260 #: build/C/man2/wait.2:421 build/C/man2/wait4.2:133
262 msgid "CONFORMING TO"
266 #: build/C/man3/bsd_signal.3:68
268 "4.2BSD, POSIX.1-2001. POSIX.1-2008 removes the specification of "
269 "B<bsd_signal>(), recommending the use of B<sigaction>(2) instead."
271 "4.2BSD, POSIX.1-2001. POSIX.1-2008 では B<bsd_signal>() の仕様が削除されて"
272 "いる。 代わりに、 B<sigaction>(2) の使用が推奨されている。"
275 #: build/C/man3/bsd_signal.3:68 build/C/man2/eventfd.2:271
276 #: build/C/man2/getitimer.2:153 build/C/man2/kill.2:122
277 #: build/C/man2/killpg.2:114 build/C/man3/raise.3:64
278 #: build/C/man2/rt_sigqueueinfo.2:173 build/C/man2/sgetmask.2:63
279 #: build/C/man2/sigaction.2:674 build/C/man2/sigaltstack.2:156
280 #: build/C/man2/signal.2:107 build/C/man2/signalfd.2:309
281 #: build/C/man3/sigpause.3:58 build/C/man2/sigpending.2:61
282 #: build/C/man2/sigprocmask.2:109 build/C/man3/sigqueue.3:114
283 #: build/C/man2/sigreturn.2:62 build/C/man3/sigset.3:188
284 #: build/C/man3/sigsetops.3:128 build/C/man2/sigsuspend.2:82
285 #: build/C/man3/sigvec.3:225 build/C/man3/sigwait.3:79
286 #: build/C/man2/sigwaitinfo.2:131 build/C/man3/sysv_signal.3:60
287 #: build/C/man2/timer_create.2:193 build/C/man2/timer_getoverrun.2:96
288 #: build/C/man2/tkill.2:96 build/C/man2/wait.2:423 build/C/man2/wait4.2:135
294 #: build/C/man3/bsd_signal.3:74
296 "Use of B<bsd_signal>() should be avoided; use B<sigaction>(2) instead."
298 "B<bsd_signal>() の使用は避けるべきである。代わりに B<sigaction>(2) を使うこ"
302 #: build/C/man3/bsd_signal.3:85
304 "On modern Linux systems, B<bsd_signal>() and B<signal>(2) are equivalent. "
305 "But on older systems, B<signal>(2) provided unreliable signal semantics; "
306 "see B<signal>(2) for details."
308 "最近の Linux システムでは、 B<bsd_signal>() と B<signal>(2) は等価である。"
309 "しかし、以前のシステムでは、 B<signal>(2) は信頼性に欠けるシグナル処理方式を"
310 "提供していた。 詳細は B<signal>(2) を参照。"
313 #: build/C/man3/bsd_signal.3:92 build/C/man3/sysv_signal.3:85
315 "The use of I<sighandler_t> is a GNU extension; this type is only defined if "
316 "the B<_GNU_SOURCE> feature test macro is defined."
318 "I<sighandler_t> を使っているのは GNU による拡張である。 この型は機能検査マク"
319 "ロ B<_GNU_SOURCE> を定義した場合にのみ定義される。"
322 #: build/C/man3/bsd_signal.3:92 build/C/man2/eventfd.2:417
323 #: build/C/man2/getitimer.2:219 build/C/man3/gsignal.3:101
324 #: build/C/man2/kill.2:170 build/C/man2/killpg.2:133 build/C/man2/pause.2:59
325 #: build/C/man2/prctl.2:739 build/C/man3/profil.3:79
326 #: build/C/man3/psignal.3:111 build/C/man3/raise.3:75
327 #: build/C/man2/rt_sigqueueinfo.2:183 build/C/man2/sgetmask.2:74
328 #: build/C/man2/sigaction.2:787 build/C/man2/sigaltstack.2:230
329 #: build/C/man7/sigevent.7:130 build/C/man3/siginterrupt.3:89
330 #: build/C/man2/signal.2:260 build/C/man7/signal.7:848
331 #: build/C/man2/signalfd.2:430 build/C/man3/sigpause.3:96
332 #: build/C/man2/sigpending.2:82 build/C/man2/sigprocmask.2:139
333 #: build/C/man3/sigqueue.3:147 build/C/man2/sigreturn.2:72
334 #: build/C/man3/sigset.3:264 build/C/man3/sigsetops.3:166
335 #: build/C/man2/sigsuspend.2:104 build/C/man3/sigvec.3:250
336 #: build/C/man3/sigwait.3:86 build/C/man2/sigwaitinfo.2:182
337 #: build/C/man3/sysv_signal.3:85 build/C/man2/timer_create.2:397
338 #: build/C/man2/timer_delete.2:66 build/C/man2/timer_getoverrun.2:128
339 #: build/C/man2/timer_settime.2:208 build/C/man2/timerfd_create.2:540
340 #: build/C/man2/tkill.2:105 build/C/man2/wait.2:605 build/C/man2/wait4.2:153
346 #: build/C/man3/bsd_signal.3:97
347 msgid "B<sigaction>(2), B<signal>(2), B<sysv_signal>(3), B<signal>(7)"
348 msgstr "B<sigaction>(2), B<signal>(2), B<sysv_signal>(3), B<signal>(7)"
351 #: build/C/man3/bsd_signal.3:97 build/C/man2/eventfd.2:428
352 #: build/C/man2/getitimer.2:226 build/C/man3/gsignal.3:105
353 #: build/C/man2/kill.2:180 build/C/man2/killpg.2:139 build/C/man2/pause.2:64
354 #: build/C/man2/prctl.2:742 build/C/man3/profil.3:84
355 #: build/C/man3/psignal.3:116 build/C/man3/raise.3:82
356 #: build/C/man2/rt_sigqueueinfo.2:191 build/C/man2/sgetmask.2:77
357 #: build/C/man2/sigaction.2:806 build/C/man2/sigaltstack.2:237
358 #: build/C/man7/sigevent.7:140 build/C/man3/siginterrupt.3:91
359 #: build/C/man2/signal.2:279 build/C/man7/signal.7:881
360 #: build/C/man2/signalfd.2:443 build/C/man3/sigpause.3:104
361 #: build/C/man2/sigpending.2:90 build/C/man2/sigprocmask.2:150
362 #: build/C/man3/sigqueue.3:155 build/C/man2/sigreturn.2:77
363 #: build/C/man3/sigset.3:274 build/C/man3/sigsetops.3:171
364 #: build/C/man2/sigsuspend.2:114 build/C/man3/sigvec.3:260
365 #: build/C/man3/sigwait.3:94 build/C/man2/sigwaitinfo.2:194
366 #: build/C/man3/sysv_signal.3:90 build/C/man2/timer_create.2:410
367 #: build/C/man2/timer_delete.2:72 build/C/man2/timer_getoverrun.2:138
368 #: build/C/man2/timer_settime.2:212 build/C/man2/timerfd_create.2:552
369 #: build/C/man2/tkill.2:110 build/C/man2/wait.2:617 build/C/man2/wait4.2:160
375 #: build/C/man3/bsd_signal.3:104 build/C/man2/eventfd.2:435
376 #: build/C/man2/getitimer.2:233 build/C/man3/gsignal.3:112
377 #: build/C/man2/kill.2:187 build/C/man2/killpg.2:146 build/C/man2/pause.2:71
378 #: build/C/man2/prctl.2:749 build/C/man3/profil.3:91
379 #: build/C/man3/psignal.3:123 build/C/man3/raise.3:89
380 #: build/C/man2/rt_sigqueueinfo.2:198 build/C/man2/sgetmask.2:84
381 #: build/C/man2/sigaction.2:813 build/C/man2/sigaltstack.2:244
382 #: build/C/man7/sigevent.7:147 build/C/man3/siginterrupt.3:98
383 #: build/C/man2/signal.2:286 build/C/man7/signal.7:888
384 #: build/C/man2/signalfd.2:450 build/C/man3/sigpause.3:111
385 #: build/C/man2/sigpending.2:97 build/C/man2/sigprocmask.2:157
386 #: build/C/man3/sigqueue.3:162 build/C/man2/sigreturn.2:84
387 #: build/C/man3/sigset.3:281 build/C/man3/sigsetops.3:178
388 #: build/C/man2/sigsuspend.2:121 build/C/man3/sigvec.3:267
389 #: build/C/man3/sigwait.3:101 build/C/man2/sigwaitinfo.2:201
390 #: build/C/man3/sysv_signal.3:97 build/C/man2/timer_create.2:417
391 #: build/C/man2/timer_delete.2:79 build/C/man2/timer_getoverrun.2:145
392 #: build/C/man2/timer_settime.2:219 build/C/man2/timerfd_create.2:559
393 #: build/C/man2/tkill.2:117 build/C/man2/wait.2:624 build/C/man2/wait4.2:167
395 "This page is part of release 3.41 of the Linux I<man-pages> project. A "
396 "description of the project, and information about reporting bugs, can be "
397 "found at http://www.kernel.org/doc/man-pages/."
399 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.41 の一部\n"
400 "である。プロジェクトの説明とバグ報告に関する情報は\n"
401 "http://www.kernel.org/doc/man-pages/ に書かれている。"
404 #: build/C/man2/eventfd.2:21
410 #: build/C/man2/eventfd.2:21
416 #: build/C/man2/eventfd.2:21 build/C/man2/getitimer.2:7 build/C/man2/kill.2:44
417 #: build/C/man2/killpg.2:40 build/C/man2/pause.2:30 build/C/man2/prctl.2:48
418 #: build/C/man3/profil.3:28 build/C/man2/rt_sigqueueinfo.2:23
419 #: build/C/man2/sgetmask.2:24 build/C/man2/sigaction.2:45
420 #: build/C/man2/sigaltstack.2:25 build/C/man2/signal.2:34
421 #: build/C/man7/signal.7:44 build/C/man2/signalfd.2:19
422 #: build/C/man3/sigpause.3:23 build/C/man2/sigpending.2:27
423 #: build/C/man2/sigprocmask.2:27 build/C/man3/sigqueue.3:26
424 #: build/C/man2/sigreturn.2:27 build/C/man3/sigset.3:24
425 #: build/C/man3/sigsetops.3:29 build/C/man2/sigsuspend.2:27
426 #: build/C/man3/sigvec.3:24 build/C/man3/sigwait.3:24
427 #: build/C/man2/sigwaitinfo.2:23 build/C/man2/timer_create.2:29
428 #: build/C/man2/timer_delete.2:23 build/C/man2/timer_getoverrun.2:23
429 #: build/C/man2/timer_settime.2:23 build/C/man2/timerfd_create.2:20
430 #: build/C/man2/tkill.2:29 build/C/man2/wait.2:50 build/C/man2/wait4.2:34
436 #: build/C/man2/eventfd.2:24
437 msgid "eventfd - create a file descriptor for event notification"
438 msgstr "eventfd - イベント通知用のファイルディスクリプタを生成する"
441 #: build/C/man2/eventfd.2:26
442 msgid "B<#include E<lt>sys/eventfd.hE<gt>>"
443 msgstr "B<#include E<lt>sys/eventfd.hE<gt>>"
446 #: build/C/man2/eventfd.2:28
447 msgid "B<int eventfd(unsigned int >I<initval>B<, int >I<flags>B<);>"
448 msgstr "B<int eventfd(unsigned int >I<initval>B<, int >I<flags>B<);>"
451 #: build/C/man2/eventfd.2:38
453 "B<eventfd>() creates an \"eventfd object\" that can be used as an event "
454 "wait/notify mechanism by userspace applications, and by the kernel to notify "
455 "userspace applications of events. The object contains an unsigned 64-bit "
456 "integer (I<uint64_t>) counter that is maintained by the kernel. This "
457 "counter is initialized with the value specified in the argument I<initval>."
459 "B<eventfd>() は \"eventfd オブジェクト\" を生成する。 eventfd オブジェクトは"
460 "ユーザ空間アプリケーションがイベント待ち受け/通知用の 仕組みとして使うことが"
461 "できる。また、カーネルがユーザ空間アプリケーションに イベントを通知するために"
462 "も使うことができる。 このオブジェクトには、unsigned の 64 ビット整数 "
463 "(I<uint64_t>) 型のカウンタが含まれており、このカウンタはカーネルにより管理さ"
464 "れる。 このカウンタは I<initval> 引き数で指定された値で初期化される。"
467 #: build/C/man2/eventfd.2:43
469 "The following values may be bitwise ORed in I<flags> to change the behaviour "
472 "以下の値のいくつかをビット単位の論理和 (OR) で指定することで、\n"
473 "B<eventfd>() の振舞いを変更することができる。"
476 #: build/C/man2/eventfd.2:43
478 msgid "B<EFD_CLOEXEC> (since Linux 2.6.27)"
479 msgstr "B<EFD_CLOEXEC> (Linux 2.6.27 以降)"
482 #: build/C/man2/eventfd.2:53 build/C/man2/signalfd.2:94
483 #: build/C/man2/timerfd_create.2:102
485 "Set the close-on-exec (B<FD_CLOEXEC>) flag on the new file descriptor. See "
486 "the description of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this "
489 "新しいファイルディスクリプタに対して close-on-exec (B<FD_CLOEXEC>) フラグを"
490 "セットする。 このフラグが役に立つ理由については、 B<open>(2) の "
491 "B<O_CLOEXEC> フラグの説明を参照のこと。"
494 #: build/C/man2/eventfd.2:53
496 msgid "B<EFD_NONBLOCK> (since Linux 2.6.27)"
497 msgstr "B<EFD_NONBLOCK> (Linux 2.6.27 以降)"
500 #: build/C/man2/eventfd.2:61 build/C/man2/signalfd.2:84
501 #: build/C/man2/timerfd_create.2:92
503 "Set the B<O_NONBLOCK> file status flag on the new open file description. "
504 "Using this flag saves extra calls to B<fcntl>(2) to achieve the same result."
506 "新しく生成されるオープンファイル記述 (open file description) の "
507 "B<O_NONBLOCK> ファイルステータスフラグをセットする。 このフラグを使うこと"
508 "で、 B<O_NONBLOCK> をセットするために B<fcntl>(2) を追加で呼び出す必要がなく"
512 #: build/C/man2/eventfd.2:61
514 msgid "B<EFD_SEMAPHORE> (since Linux 2.6.30)"
515 msgstr "B<EFD_SEMAPHORE> (Linux 2.6.30 以降)"
518 #: build/C/man2/eventfd.2:65
520 "Provide semaphore-like semantics for reads from the new file descriptor. "
523 "新しいファイルディスクリプタからの読み出しにおいて、セマフォ風の動作を行う。\n"
527 #: build/C/man2/eventfd.2:69 build/C/man2/signalfd.2:98
529 "In Linux up to version 2.6.26, the I<flags> argument is unused, and must be "
532 "バージョン 2.6.26 以前の Linux では、 I<flags> 引き数は未使用であり、0 を指定"
536 #: build/C/man2/eventfd.2:75
538 "As its return value, B<eventfd>() returns a new file descriptor that can be "
539 "used to refer to the eventfd object. The following operations can be "
540 "performed on the file descriptor:"
542 "B<eventfd>() は eventfd オブジェクトを参照するのに使用できる新しいファイル"
543 "ディスクリプタ を返す。返されたファイルディスクリプタに対しては以下の操作を実"
547 #: build/C/man2/eventfd.2:75 build/C/man2/signalfd.2:101
548 #: build/C/man2/timerfd_create.2:210
554 #: build/C/man2/eventfd.2:85
556 "Each successful B<read>(2) returns an 8-byte integer. A B<read>(2) will "
557 "fail with the error B<EINVAL> if the size of the supplied buffer is less "
560 "B<read>(2) は成功すると、8 バイトの整数を返す。\n"
561 "渡されたバッファの大きさが 8 バイト未満の場合、\n"
562 "B<read>(2) はエラー B<EINVAL> で失敗する。"
565 #: build/C/man2/eventfd.2:90
567 "The value returned by B<read>(2) is in host byte order, i.e., the native "
568 "byte order for integers on the host machine."
570 "B<read>(2) が返す値は、ホストバイトオーダ、つまり\n"
571 "そのホストマシンにおける整数の通常のバイトオーダである。"
574 #: build/C/man2/eventfd.2:97
576 "The semantics of B<read>(2) depend on whether the eventfd counter currently "
577 "has a nonzero value and whether the B<EFD_SEMAPHORE> flag was specified when "
578 "creating the eventfd file descriptor:"
580 "B<read>(2) の動作は、 eventfd カウンタの現在の値が 0 以外であるかと、\n"
581 "eventfd ファイルディスクリプタを作成する際に B<EFD_SEMAPHORE> フラグが\n"
585 #: build/C/man2/eventfd.2:98 build/C/man2/eventfd.2:105
586 #: build/C/man2/eventfd.2:112 build/C/man2/eventfd.2:157
587 #: build/C/man2/eventfd.2:167 build/C/man2/eventfd.2:177
588 #: build/C/man2/prctl.2:606 build/C/man2/prctl.2:611 build/C/man2/prctl.2:616
589 #: build/C/man2/prctl.2:626 build/C/man3/psignal.3:103
590 #: build/C/man3/psignal.3:107 build/C/man2/sigaction.2:294
591 #: build/C/man2/sigaction.2:309 build/C/man2/sigaction.2:325
592 #: build/C/man2/sigaction.2:340 build/C/man2/sigaction.2:387
593 #: build/C/man2/sigaction.2:423 build/C/man2/signal.2:66
594 #: build/C/man2/signal.2:71 build/C/man2/signal.2:78 build/C/man2/signal.2:206
595 #: build/C/man2/signal.2:210 build/C/man2/signal.2:249
596 #: build/C/man7/signal.7:147 build/C/man7/signal.7:155
597 #: build/C/man7/signal.7:613 build/C/man7/signal.7:615
598 #: build/C/man7/signal.7:636 build/C/man7/signal.7:651
599 #: build/C/man7/signal.7:655 build/C/man7/signal.7:662
600 #: build/C/man7/signal.7:678 build/C/man7/signal.7:684
601 #: build/C/man7/signal.7:691 build/C/man7/signal.7:696
602 #: build/C/man7/signal.7:715 build/C/man7/signal.7:734
603 #: build/C/man7/signal.7:741 build/C/man7/signal.7:750
604 #: build/C/man7/signal.7:758 build/C/man7/signal.7:764
605 #: build/C/man7/signal.7:769 build/C/man7/signal.7:789
606 #: build/C/man7/signal.7:808 build/C/man7/signal.7:811
607 #: build/C/man7/signal.7:814 build/C/man7/signal.7:817
608 #: build/C/man7/signal.7:822 build/C/man7/signal.7:828
609 #: build/C/man7/signal.7:832 build/C/man3/sigwait.3:59
610 #: build/C/man3/sigwait.3:64 build/C/man2/timer_create.2:214
611 #: build/C/man2/timer_create.2:217 build/C/man2/timer_create.2:220
612 #: build/C/man2/timer_create.2:224 build/C/man2/timer_create.2:227
613 #: build/C/man2/timer_create.2:233 build/C/man2/timer_create.2:237
619 #: build/C/man2/eventfd.2:105
621 "If B<EFD_SEMAPHORE> was not specified and the eventfd counter has a nonzero "
622 "value, then a B<read>(2) returns 8 bytes containing that value, and the "
623 "counter's value is reset to zero."
625 "B<EFD_SEMAPHORE> が指定されておらず、eventfd カウンタが 0 以外の値\n"
626 "の場合、 B<read>(2) はカウンタ値を格納した 8 バイトの値を返し、\n"
630 #: build/C/man2/eventfd.2:112
632 "If B<EFD_SEMAPHORE> was specified and the eventfd counter has a nonzero "
633 "value, then a B<read>(2) returns 8 bytes containing the value 1, and the "
634 "counter's value is decremented by 1."
636 "B<EFD_SEMAPHORE> が指定されていて eventfd カウンタが 0 以外の値の場合、\n"
637 "B<read>(2) は値 1 の 8 バイト値を返し、カウンタ値は 1 減算される。"
640 #: build/C/man2/eventfd.2:122
642 "If the eventfd counter is zero at the time of the call to B<read>(2), then "
643 "the call either blocks until the counter becomes nonzero (at which time, the "
644 "B<read>(2) proceeds as described above) or fails with the error B<EAGAIN> "
645 "if the file descriptor has been made nonblocking."
647 "B<read>(2) を呼び出した時点で eventfd カウンタが 0 の場合、 B<read>(2)\n"
648 "はカウンタが 0 以外になるまで停止 (block) する (0 以外になった時点で\n"
649 "B<read>(2) は上記で述べた通り実行を再開する)、 もしくはファイルディスク\n"
650 "リプタが非停止 (nonblocking) に設定されている場合はエラー B<EAGAIN>で\n"
654 #: build/C/man2/eventfd.2:123
660 #: build/C/man2/eventfd.2:140
662 "A B<write>(2) call adds the 8-byte integer value supplied in its buffer to "
663 "the counter. The maximum value that may be stored in the counter is the "
664 "largest unsigned 64-bit value minus 1 (i.e., 0xfffffffffffffffe). If the "
665 "addition would cause the counter's value to exceed the maximum, then the "
666 "B<write>(2) either blocks until a B<read>(2) is performed on the file "
667 "descriptor, or fails with the error B<EAGAIN> if the file descriptor has "
668 "been made nonblocking."
670 "B<write>(2) は、引き数のバッファで渡された 8 バイトの整数値をカウンタに加算"
671 "する。 カウンタに格納可能な最大値は unsigned の 64 ビット整数の最大値から 1 "
672 "を引いた値 (すなわち 0xfffffffffffffffe) である。 加算を行うとカウンタ値が最"
673 "大値を超過する場合には、 そのファイルディスクリプタに対して B<read>(2) が実"
674 "行されるまで、 B<write>(2) は停止 (block) する、 もしくはファイルディスクリ"
675 "プタが非停止 (nonblocking) に設定されている場合はエラー B<EAGAIN> で失敗す"
679 #: build/C/man2/eventfd.2:147
681 "A B<write>(2) will fail with the error B<EINVAL> if the size of the "
682 "supplied buffer is less than 8 bytes, or if an attempt is made to write the "
683 "value 0xffffffffffffffff."
685 "渡されたバッファの大きさが 8 バイト未満の場合、もしくは 値 "
686 "0xffffffffffffffff を書き込もうとした場合、 B<write>(2) はエラー B<EINVAL> "
690 #: build/C/man2/eventfd.2:147 build/C/man2/signalfd.2:139
691 #: build/C/man2/timerfd_create.2:243
693 msgid "B<poll>(2), B<select>(2) (and similar)"
694 msgstr "B<poll>(2), B<select>(2) (と同様の操作)"
697 #: build/C/man2/eventfd.2:156
699 "The returned file descriptor supports B<poll>(2) (and analogously B<epoll>"
700 "(7)) and B<select>(2), as follows:"
702 "返されたファイルディスクリプタは、 B<poll>(2) (B<epoll>(7) も同じ) や "
703 "B<select>(2) をサポートしており、以下のような動作をする。"
706 #: build/C/man2/eventfd.2:167
708 "The file descriptor is readable (the B<select>(2) I<readfds> argument; the "
709 "B<poll>(2) B<POLLIN> flag) if the counter has a value greater than 0."
711 "カウンタが 0 より大きい値の場合、 ファイルディスクリプタは読み出し可能となる "
712 "(B<select>(2) の I<readfds> 引き数や B<poll>(2) の B<POLLIN> フラグ)。"
715 #: build/C/man2/eventfd.2:177
717 "The file descriptor is writable (the B<select>(2) I<writefds> argument; the "
718 "B<poll>(2) B<POLLOUT> flag) if it is possible to write a value of at least "
719 "\"1\" without blocking."
721 "少なくとも値 \"1\" を、停止 (block) を伴わずに書き込める場合、 ファイルディス"
722 "クリプタは書き込み可能となる (B<select>(2) の I<writefds> 引き数や B<poll>"
723 "(2) の B<POLLOUT> フラグ)。"
726 #: build/C/man2/eventfd.2:197
728 "If an overflow of the counter value was detected, then B<select>(2) "
729 "indicates the file descriptor as being both readable and writable, and "
730 "B<poll>(2) returns a B<POLLERR> event. As noted above, B<write>(2) can "
731 "never overflow the counter. However an overflow can occur if 2^64 eventfd "
732 "\"signal posts\" were performed by the KAIO subsystem (theoretically "
733 "possible, but practically unlikely). If an overflow has occurred, then "
734 "B<read>(2) will return that maximum I<uint64_t> value (i.e., "
735 "0xffffffffffffffff)."
737 "カウンタ値のオーバーフローが検出された場合、 B<select>(2) はファイルディスク"
738 "リプタは読み出し可能と書き込み可能の両方を通知し、 B<poll>(2) は B<POLLERR> "
739 "イベントを返す。 上述の通り、 B<write>(2) でカウンタがオーバーフローすること"
740 "は決してない。 しかしながら、 KAIO サブシステムによって 2^64 回の eventfd "
741 "\"signal posts\" が 実行された場合にはオーバーフローが起こり得る (理論的には"
742 "あり得るが、実用的にはあり得ない)。 オーバーフローが発生した場合、 B<read>"
743 "(2) は I<uint64_t> の最大値 (すなわち 0xffffffffffffffff) を返す。"
746 #: build/C/man2/eventfd.2:205
748 "The eventfd file descriptor also supports the other file-descriptor "
749 "multiplexing APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
751 "eventfd ファイルディスクリプタは、これ以外のファイルディスクリプタ 多重 API "
752 "である B<pselect>(2), B<ppoll>(2), B<epoll>(7) もサポートしている。"
755 #: build/C/man2/eventfd.2:205 build/C/man2/signalfd.2:159
756 #: build/C/man2/timerfd_create.2:261
762 #: build/C/man2/eventfd.2:210
764 "When the file descriptor is no longer required it should be closed. When "
765 "all file descriptors associated with the same eventfd object have been "
766 "closed, the resources for object are freed by the kernel."
768 "ファイルディスクリプタがそれ以降は必要なくなった際には、クローズすべきであ"
769 "る。 同じ eventfd オブジェクトに関連付けられたファイルディスクリプタが全て ク"
770 "ローズされると、そのオブジェクト用の資源がカーネルにより解放される。"
773 #: build/C/man2/eventfd.2:222
775 "A copy of the file descriptor created by B<eventfd>() is inherited by the "
776 "child produced by B<fork>(2). The duplicate file descriptor is associated "
777 "with the same eventfd object. File descriptors created by B<eventfd>() are "
778 "preserved across B<execve>(2), unless the close-on-exec flag has been set."
780 "B<fork>(2) で生成された子プロセスは、 B<eventfd>() で生成されたファイル\n"
781 "ディスクリプタのコピーを継承する。 複製されたファイルディスクリプタは同\n"
782 "じ eventfd オブジェクトに関連付けられる。\n"
783 "close-on-exec フラグが設定されていない場合、 B<execve>(2) の前後で\n"
784 "B<eventfd>() で生成されたファイルディスクリプタは保持される。"
787 #: build/C/man2/eventfd.2:229
789 "On success, B<eventfd>() returns a new eventfd file descriptor. On error, "
790 "-1 is returned and I<errno> is set to indicate the error."
792 "成功すると、 B<eventfd>() は新規の eventfd ファイルディスクリプタを返す。 エ"
793 "ラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
796 #: build/C/man2/eventfd.2:230 build/C/man2/getitimer.2:130
797 #: build/C/man2/kill.2:105 build/C/man2/killpg.2:94 build/C/man2/prctl.2:568
798 #: build/C/man2/prctl.2:573 build/C/man2/prctl.2:585 build/C/man2/prctl.2:590
799 #: build/C/man2/prctl.2:599 build/C/man2/rt_sigqueueinfo.2:136
800 #: build/C/man2/sigaction.2:664 build/C/man2/sigaltstack.2:140
801 #: build/C/man3/siginterrupt.3:77 build/C/man2/signal.2:101
802 #: build/C/man2/signalfd.2:268 build/C/man2/signalfd.2:276
803 #: build/C/man2/sigprocmask.2:102 build/C/man3/sigqueue.3:96
804 #: build/C/man3/sigsetops.3:122 build/C/man3/sigwait.3:72
805 #: build/C/man2/sigwaitinfo.2:125 build/C/man2/timer_create.2:177
806 #: build/C/man2/timer_delete.2:58 build/C/man2/timer_getoverrun.2:88
807 #: build/C/man2/timer_settime.2:187 build/C/man2/timer_settime.2:195
808 #: build/C/man2/timerfd_create.2:304 build/C/man2/timerfd_create.2:312
809 #: build/C/man2/timerfd_create.2:348 build/C/man2/timerfd_create.2:355
810 #: build/C/man2/timerfd_create.2:361 build/C/man2/tkill.2:74
811 #: build/C/man2/wait.2:416
817 #: build/C/man2/eventfd.2:234
818 msgid "An unsupported value was specified in I<flags>."
819 msgstr "I<flags> にサポートされていない値が指定された。"
822 #: build/C/man2/eventfd.2:234 build/C/man2/signalfd.2:283
823 #: build/C/man2/timerfd_create.2:319
829 #: build/C/man2/eventfd.2:237
830 msgid "The per-process limit on open file descriptors has been reached."
832 "オープン済みのファイルディスクリプタの数がプロセスあたりの上限に 達していた。"
835 #: build/C/man2/eventfd.2:237 build/C/man2/signalfd.2:286
836 #: build/C/man2/timerfd_create.2:322
842 #: build/C/man2/eventfd.2:241 build/C/man2/signalfd.2:290
843 #: build/C/man2/timerfd_create.2:326
845 "The system-wide limit on the total number of open files has been reached."
846 msgstr "オープン済みのファイル総数がシステム全体の上限に達していた。"
849 #: build/C/man2/eventfd.2:241 build/C/man2/signalfd.2:290
850 #: build/C/man2/timerfd_create.2:326
856 #: build/C/man2/eventfd.2:249 build/C/man2/signalfd.2:293
857 #: build/C/man2/timerfd_create.2:329
858 msgid "Could not mount (internal) anonymous inode device."
859 msgstr "(カーネル内の) 無名 inode デバイスをマウントできなかった。"
862 #: build/C/man2/eventfd.2:249 build/C/man2/sigaltstack.2:145
863 #: build/C/man2/signalfd.2:293 build/C/man2/timer_create.2:185
864 #: build/C/man2/timerfd_create.2:329
870 #: build/C/man2/eventfd.2:253
871 msgid "There was insufficient memory to create a new eventfd file descriptor."
873 "新しい eventfd ファイルディスクリプタを生成するのに十分なメモリがなかった。"
876 #: build/C/man2/eventfd.2:253 build/C/man2/prctl.2:720
877 #: build/C/man3/psignal.3:93 build/C/man2/rt_sigqueueinfo.2:164
878 #: build/C/man2/signalfd.2:296 build/C/man3/sigqueue.3:110
879 #: build/C/man2/timer_create.2:189 build/C/man2/timer_delete.2:62
880 #: build/C/man2/timer_getoverrun.2:92 build/C/man2/timer_settime.2:201
881 #: build/C/man2/timerfd_create.2:367 build/C/man2/tkill.2:85
886 #. eventfd() is in glibc 2.7, but reportedly does not build
888 #: build/C/man2/eventfd.2:266
890 "B<eventfd>() is available on Linux since kernel 2.6.22. Working support is "
891 "provided in glibc since version 2.8. The B<eventfd2>() system call (see "
892 "NOTES) is available on Linux since kernel 2.6.27. Since version 2.9, the "
893 "glibc B<eventfd>() wrapper will employ the B<eventfd2>() system call, if "
894 "it is supported by the kernel."
896 "B<eventfd>() はカーネル 2.6.22 以降の Linux で利用可能である。 正しく動作す"
897 "る glibc 側のサポートはバージョン 2.8 以降で提供されている。 B<eventfd2>() "
898 "システムコール (「注意」参照) は カーネル 2.6.27 以降の Linux で利用可能であ"
899 "る。 バージョン 2.9 以降では、glibc の B<eventfd>() のラッパー関数は、カーネ"
900 "ルが対応していれば B<eventfd2>() システムコールを利用する。"
903 #: build/C/man2/eventfd.2:271
904 msgid "B<eventfd>() and B<eventfd2>() are Linux-specific."
905 msgstr "B<eventfd>() と B<eventfd2>() は Linux 固有である。"
908 #: build/C/man2/eventfd.2:279
910 "Applications can use an eventfd file descriptor instead of a pipe (see "
911 "B<pipe>(2)) in all cases where a pipe is used simply to signal events. The "
912 "kernel overhead of an eventfd file descriptor is much lower than that of a "
913 "pipe, and only one file descriptor is required (versus the two required for "
916 "アプリケーションは、パイプをイベントを通知するためだけに使用している 全ての場"
917 "面において、パイプの代わりに eventfd ファイルディスクリプタを 使用することが"
918 "できる。 eventfd ファイルディスクリプタを使う方が、パイプを使う場合に比べて "
919 "カーネルでのオーバヘッドは比べるとずっと小さく、ファイルディスクリプタも 一つ"
920 "しか必要としない (パイプの場合は二つ必要である)。"
922 #. or eventually syslets/threadlets
924 #: build/C/man2/eventfd.2:285
926 "When used in the kernel, an eventfd file descriptor can provide a kernel-"
927 "userspace bridge allowing, for example, functionalities like KAIO (kernel "
928 "AIO) to signal to a file descriptor that some operation is complete."
930 "カーネル内で使用すると、eventfd ファイルディスクリプタは カーネル空間とユーザ"
931 "空間のブリッジ機能を提供することができ、 例えば KAIO (kernel AIO) のような機"
932 "能が、あるファイルディスクリプタに何らかの操作が完了したことを 通知することが"
936 #: build/C/man2/eventfd.2:302
938 "A key point about an eventfd file descriptor is that it can be monitored "
939 "just like any other file descriptor using B<select>(2), B<poll>(2), or "
940 "B<epoll>(7). This means that an application can simultaneously monitor the "
941 "readiness of \"traditional\" files and the readiness of other kernel "
942 "mechanisms that support the eventfd interface. (Without the B<eventfd>() "
943 "interface, these mechanisms could not be multiplexed via B<select>(2), "
944 "B<poll>(2), or B<epoll>(7).)"
946 "eventfd ファイルディスクリプタの重要な点は、 eventfd ファイルディスクリプタ"
947 "が B<select>(2), B<poll>(2), B<epoll>(7) を使って他のファイルディスクリプタ"
948 "と全く同様に監視できる点である。 このことは、アプリケーションは「従来の "
949 "(traditional)」 ファイルの状態変化と eventfd インタフェースをサポートする他の"
950 "カーネル機構の状態変化を同時に監視 できることを意味する (B<eventfd>() インタ"
951 "フェースがない時には、これらのカーネル機構は B<select>(2), B<poll>(2), "
952 "B<epoll>(7) 経由で多重することはできなかった)。"
955 #: build/C/man2/eventfd.2:302 build/C/man2/signalfd.2:333
957 msgid "Underlying Linux system calls"
958 msgstr "下層にある Linux のシステムコール"
961 #: build/C/man2/eventfd.2:316
963 "There are two underlying Linux system calls: B<eventfd>() and the more "
964 "recent B<eventfd2>(). The former system call does not implement a I<flags> "
965 "argument. The latter system call implements the I<flags> values described "
966 "above. The glibc wrapper function will use B<eventfd2>() where it is "
969 "下層にある Linux システムコールは二種類あり、 B<eventfd>() と、もっと新しい "
970 "B<eventfd2>() である。 B<eventfd>() は I<flags> 引き数を実装していない。 "
971 "B<eventfd2>() では上記の値の I<flags> が実装されている。 glibc のラッパー関"
972 "数は、 B<eventfd2>() が利用可能であれば、これを使用する。"
975 #: build/C/man2/eventfd.2:316
977 msgid "Additional glibc features"
981 #: build/C/man2/eventfd.2:320
983 "The GNU C library defines an additional type, and two functions that attempt "
984 "to abstract some of the details of reading and writing on an eventfd file "
987 "GNU C ライブラリは、eventfd ファイルディスクリプタの読み出しと書き込みに を関"
988 "する詳細のいくつか抽象化するために、一つの型と、二つの関数を追加で 定義してい"
992 #: build/C/man2/eventfd.2:324
994 msgid "typedef uint64_t eventfd_t;\n"
995 msgstr "typedef uint64_t eventfd_t;\n"
998 #: build/C/man2/eventfd.2:327
1001 "int eventfd_read(int fd, eventfd_t *value);\n"
1002 "int eventfd_write(int fd, eventfd_t value);\n"
1004 "int eventfd_read(int fd, eventfd_t *value);\n"
1005 "int eventfd_write(int fd, eventfd_t value);\n"
1008 #: build/C/man2/eventfd.2:334
1010 "The functions perform the read and write operations on an eventfd file "
1011 "descriptor, returning 0 if the correct number of bytes was transferred, or "
1014 "これらの関数は、eventfd ファイルディスクリプタに対する読み出しと 書き込みの操"
1015 "作を実行し、正しいバイト数が転送された場合には 0 を返し、そうでない場合は -1 "
1019 #: build/C/man2/eventfd.2:334 build/C/man2/sigaction.2:784
1020 #: build/C/man2/sigaltstack.2:213 build/C/man2/signalfd.2:357
1021 #: build/C/man3/sigwait.3:83 build/C/man2/timer_create.2:251
1022 #: build/C/man2/timer_getoverrun.2:125 build/C/man2/timer_settime.2:205
1023 #: build/C/man2/timerfd_create.2:372 build/C/man2/wait.2:522
1029 #: build/C/man2/eventfd.2:343
1031 "The following program creates an eventfd file descriptor and then forks to "
1032 "create a child process. While the parent briefly sleeps, the child writes "
1033 "each of the integers supplied in the program's command-line arguments to the "
1034 "eventfd file descriptor. When the parent has finished sleeping, it reads "
1035 "from the eventfd file descriptor."
1037 "以下のプログラムは eventfd ファイルディスクリプタを生成し、 その後 fork を実"
1038 "行して子プロセスを生成する。 親プロセスが少しの間 sleep する間に、子プロセス"
1039 "は プログラムのコマンドライン引き数で指定された整数(列)をそれぞれ eventfd "
1040 "ファイルディスクリプタに書き込む。 親プロセスは sleep を完了すると eventfd "
1041 "ファイルディスクリプタから 読み出しを行う。"
1044 #: build/C/man2/eventfd.2:345
1045 msgid "The following shell session shows a sample run of the program:"
1046 msgstr "以下に示すシェルセッションにこのプログラムの使い方を示す。"
1049 #: build/C/man2/eventfd.2:357
1052 "$B< ./a.out 1 2 4 7 14>\n"
1053 "Child writing 1 to efd\n"
1054 "Child writing 2 to efd\n"
1055 "Child writing 4 to efd\n"
1056 "Child writing 7 to efd\n"
1057 "Child writing 14 to efd\n"
1058 "Child completed write loop\n"
1059 "Parent about to read\n"
1060 "Parent read 28 (0x1c) from efd\n"
1062 "$B< ./a.out 1 2 4 7 14>\n"
1063 "Child writing 1 to efd\n"
1064 "Child writing 2 to efd\n"
1065 "Child writing 4 to efd\n"
1066 "Child writing 7 to efd\n"
1067 "Child writing 14 to efd\n"
1068 "Child completed write loop\n"
1069 "Parent about to read\n"
1070 "Parent read 28 (0x1c) from efd\n"
1073 #: build/C/man2/eventfd.2:359 build/C/man2/signalfd.2:380
1074 #: build/C/man2/timerfd_create.2:400 build/C/man2/wait.2:557
1076 msgid "Program source"
1080 #: build/C/man2/eventfd.2:367
1083 "#include E<lt>sys/eventfd.hE<gt>\n"
1084 "#include E<lt>unistd.hE<gt>\n"
1085 "#include E<lt>stdlib.hE<gt>\n"
1086 "#include E<lt>stdio.hE<gt>\n"
1087 "#include E<lt>stdint.hE<gt> /* Definition of uint64_t */\n"
1089 "#include E<lt>sys/eventfd.hE<gt>\n"
1090 "#include E<lt>unistd.hE<gt>\n"
1091 "#include E<lt>stdlib.hE<gt>\n"
1092 "#include E<lt>stdio.hE<gt>\n"
1093 "#include E<lt>stdint.hE<gt> /* Definition of uint64_t */\n"
1096 #: build/C/man2/eventfd.2:370 build/C/man2/signalfd.2:391
1099 "#define handle_error(msg) \\e\n"
1100 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1102 "#define handle_error(msg) \\e\n"
1103 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1106 #: build/C/man2/eventfd.2:377
1110 "main(int argc, char *argv[])\n"
1117 "main(int argc, char *argv[])\n"
1124 #: build/C/man2/eventfd.2:382
1127 " if (argc E<lt> 2) {\n"
1128 " fprintf(stderr, \"Usage: %s E<lt>numE<gt>...\\en\", argv[0]);\n"
1129 " exit(EXIT_FAILURE);\n"
1132 " if (argc E<lt> 2) {\n"
1133 " fprintf(stderr, \"Usage: %s E<lt>numE<gt>...\\en\", argv[0]);\n"
1134 " exit(EXIT_FAILURE);\n"
1138 #: build/C/man2/eventfd.2:386
1141 " efd = eventfd(0, 0);\n"
1143 " handle_error(\"eventfd\");\n"
1145 " efd = eventfd(0, 0);\n"
1147 " handle_error(\"eventfd\");\n"
1150 #: build/C/man2/eventfd.2:398
1153 " switch (fork()) {\n"
1155 " for (j = 1; j E<lt> argc; j++) {\n"
1156 " printf(\"Child writing %s to efd\\en\", argv[j]);\n"
1157 " u = strtoull(argv[j], NULL, 0);\n"
1158 " /* strtoull() allows various bases */\n"
1159 " s = write(efd, &u, sizeof(uint64_t));\n"
1160 " if (s != sizeof(uint64_t))\n"
1161 " handle_error(\"write\");\n"
1163 " printf(\"Child completed write loop\\en\");\n"
1165 " switch (fork()) {\n"
1167 " for (j = 1; j E<lt> argc; j++) {\n"
1168 " printf(\"Child writing %s to efd\\en\", argv[j]);\n"
1169 " u = strtoull(argv[j], NULL, 0);\n"
1170 " /* strtoull() allows various bases */\n"
1171 " s = write(efd, &u, sizeof(uint64_t));\n"
1172 " if (s != sizeof(uint64_t))\n"
1173 " handle_error(\"write\");\n"
1175 " printf(\"Child completed write loop\\en\");\n"
1178 #: build/C/man2/eventfd.2:400
1180 msgid " exit(EXIT_SUCCESS);\n"
1181 msgstr " exit(EXIT_SUCCESS);\n"
1184 #: build/C/man2/eventfd.2:403
1194 #: build/C/man2/eventfd.2:411
1197 " printf(\"Parent about to read\\en\");\n"
1198 " s = read(efd, &u, sizeof(uint64_t));\n"
1199 " if (s != sizeof(uint64_t))\n"
1200 " handle_error(\"read\");\n"
1201 " printf(\"Parent read %llu (0x%llx) from efd\\en\",\n"
1202 " (unsigned long long) u, (unsigned long long) u);\n"
1203 " exit(EXIT_SUCCESS);\n"
1205 " printf(\"Parent about to read\\en\");\n"
1206 " s = read(efd, &u, sizeof(uint64_t));\n"
1207 " if (s != sizeof(uint64_t))\n"
1208 " handle_error(\"read\");\n"
1209 " printf(\"Parent read %llu (0x%llx) from efd\\en\",\n"
1210 " (unsigned long long) u, (unsigned long long) u);\n"
1211 " exit(EXIT_SUCCESS);\n"
1214 #: build/C/man2/eventfd.2:416
1218 " handle_error(\"fork\");\n"
1223 " handle_error(\"fork\");\n"
1228 #: build/C/man2/eventfd.2:428
1230 "B<futex>(2), B<pipe>(2), B<poll>(2), B<read>(2), B<select>(2), B<signalfd>"
1231 "(2), B<timerfd_create>(2), B<write>(2), B<epoll>(7), B<sem_overview>(7)"
1233 "B<futex>(2), B<pipe>(2), B<poll>(2), B<read>(2), B<select>(2), B<signalfd>"
1234 "(2), B<timerfd_create>(2), B<write>(2), B<epoll>(7), B<sem_overview>(7)"
1237 #: build/C/man2/getitimer.2:7
1243 #: build/C/man2/getitimer.2:10
1244 msgid "getitimer, setitimer - get or set value of an interval timer"
1245 msgstr "getitimer, setitimer - インターバル・タイマーの値を取得または設定する"
1248 #: build/C/man2/getitimer.2:13
1250 msgid "B<#include E<lt>sys/time.hE<gt>>\n"
1251 msgstr "B<#include E<lt>sys/time.hE<gt>>\n"
1254 #: build/C/man2/getitimer.2:15
1256 msgid "B<int getitimer(int >I<which>B<, struct itimerval *>I<curr_value>B<);>\n"
1257 msgstr "B<int getitimer(int >I<which>B<, struct itimerval *>I<curr_value>B<);>\n"
1260 #: build/C/man2/getitimer.2:18
1263 "B<int setitimer(int >I<which>B<, const struct itimerval *>I<new_value>B<,>\n"
1264 "B< struct itimerval *>I<old_value>B<);>\n"
1266 "B<int setitimer(int >I<which>B<, const struct itimerval *>I<new_value>B<,>\n"
1267 "B< struct itimerval *>I<old_value>B<);>\n"
1270 #: build/C/man2/getitimer.2:24
1272 "The system provides each process with three interval timers, each "
1273 "decrementing in a distinct time domain. When any timer expires, a signal is "
1274 "sent to the process, and the timer (potentially) restarts."
1276 "システムは 1 個のプロセスにつき 3 個のインターバル・タイマーを提供する。 それ"
1277 "ぞれのタイマーは別々の時間領域で減少する。 どのタイマーも満了するとプロセスに"
1278 "シグナルが送られ、 タイマーは (設定によっては) 再び開始される。"
1281 #: build/C/man2/getitimer.2:24
1283 msgid "B<ITIMER_REAL>"
1284 msgstr "B<ITIMER_REAL>"
1287 #: build/C/man2/getitimer.2:29
1288 msgid "decrements in real time, and delivers B<SIGALRM> upon expiration."
1289 msgstr "実時間 (real time) で減少し、満了すると B<SIGALRM> が送られる。"
1292 #: build/C/man2/getitimer.2:29
1294 msgid "B<ITIMER_VIRTUAL>"
1295 msgstr "B<ITIMER_VIRTUAL>"
1298 #: build/C/man2/getitimer.2:34
1300 "decrements only when the process is executing, and delivers B<SIGVTALRM> "
1303 "プロセスが実行されている間のみ減少し、満了すると B<SIGVTALRM> が送られる。"
1306 #: build/C/man2/getitimer.2:34
1308 msgid "B<ITIMER_PROF>"
1309 msgstr "B<ITIMER_PROF>"
1312 #: build/C/man2/getitimer.2:44
1314 "decrements both when the process executes and when the system is executing "
1315 "on behalf of the process. Coupled with B<ITIMER_VIRTUAL>, this timer is "
1316 "usually used to profile the time spent by the application in user and kernel "
1317 "space. B<SIGPROF> is delivered upon expiration."
1319 "プロセスが実行されていて、 かつシステムがそのプロセスのために処理を行なってい"
1320 "る間に減少する。 多くの場合、このタイマーは B<ITIMER_VIRTUAL> と組み合わされ"
1321 "て、アプリケーションがカーネル空間とユーザー空間で どれだけの時間を過ごしたか"
1322 "をプロファイルするのに使用される。 満了すると B<SIGPROF> が送られる。"
1325 #: build/C/man2/getitimer.2:46
1326 msgid "Timer values are defined by the following structures:"
1327 msgstr "タイマーの値は以下の構造体によって定義される:"
1330 #: build/C/man2/getitimer.2:54
1333 "struct itimerval {\n"
1334 " struct timeval it_interval; /* next value */\n"
1335 " struct timeval it_value; /* current value */\n"
1338 "struct itimerval {\n"
1339 " struct timeval it_interval; /* next value */\n"
1340 " struct timeval it_value; /* current value */\n"
1344 #: build/C/man2/getitimer.2:59
1347 "struct timeval {\n"
1348 " long tv_sec; /* seconds */\n"
1349 " long tv_usec; /* microseconds */\n"
1352 "struct timeval {\n"
1353 " long tv_sec; /* seconds */\n"
1354 " long tv_usec; /* microseconds */\n"
1358 #: build/C/man2/getitimer.2:81
1360 "The function B<getitimer>() fills the structure pointed to by I<curr_value> "
1361 "with the current setting for the timer specified by I<which> (one of "
1362 "B<ITIMER_REAL>, B<ITIMER_VIRTUAL>, or B<ITIMER_PROF>). The element "
1363 "I<it_value> is set to the amount of time remaining on the timer, or zero if "
1364 "the timer is disabled. Similarly, I<it_interval> is set to the reset value."
1366 "B<getitimer>() 関数は、 I<which> で指定されたタイマー (B<ITIMER_REAL>, "
1367 "B<ITIMER_VIRTUAL>, B<ITIMER_PROF> のどれか) の現在の設定を、 I<curr_value> で"
1368 "指定された構造体に格納する。 I<it_value> 要素にはタイマーの残り時間が設定され"
1369 "る。タイマーがオフの場合は ゼロが設定される。同様に I<it_interval> には初期値"
1373 #: build/C/man2/getitimer.2:89
1375 "The function B<setitimer>() sets the specified timer to the value in "
1376 "I<new_value>. If I<old_value> is non-NULL, the old value of the timer is "
1379 "B<setitimer>() 関数は指定されたタイマーに I<new_value> の値を設定する。 "
1380 "I<old_value> が NULL 以外の場合、タイマーの古い値が I<old_value> に格納され"
1384 #: build/C/man2/getitimer.2:99
1386 "Timers decrement from I<it_value> to zero, generate a signal, and reset to "
1387 "I<it_interval>. A timer which is set to zero (I<it_value> is zero or the "
1388 "timer expires and I<it_interval> is zero) stops."
1390 "タイマーは I<it_value> からゼロへ向けて減っていき、シグナルを生成し、 "
1391 "I<it_interval> に初期化される。 タイマーがゼロに設定された場合 (I<it_value> "
1392 "がゼロか、タイマーが満了した時に I<it_interval> がゼロの場合) は停止する。"
1395 #: build/C/man2/getitimer.2:105
1397 "Both I<tv_sec> and I<tv_usec> are significant in determining the duration of "
1399 msgstr "タイマーの期間は I<tv_sec> と I<tv_usec> の両方により決定される。"
1402 #: build/C/man2/getitimer.2:117
1404 "Timers will never expire before the requested time, but may expire some "
1405 "(short) time afterward, which depends on the system timer resolution and on "
1406 "the system load; see B<time>(7). (But see BUGS below.) Upon expiration, a "
1407 "signal will be generated and the timer reset. If the timer expires while "
1408 "the process is active (always true for B<ITIMER_VIRTUAL>) the signal will "
1409 "be delivered immediately when generated. Otherwise the delivery will be "
1410 "offset by a small time dependent on the system loading."
1412 "要求した時間がくる前にタイマーが満了することはないが、 逆にある (短い) 時間だ"
1413 "け満了が遅れることはある。 どれだけ遅れるかはシステムの時間分解能とシステムの"
1414 "負荷に依存する (B<time>(7) 参照; 但し、バグの項も参照のこと)。 タイマーが満"
1415 "了するとシグナルが生成され、タイマーは初期化される。 プロセスがアクティブな"
1416 "時 (B<ITIMER_VIRTUAL> の場合には常にそうである) にタイマーが満了した場合、生"
1417 "成されたシグナルは すぐに配送される。それ以外の場合は、システムの負荷により少"
1421 #: build/C/man2/getitimer.2:122 build/C/man2/killpg.2:93
1422 #: build/C/man2/tkill.2:73
1424 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
1427 "成功した場合、0 が返される。エラーが発生した場合、-1 が返され、 I<errno> が適"
1431 #: build/C/man2/getitimer.2:123 build/C/man2/prctl.2:564
1432 #: build/C/man2/sigaction.2:660 build/C/man2/sigaltstack.2:136
1433 #: build/C/man2/sigpending.2:55 build/C/man2/sigprocmask.2:95
1434 #: build/C/man2/sigsuspend.2:73 build/C/man2/timer_settime.2:180
1435 #: build/C/man2/timerfd_create.2:341
1441 #: build/C/man2/getitimer.2:130 build/C/man2/timerfd_create.2:348
1442 msgid "I<new_value>, I<old_value>, or I<curr_value> is not valid a pointer."
1443 msgstr "I<new_value>, I<old_value>, I<curr_value> が有効なポインタではない。"
1446 #: build/C/man2/getitimer.2:143
1448 "I<which> is not one of B<ITIMER_REAL>, B<ITIMER_VIRTUAL>, or B<ITIMER_PROF>; "
1449 "or (since Linux 2.6.22) one of the I<tv_usec> fields in the structure "
1450 "pointed to by I<new_value> contains a value outside the range 0 to 999999."
1452 "I<which> が B<ITIMER_REAL>, B<ITIMER_VIRTUAL>, B<ITIMER_PROF> のどれでもな"
1453 "い。 または (Linux 2.6.22 以降で) I<new_value> で指定された構造体の "
1454 "I<tv_usec> フィールドの一つが 0 以上 999999 以下の範囲に入らない値である。"
1457 #: build/C/man2/getitimer.2:153
1459 "POSIX.1-2001, SVr4, 4.4BSD (this call first appeared in 4.2BSD). "
1460 "POSIX.1-2008 marks B<getitimer>() and B<setitimer>() obsolete, "
1461 "recommending the use of the POSIX timers API (B<timer_gettime>(2), "
1462 "B<timer_settime>(2), etc.) instead."
1464 "POSIX.1-2001, SVr4, 4.4BSD (このコールは 4.2BSD で始めて現われた). "
1465 "POSIX.1-2008 では、 B<getitimer>() と B<setitimer>() は廃止予定とされてお"
1466 "り、 代わりに POSIX タイマー API (B<timer_gettime>(2), B<timer_settime>(2) "
1467 "など) を使うことが推奨されている。"
1470 #: build/C/man2/getitimer.2:159
1472 "A child created via B<fork>(2) does not inherit its parent's interval "
1473 "timers. Interval timers are preserved across an B<execve>(2)."
1475 "B<fork>(2) で作成された子プロセスは、 親プロセスのインターバル・タイマーを継"
1476 "承しない。 B<execve>(2) の前後ではインターバル・タイマーは保存される。"
1479 #: build/C/man2/getitimer.2:169
1481 "POSIX.1 leaves the interaction between B<setitimer>() and the three "
1482 "interfaces B<alarm>(2), B<sleep>(3), and B<usleep>(3) unspecified."
1484 "POSIX.1 では、 B<setitimer>() と、 B<alarm>(2), B<sleep>(3), B<usleep>(3) "
1485 "という 3 つのインタフェースとの相互の影響については規定していない。"
1488 #: build/C/man2/getitimer.2:169 build/C/man2/kill.2:160
1489 #: build/C/man3/profil.3:70 build/C/man3/psignal.3:99
1490 #: build/C/man2/sigaction.2:775 build/C/man2/signalfd.2:349
1491 #: build/C/man2/sigpending.2:76 build/C/man3/sigset.3:230
1492 #: build/C/man2/timer_getoverrun.2:112 build/C/man2/timerfd_create.2:534
1498 #: build/C/man2/getitimer.2:178
1500 "The generation and delivery of a signal are distinct, and only one instance "
1501 "of each of the signals listed above may be pending for a process. Under "
1502 "very heavy loading, an B<ITIMER_REAL> timer may expire before the signal "
1503 "from a previous expiration has been delivered. The second signal in such an "
1504 "event will be lost."
1506 "シグナルの生成と配送は別個のものであり、 前述のシグナルのそれぞれについて一つ"
1507 "だけがプロセスのために 待機する。 非常に重い負荷の下では、 B<ITIMER_REAL> タ"
1508 "イマーでは、時間切れにより生成された一つ前のシグナルが配送される前に、 次の時"
1509 "間切れが起こる場合がある。 そのような場合、 2 個めのイベントに対するシグナル"
1513 #: build/C/man2/getitimer.2:193
1515 "On Linux kernels before 2.6.16, timer values are represented in jiffies. If "
1516 "a request is made set a timer with a value whose jiffies representation "
1517 "exceeds B<MAX_SEC_IN_JIFFIES> (defined in I<include/linux/jiffies.h>), then "
1518 "the timer is silently truncated to this ceiling value. On Linux/i386 "
1519 "(where, since Linux 2.6.13, the default jiffy is 0.004 seconds), this means "
1520 "that the ceiling value for a timer is approximately 99.42 days. Since Linux "
1521 "2.6.16, the kernel uses a different internal representation for times, and "
1522 "this ceiling is removed."
1524 "バージョン 2.6.16 より前の Linux カーネルでは、 タイマーの値は jiffy で表現さ"
1525 "れる。 要求が jiffy 表現で (I<include/linux/jiffies.h> で定義されている) "
1526 "B<MAX_SEC_IN_JIFFIES> を越える値をタイマーに設定しようとするものの場合、 タイ"
1527 "マーは暗黙にこの上限値に切り詰められる。 Linux/i386 の場合 (Linux 2.6.13 以降"
1528 "では jiffy は 0.004 秒) の場合、 これはタイマーの上限値がおよそ 99.42 日にな"
1529 "ることを意味する。 Linux 2.6.16 以降では、カーネルは時間に関する内部表現とし"
1530 "て 異なる表現を使うようになっており、この上限はなくなった。"
1532 #. 4 Jul 2005: It looks like this bug may remain in 2.4.x.
1533 #. http://lkml.org/lkml/2005/7/1/165
1535 #: build/C/man2/getitimer.2:200
1537 "On certain systems (including i386), Linux kernels before version 2.6.12 "
1538 "have a bug which will produce premature timer expirations of up to one jiffy "
1539 "under some circumstances. This bug is fixed in kernel 2.6.12."
1541 "(i386 を含む) いくつかのシステムでは、 バージョン 2.6.12 以前の Linux カーネ"
1542 "ルは ある種の状況では 1 jiffy 早くタイマーが終了してしまうというバグがあっ"
1543 "た。 このバグはカーネル 2.6.12 で修正された。"
1545 #. Bugzilla report 25 Apr 2006:
1546 #. http://bugzilla.kernel.org/show_bug.cgi?id=6443
1547 #. "setitimer() should reject noncanonical arguments"
1549 #: build/C/man2/getitimer.2:219
1551 "POSIX.1-2001 says that B<setitimer>() should fail if a I<tv_usec> value is "
1552 "specified that is outside of the range 0 to 999999. However, in kernels up "
1553 "to and including 2.6.21, Linux does not give an error, but instead silently "
1554 "adjusts the corresponding seconds value for the timer. From kernel 2.6.22 "
1555 "onward, this nonconformance has been repaired: an improper I<tv_usec> value "
1556 "results in an B<EINVAL> error."
1558 "POSIX.1-2001 では B<setitimer>() は I<tv_usec> の値が 0 から 999999 の範囲外"
1559 "である場合には失敗するべきだとしている。 しかし、2.6.21 以前のカーネルの "
1560 "Linux ではエラーにならず、 対応する秒数の分だけそのタイマーの秒の値が暗黙に調"
1561 "整される。 カーネル 2.6.22 以降では、この標準非準拠の動作は修正され、 "
1562 "I<tv_usec> の値が不適切な場合には B<EINVAL> エラーとなる。"
1565 #: build/C/man2/getitimer.2:226
1567 "B<gettimeofday>(2), B<sigaction>(2), B<signal>(2), B<timer_create>(2), "
1568 "B<timerfd_create>(2), B<time>(7)"
1570 "B<gettimeofday>(2), B<sigaction>(2), B<signal>(2), B<timer_create>(2), "
1571 "B<timerfd_create>(2), B<time>(7)"
1574 #: build/C/man3/gsignal.3:25
1580 #: build/C/man3/gsignal.3:25 build/C/man3/profil.3:28 build/C/man3/sigvec.3:24
1586 #: build/C/man3/gsignal.3:28
1587 msgid "gsignal, ssignal - software signal facility"
1588 msgstr "gsignal, ssignal - ソフトウェア・シグナル機能"
1591 #: build/C/man3/gsignal.3:31 build/C/man2/kill.2:52 build/C/man3/psignal.3:34
1592 #: build/C/man3/raise.3:33 build/C/man2/sigaction.2:51
1593 #: build/C/man3/siginterrupt.3:35 build/C/man3/sigpause.3:29
1594 #: build/C/man3/sigwait.3:30 build/C/man2/sigwaitinfo.2:29
1596 msgid "B<#include E<lt>signal.hE<gt>>\n"
1597 msgstr "B<#include E<lt>signal.hE<gt>>\n"
1600 #: build/C/man3/gsignal.3:33
1602 msgid "B<typedef void (*sighandler_t)(int);>\n"
1603 msgstr "B<typedef void (*sighandler_t)(int);>\n"
1606 #: build/C/man3/gsignal.3:35
1608 msgid "B<int gsignal(int >I<signum>B<);>\n"
1609 msgstr "B<int gsignal(int >I<signum>B<);>\n"
1612 #: build/C/man3/gsignal.3:37
1614 msgid "B<sighandler_t ssignal(int >I<signum>B<, sighandler_t >I<action>B<);>\n"
1615 msgstr "B<sighandler_t ssignal(int >I<signum>B<, sighandler_t >I<action>B<);>\n"
1618 #: build/C/man3/gsignal.3:42 build/C/man2/kill.2:59 build/C/man2/killpg.2:51
1619 #: build/C/man3/profil.3:40 build/C/man3/psignal.3:44
1620 #: build/C/man2/sigaction.2:59 build/C/man2/sigaltstack.2:36
1621 #: build/C/man3/siginterrupt.3:42 build/C/man2/sigpending.2:38
1622 #: build/C/man2/sigprocmask.2:39 build/C/man3/sigqueue.3:37
1623 #: build/C/man3/sigset.3:43 build/C/man3/sigsetops.3:49
1624 #: build/C/man2/sigsuspend.2:38 build/C/man3/sigvec.3:43
1625 #: build/C/man3/sigwait.3:37 build/C/man2/sigwaitinfo.2:39
1626 #: build/C/man2/timer_create.2:46 build/C/man2/timer_delete.2:38
1627 #: build/C/man2/timer_getoverrun.2:38 build/C/man2/timer_settime.2:42
1628 #: build/C/man2/wait.2:68 build/C/man2/wait4.2:54
1630 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1631 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7) 参照):"
1634 #: build/C/man3/gsignal.3:47
1635 msgid "B<gsignal>(), B<ssignal>(): _SVID_SOURCE"
1636 msgstr "B<gsignal>(), B<ssignal>(): _SVID_SOURCE"
1639 #: build/C/man3/gsignal.3:55
1641 "Don't use these functions under Linux. Due to a historical mistake, under "
1642 "Linux these functions are aliases for B<raise>(3) and B<signal>(2), "
1645 "Linux ではこれらの関数を使用しないこと。 過去に間違いがあり、Linux では "
1646 "B<gsignal>() と B<ssignal>() はそれぞれ B<raise>(3) と B<signal>(2) の別"
1650 #: build/C/man3/gsignal.3:93
1652 "Elsewhere, on System V-like systems, these functions implement software "
1653 "signaling, entirely independent of the classical B<signal>(2) and B<kill>"
1654 "(2) functions. The function B<ssignal>() defines the action to take when "
1655 "the software signal with number I<signum> is raised using the function "
1656 "B<gsignal>(), and returns the previous such action or B<SIG_DFL>. The "
1657 "function B<gsignal>() does the following: if no action (or the action "
1658 "B<SIG_DFL>) was specified for I<signum>, then it does nothing and returns "
1659 "0. If the action B<SIG_IGN> was specified for I<signum>, then it does "
1660 "nothing and returns 1. Otherwise, it resets the action to B<SIG_DFL> and "
1661 "calls the action function with argument I<signum>, and returns the value "
1662 "returned by that function. The range of possible values I<signum> varies "
1663 "(often 1-15 or 1-17)."
1665 "一方、System V 風のシステムでは、これらの関数で、 従来の B<signal>(2) や "
1666 "B<kill>(2) の関数群とは完全に独立な、 ソフトウェア・シグナリングを実現してい"
1667 "る。 B<ssignal>() 関数は、番号 I<signum> のソフトウェア・シグナルが "
1668 "B<gsignal>() 関数を使って発生された時にとるべきアクションを定義する。 "
1669 "B<gsignal>() の返り値は、一つ前に指定されていたアクション、もしくは "
1670 "B<SIG_DFL> である。 B<gsignal>() は以下のような動作を行う: I<signum> に対し"
1671 "てアクションが指定されていないか、アクション B<SIG_DFL> が指定されていた場"
1672 "合、何もせずに 0 を返す。 I<signum> に対して アクション B<SIG_IGN> が指定され"
1673 "ていた場合、何もせずに 1 を返す。 それ以外の場合、アクションを B<SIG_DFL> に"
1674 "リセットし、引き数に I<signum> を指定してアクション関数を呼び出して、アクショ"
1675 "ン関数の返り値を返す。 I<signum> がとり得る値の範囲は実装により異なる (多くの"
1676 "場合 1〜15 か 1〜17 である)。"
1679 #: build/C/man3/gsignal.3:101
1681 "These functions are available under AIX, DG/UX, HP-UX, SCO, Solaris, Tru64. "
1682 "They are called obsolete under most of these systems, and are broken under "
1683 "Linux libc and glibc. Some systems also have B<gsignal_r>() and "
1686 "これらの関数は、AIX, DG/UX, HP-UX, SCO, Solaris, Tru64 で使用可能である。 こ"
1687 "れらのシステムのほとんどで廃止されたことになっており、 Linux の libc および "
1688 "glibc では正しく実装されていない。 B<gsignal_r>() と B<ssignal_r>() が実装"
1692 #: build/C/man3/gsignal.3:105
1693 msgid "B<kill>(2), B<signal>(2), B<raise>(3)"
1694 msgstr "B<kill>(2), B<signal>(2), B<raise>(3)"
1697 #: build/C/man2/kill.2:44
1703 #: build/C/man2/kill.2:44
1709 #: build/C/man2/kill.2:47
1710 msgid "kill - send signal to a process"
1711 msgstr "kill - プロセスにシグナルを送る"
1714 #: build/C/man2/kill.2:50
1716 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
1717 msgstr "B<#include E<lt>sys/types.hE<gt>>\n"
1720 #: build/C/man2/kill.2:54
1722 msgid "B<int kill(pid_t >I<pid>B<, int >I<sig>B<);>\n"
1723 msgstr "B<int kill(pid_t >I<pid>B<, int >I<sig>B<);>\n"
1726 #: build/C/man2/kill.2:64
1728 "B<kill>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
1730 "B<kill>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
1733 #: build/C/man2/kill.2:70
1735 "The B<kill>() system call can be used to send any signal to any process "
1738 "システムコールの B<kill>() は、任意のプロセス・グループもしくはプロセスにシ"
1742 #: build/C/man2/kill.2:73
1744 "If I<pid> is positive, then signal I<sig> is sent to the process with the ID "
1745 "specified by I<pid>."
1747 "I<pid> に正の値を指定した場合、シグナル I<sig> が I<pid> で指定された ID を持"
1751 #: build/C/man2/kill.2:76
1753 "If I<pid> equals 0, then I<sig> is sent to every process in the process "
1754 "group of the calling process."
1756 "I<pid> に 0 を指定した場合、 呼び出し元のプロセスのプロセス・グループに属する"
1757 "すべてのプロセスに I<sig> で指定したシグナルが送られる。"
1760 #: build/C/man2/kill.2:80
1762 "If I<pid> equals -1, then I<sig> is sent to every process for which the "
1763 "calling process has permission to send signals, except for process 1 "
1764 "(I<init>), but see below."
1766 "I<pid> に -1 を指定した場合、 I<sig> で指定したシグナルが、 呼び出し元のプロ"
1767 "セスがシグナルを送る許可を持つ全てのプロセスに 送られる。但し、プロセス番号 "
1768 "1 (I<init>) へはシグナルは送られない。 以下の関連部分も参照のこと。"
1771 #: build/C/man2/kill.2:83
1773 "If I<pid> is less than -1, then I<sig> is sent to every process in the "
1774 "process group whose ID is I<-pid>."
1776 "I<pid> に -1 より小さな値を指定した場合、 ID が I<-pid> のプロセス・グループ"
1777 "に属するすべてのプロセスに I<sig> で指定したシグナルが送られる。"
1780 #: build/C/man2/kill.2:88
1782 "If I<sig> is 0, then no signal is sent, but error checking is still "
1783 "performed; this can be used to check for the existence of a process ID or "
1786 "I<sig> に 0 を指定した場合、シグナルは送られないが、 エラーのチェックは行われ"
1787 "る。これを使って、プロセス ID や プロセスグループ ID の存在確認を行うことがで"
1791 #: build/C/man2/kill.2:99 build/C/man2/killpg.2:88
1793 "For a process to have permission to send a signal it must either be "
1794 "privileged (under Linux: have the B<CAP_KILL> capability), or the real or "
1795 "effective user ID of the sending process must equal the real or saved set-"
1796 "user-ID of the target process. In the case of B<SIGCONT> it suffices when "
1797 "the sending and receiving processes belong to the same session."
1799 "プロセスがシグナルを送信する許可を持つためには、 プロセスが特権 (Linux では "
1800 "B<CAP_KILL> ケーパビリティ (capability)) を持つか、 送信元プロセスの実ユー"
1801 "ザー ID または実効ユーザー ID が 送信先プロセスの実 set-user-ID または保存 "
1802 "set-user-ID と 等しくなければならない。 B<SIGCONT> の場合、送信プロセスと受信"
1803 "プロセスが 同じセッションに属していれば十分である。"
1806 #: build/C/man2/kill.2:104
1808 "On success (at least one signal was sent), zero is returned. On error, -1 "
1809 "is returned, and I<errno> is set appropriately."
1811 "成功した場合 (少なくとも一つのシグナルが送信された場合)、 0 が返される。エ"
1812 "ラーの場合 -1 が返され、 I<errno> が適切に設定される。"
1815 #: build/C/man2/kill.2:108
1816 msgid "An invalid signal was specified."
1817 msgstr "無効なシグナルを指定した。"
1820 #: build/C/man2/kill.2:108 build/C/man2/killpg.2:98 build/C/man2/prctl.2:639
1821 #: build/C/man2/prctl.2:651 build/C/man2/prctl.2:661 build/C/man2/prctl.2:669
1822 #: build/C/man2/rt_sigqueueinfo.2:143 build/C/man2/sigaltstack.2:149
1823 #: build/C/man3/sigqueue.3:100 build/C/man2/tkill.2:77
1829 #: build/C/man2/kill.2:112 build/C/man2/killpg.2:102
1831 "The process does not have permission to send the signal to any of the target "
1834 "プロセスが、受信するプロセスのいずれに対しても シグナルを送る許可を持っていな"
1838 #: build/C/man2/kill.2:112 build/C/man2/killpg.2:102 build/C/man2/killpg.2:106
1839 #: build/C/man2/rt_sigqueueinfo.2:151 build/C/man3/sigqueue.3:106
1840 #: build/C/man2/tkill.2:82
1846 #: build/C/man2/kill.2:120
1848 "The pid or process group does not exist. Note that an existing process "
1849 "might be a zombie, a process which already committed termination, but has "
1850 "not yet been B<wait>(2)ed for."
1852 "指定したプロセスまたはプロセス・グループが存在しなかった。 ゾンビプロセスは存"
1853 "在するプロセスとしてみなされる。 ゾンビプロセスとはすでに処理は終了している"
1854 "が、親プロセスによる B<wait>() 処理が行われていないプロセスのことである。"
1857 #: build/C/man2/kill.2:122 build/C/man2/pause.2:59 build/C/man2/wait.2:423
1858 msgid "SVr4, 4.3BSD, POSIX.1-2001."
1859 msgstr "SVr4, 4.3BSD, POSIX.1-2001."
1862 #: build/C/man2/kill.2:130
1864 "The only signals that can be sent to process ID 1, the I<init> process, are "
1865 "those for which I<init> has explicitly installed signal handlers. This is "
1866 "done to assure the system is not brought down accidentally."
1868 "プロセス番号 1 の I<init> プロセスに送ることができるシグナルは、 I<init> が明"
1869 "示的にシグナルハンドラを設定したシグナルだけである。 こうなっているのは、誤っ"
1870 "てシステムをダウンさせないようにするためである。"
1873 #: build/C/man2/kill.2:136
1875 "POSIX.1-2001 requires that I<kill(-1,sig)> send I<sig> to all processes that "
1876 "the calling process may send signals to, except possibly for some "
1877 "implementation-defined system processes. Linux allows a process to signal "
1878 "itself, but on Linux the call I<kill(-1,sig)> does not signal the calling "
1881 "POSIX.1-2001 では、 I<kill(-1,sig)> が 呼び出し元のプロセスがシグナルを送るこ"
1882 "とが出来るプロセス全てに I<sig> を送ることを要求している。 但し、システム実装"
1883 "時に定められたシステムプロセスは シグナルの送信対象から除外される。 Linux で"
1884 "は、プロセスが自分自身にシグナルを送れるようになっているが、 Linux の I<kill"
1885 "(-1,sig)> は呼び出し元のプロセスにはシグナルを送らない。"
1888 #: build/C/man2/kill.2:146
1890 "POSIX.1-2001 requires that if a process sends a signal to itself, and the "
1891 "sending thread does not have the signal blocked, and no other thread has it "
1892 "unblocked or is waiting for it in B<sigwait>(3), at least one unblocked "
1893 "signal must be delivered to the sending thread before the B<kill>() returns."
1895 "POSIX.1-2001 では以下の動作になることを要求している。 自分自身にシグナルを送"
1896 "ると、シグナルを送ったスレッドがそのシグナルをブロック しておらず、他のどのス"
1897 "レッドもそのシグナルを受ける状態にもなく B<sigwait>(3) でそのシグナルを待っ"
1898 "てもいない場合、 B<kill>() が返る前に少なくとも一つのブロックされていない シ"
1899 "グナルがシグナルを送ったスレッドに配送されなければならない。"
1902 #: build/C/man2/kill.2:146 build/C/man3/sigpause.3:75 build/C/man2/wait.2:477
1907 #. In the 0.* kernels things chopped and changed quite
1908 #. a bit - MTK, 24 Jul 02
1910 #: build/C/man2/kill.2:160
1912 "Across different kernel versions, Linux has enforced different rules for the "
1913 "permissions required for an unprivileged process to send a signal to another "
1914 "process. In kernels 1.0 to 1.2.2, a signal could be sent if the effective "
1915 "user ID of the sender matched that of the receiver, or the real user ID of "
1916 "the sender matched that of the receiver. From kernel 1.2.3 until 1.3.77, a "
1917 "signal could be sent if the effective user ID of the sender matched either "
1918 "the real or effective user ID of the receiver. The current rules, which "
1919 "conform to POSIX.1-2001, were adopted in kernel 1.3.78."
1921 "Linux では、特権のないプロセスが他のプロセスにシグナルを送信するために 必要な"
1922 "権限についてのルールが、カーネルバージョンにより違っている。 カーネル 1.0 か"
1923 "ら 1.2.2 では、送信側の実効ユーザーID が受信側の 実効ユーザー IDと一致すれば"
1924 "シグナルを送信できた。 カーネル 1.2.3 から 1.3.77では、送信側の実効ユーザー"
1925 "ID が受信側の 実ユーザーID か実効ユーザーID のいずれかと一致すればシグナルを"
1926 "送信できた。 現在のルールは、POSIX.1-2001 に準拠しており、カーネル 1.3.78 以"
1930 #: build/C/man2/kill.2:170
1932 "In 2.6 kernels up to and including 2.6.7, there was a bug that meant that "
1933 "when sending signals to a process group, B<kill>() failed with the error "
1934 "B<EPERM> if the caller did have permission to send the signal to I<any> "
1935 "(rather than I<all>) of the members of the process group. Notwithstanding "
1936 "this error return, the signal was still delivered to all of the processes "
1937 "for which the caller had permission to signal."
1939 "バージョン 2.6.7 以前の 2.6 系のカーネルには、 プロセスグループにシグナルを"
1940 "送ったときに、 呼び出し元のプロセスがプロセスグループの (全メンバーではなく) "
1941 "一部のメンバー に対してのみシグナルを送る許可を持っている場合に、 B<kill>() "
1942 "がエラー B<EPERM> で失敗するというバグがある。 このエラーが返るにもかかわら"
1943 "ず、そのシグナルは呼び出し元が シグナルを送る許可を持つ全てのプロセスへ送られ"
1947 #: build/C/man2/kill.2:180
1949 "B<_exit>(2), B<killpg>(2), B<signal>(2), B<tkill>(2), B<exit>(3), B<sigqueue>"
1950 "(3), B<capabilities>(7), B<credentials>(7), B<signal>(7)"
1952 "B<_exit>(2), B<killpg>(2), B<signal>(2), B<tkill>(2), B<exit>(3), B<sigqueue>"
1953 "(3), B<credentials>(7), B<capabilities>(7), B<signal>(7)"
1956 #: build/C/man2/killpg.2:40
1962 #: build/C/man2/killpg.2:40 build/C/man3/sigset.3:24 build/C/man2/wait4.2:34
1968 #: build/C/man2/killpg.2:43
1969 msgid "killpg - send signal to a process group"
1970 msgstr "killpg - シグナルをプロセス・グループに送る"
1973 #: build/C/man2/killpg.2:47
1974 msgid "B<int killpg(int >I<pgrp>B<, int >I<sig>B<);>"
1975 msgstr "B<int killpg(int >I<pgrp>B<, int >I<sig>B<);>"
1978 #: build/C/man2/killpg.2:54
1980 msgid "B<killpg>():"
1981 msgstr "B<killpg>():"
1984 #: build/C/man2/killpg.2:58 build/C/man2/sigaltstack.2:44
1985 #: build/C/man3/siginterrupt.3:49 build/C/man2/wait4.2:61
1987 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
1988 "_XOPEN_SOURCE_EXTENDED"
1990 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
1991 "_XOPEN_SOURCE_EXTENDED"
1994 #: build/C/man2/killpg.2:68
1996 "B<killpg>() sends the signal I<sig> to the process group I<pgrp>. See "
1997 "B<signal>(7) for a list of signals."
1999 "B<killpg>() は I<sig> で指定したシグナルを I<pgrp> で指定したプロセス・グ"
2000 "ループに送る。 シグナルの定義の一覧は B<signal>(7) を参照のこと。"
2003 #: build/C/man2/killpg.2:77
2005 "If I<pgrp> is 0, B<killpg>() sends the signal to the calling process's "
2006 "process group. (POSIX says: If I<pgrp> is less than or equal to 1, the "
2007 "behavior is undefined.)"
2009 "引き数 I<pgrp> に 0 を指定した場合には B<killpg>() は呼び出し元のプロセスが"
2010 "属しているプロセス・グループに対してシグナルを送る。 (POSIX では以下のように"
2011 "記述されている: I<pgrp> が 1 以下である場合、動作は未定義である。)"
2014 #: build/C/man2/killpg.2:98
2015 msgid "I<Sig> is not a valid signal number."
2016 msgstr "I<sig> で指定された値は無効なシグナル番号である。"
2019 #: build/C/man2/killpg.2:106
2020 msgid "No process can be found in the process group specified by I<pgrp>."
2022 "I<pgrp> で指定されたプロセス・グループに属するプロセスが存在しなかった。"
2025 #: build/C/man2/killpg.2:110
2027 "The process group was given as 0 but the sending process does not have a "
2030 "プロセス・グループとして 0 が指定されたが、送信プロセスは プロセス・グループ"
2034 #: build/C/man2/killpg.2:114
2036 "SVr4, 4.4BSD (the B<killpg>() function call first appeared in 4BSD), "
2038 msgstr "SVr4, 4.4BSD (B<killpg>() は 4BSD で初めて追加された), POSIX.1-2001。"
2041 #: build/C/man2/killpg.2:128
2043 "There are various differences between the permission checking in BSD-type "
2044 "systems and System V-type systems. See the POSIX rationale for B<kill>(). "
2045 "A difference not mentioned by POSIX concerns the return value B<EPERM>: BSD "
2046 "documents that no signal is sent and B<EPERM> returned when the permission "
2047 "check failed for at least one target process, while POSIX documents B<EPERM> "
2048 "only when the permission check failed for all target processes."
2050 "BSD 系システムと System V 系システムでは、 許可のチェックに様々な違いがあ"
2051 "る。 B<kill>(2) についての POSIX の原理 (rationale) を参照すること。 POSIX "
2052 "で記述されていない違いとしては、返り値 B<EPERM> がある。 BSD では「送信先プロ"
2053 "セスの許可のチェックが 1 つでも失敗した場合は、 シグナルが送信されず、 "
2054 "B<EPERM> が返される」と記述されている。 POSIX では「送信先プロセスの許可の"
2055 "チェックが全て失敗した場合にのみ、 B<EPERM> が返される」と記述されている。"
2058 #: build/C/man2/killpg.2:133
2060 "On Linux, B<killpg>() is implemented as a library function that makes the "
2061 "call I<kill(-pgrp,\\ sig)>."
2063 "Linux では、 B<killpg>() はライブラリ関数として実装されており、 I<kill(-"
2064 "pgrp,\\ sig)> の呼び出しが行われる。"
2067 #: build/C/man2/killpg.2:139
2069 "B<getpgrp>(2), B<kill>(2), B<signal>(2), B<capabilities>(7), B<credentials>"
2072 "B<getpgrp>(2), B<kill>(2), B<signal>(2), B<credentials>(7), B<capabilities>"
2076 #: build/C/man2/pause.2:30
2082 #: build/C/man2/pause.2:30
2088 #: build/C/man2/pause.2:33
2089 msgid "pause - wait for signal"
2090 msgstr "pause - シグナルを待つ"
2093 #: build/C/man2/pause.2:35 build/C/man3/profil.3:33
2094 msgid "B<#include E<lt>unistd.hE<gt>>"
2095 msgstr "B<#include E<lt>unistd.hE<gt>>"
2098 #: build/C/man2/pause.2:37
2099 msgid "B<int pause(void);>"
2100 msgstr "B<int pause(void);>"
2103 #: build/C/man2/pause.2:42
2105 "B<pause>() causes the calling process (or thread) to sleep until a signal "
2106 "is delivered that either terminates the process or causes the invocation of "
2107 "a signal-catching function."
2109 "B<pause>() は、呼び出したプロセス (またはスレッド) を、 そのプロセスを終了さ"
2110 "せたり、シグナル捕捉関数が起動されるような シグナルが配送されるまで、スリープ"
2113 #. .BR ERESTARTNOHAND .
2115 #: build/C/man2/pause.2:53
2117 "B<pause>() only returns when a signal was caught and the signal-catching "
2118 "function returned. In this case B<pause>() returns -1, and I<errno> is set "
2121 "B<pause>() が返るのは、シグナルを受け取りシグナル捕獲関数から返った場合だけ"
2122 "である。 この場合は B<pause>() は -1 を返し、 I<errno> に B<EINTR> が設定さ"
2126 #: build/C/man2/pause.2:54 build/C/man2/sigsuspend.2:77
2127 #: build/C/man2/sigwaitinfo.2:119 build/C/man2/wait.2:409
2133 #: build/C/man2/pause.2:57
2134 msgid "a signal was caught and the signal-catching function returned."
2135 msgstr "シグナルを受け取り、シグナル捕獲関数から帰ってきた。"
2138 #: build/C/man2/pause.2:64
2139 msgid "B<kill>(2), B<select>(2), B<signal>(2), B<sigsuspend>(2)"
2140 msgstr "B<kill>(2), B<select>(2), B<signal>(2), B<sigsuspend>(2)"
2143 #: build/C/man2/prctl.2:48
2149 #: build/C/man2/prctl.2:48
2155 #: build/C/man2/prctl.2:51
2156 msgid "prctl - operations on a process"
2157 msgstr "prctl - プロセスの操作を行なう"
2160 #: build/C/man2/prctl.2:54
2162 msgid "B<#include E<lt>sys/prctl.hE<gt>>\n"
2163 msgstr "B<#include E<lt>sys/prctl.hE<gt>>\n"
2166 #: build/C/man2/prctl.2:57
2169 "B<int prctl(int >I<option>B<, unsigned long >I<arg2>B<, unsigned long >I<arg3>B<,>\n"
2170 "B< unsigned long >I<arg4>B<, unsigned long >I<arg5>B<);>\n"
2172 "B<int prctl(int >I<option>B<, unsigned long >I<arg2>B<, unsigned long >I<arg3>B<,>\n"
2173 "B< unsigned long >I<arg4>B<, unsigned long >I<arg5>B<);>\n"
2176 #: build/C/man2/prctl.2:64
2178 "B<prctl>() is called with a first argument describing what to do (with "
2179 "values defined in I<E<lt>linux/prctl.hE<gt>>), and further arguments with a "
2180 "significance depending on the first one. The first argument can be:"
2182 "B<prctl>() の動作は最初の引き数によって決定される (この値は I<E<lt>linux/"
2183 "prctl.hE<gt>> に定義されている)。 残りの引き数は最初の引き数によって変化す"
2184 "る。 一番目の引き数として以下のものを指定できる:"
2187 #: build/C/man2/prctl.2:64
2189 msgid "B<PR_CAPBSET_READ> (since Linux 2.6.25)"
2190 msgstr "B<PR_CAPBSET_READ> (Linux 2.6.25 以降)"
2193 #: build/C/man2/prctl.2:76
2195 "Return (as the function result) 1 if the capability specified in I<arg2> is "
2196 "in the calling thread's capability bounding set, or 0 if it is not. (The "
2197 "capability constants are defined in I<E<lt>linux/capability.hE<gt>>.) The "
2198 "capability bounding set dictates whether the process can receive the "
2199 "capability through a file's permitted capability set on a subsequent call to "
2202 "で指定されたケーパビリティが呼び出したスレッドのケーパビリティ バインディング"
2203 "セット (capability bounding set) に含まれている場合、 (関数の返り値として) 1 "
2204 "を返し、そうでない場合 0 を返す (ケーパビリティ定数は I<E<lt>linux/"
2205 "capability.hE<gt>> で定義されている)。 ケーパビリティバウンディングセット"
2206 "は、 B<execve>(2) を呼び出した際に、ファイルの許可 (permitted) ケーパビリ"
2207 "ティの中で そのプロセスが獲得できるケーパビリティを指示するものである。"
2210 #: build/C/man2/prctl.2:81
2212 "If the capability specified in I<arg2> is not valid, then the call fails "
2213 "with the error B<EINVAL>."
2215 "I<arg2> に指定されたケーパビリティが有効でない場合、 呼び出しはエラー "
2219 #: build/C/man2/prctl.2:81
2221 msgid "B<PR_CAPBSET_DROP> (since Linux 2.6.25)"
2222 msgstr "B<PR_CAPBSET_DROP> (Linux 2.6.25 以降)"
2225 #: build/C/man2/prctl.2:90
2227 "If the calling thread has the B<CAP_SETPCAP> capability, then drop the "
2228 "capability specified by I<arg2> from the calling thread's capability "
2229 "bounding set. Any children of the calling thread will inherit the newly "
2230 "reduced bounding set."
2232 "呼び出したスレッドがケーパビリティ B<CAP_SETPCAP> を持っている場合、 呼び出し"
2233 "たスレッドのケーパビリティバウンディングセットから I<arg2> で指定されたケーパ"
2234 "ビリティを外す。 呼び出したスレッドの子プロセスは変更後のバウンディングセット"
2238 #: build/C/man2/prctl.2:102
2240 "The call fails with the error: B<EPERM> if the calling thread does not have "
2241 "the B<CAP_SETPCAP>; B<EINVAL> if I<arg2> does not represent a valid "
2242 "capability; or B<EINVAL> if file capabilities are not enabled in the kernel, "
2243 "in which case bounding sets are not supported."
2245 "呼び出したスレッドが B<CAP_SETPCAP> を持っていない場合、呼び出しはエラー "
2246 "B<EPERM> で失敗する。 I<arg2> に指定されたケーパビリティが有効でない場合、 "
2247 "B<EINVAL> で失敗する。 ファイルケーパビリティがカーネルで有効になっていない場"
2248 "合 (この場合にはバウンディングセットがサポートされない)、 B<EINVAL> で失敗す"
2252 #: build/C/man2/prctl.2:102
2254 msgid "B<PR_SET_DUMPABLE> (since Linux 2.3.20)"
2255 msgstr "B<PR_SET_DUMPABLE> (Linux 2.3.20 以降)"
2257 #. See http://marc.theaimsgroup.com/?l=linux-kernel&m=115270289030630&w=2
2258 #. Subject: Fix prctl privilege escalation (CVE-2006-2451)
2259 #. From: Marcel Holtmann <marcel () holtmann ! org>
2260 #. Date: 2006-07-12 11:12:00
2262 #: build/C/man2/prctl.2:128
2264 "Set the state of the flag determining whether core dumps are produced for "
2265 "this process upon delivery of a signal whose default behavior is to produce "
2266 "a core dump. (Normally this flag is set for a process by default, but it is "
2267 "cleared when a set-user-ID or set-group-ID program is executed and also by "
2268 "various system calls that manipulate process UIDs and GIDs). In kernels up "
2269 "to and including 2.6.12, I<arg2> must be either 0 (process is not dumpable) "
2270 "or 1 (process is dumpable). Between kernels 2.6.13 and 2.6.17, the value 2 "
2271 "was also permitted, which caused any binary which normally would not be "
2272 "dumped to be dumped readable by root only; for security reasons, this "
2273 "feature has been removed. (See also the description of I</proc/sys/fs/"
2274 "suid_dumpable> in B<proc>(5).) Processes that are not dumpable can not be "
2275 "attached via B<ptrace(2)> B<PTRACE_ATTACH>."
2277 "(Linux 2.3.20 以降) デフォルトの振る舞いではコアダンプを引き起こすよう\n"
2278 "なシグナルを受信したときに、 コアダンプするかどうかを決定するフラグを\n"
2279 "設定する (通常このフラグは、デフォルトではセットされているが、\n"
2280 "set-user-ID あるいは set-group-ID プログラムが実行されたり、 さまざまな\n"
2281 "システムコールによってプロセスの UID や GID が操作されたときに クリアさ\n"
2282 "れる)。 2.6.12 以前のカーネルでは、 I<arg2> は 0 (プロセスはダンプ不可)\n"
2283 "あるいは 1 (プロセスはダンプ可能) の どちらかでなければならない。\n"
2284 "2.6.13 から 2.6.17 までのカーネルでは、値 2 も認められていた。 この値を\n"
2285 "指定すると、通常はダンプされないバイナリが root だけが 読み込み可能な形\n"
2286 "でダンプされた。 セキュリティ上の理由から、この機能は削除された\n"
2287 "(B<proc>(5) の I</proc/sys/fs/suid_dumpable> の説明も参照)。\n"
2288 "ダンプ不可のプロセスを B<ptrace(2)> B<PTRACE_ATTACH> 経由で接続すること\n"
2292 #: build/C/man2/prctl.2:128
2294 msgid "B<PR_GET_DUMPABLE> (since Linux 2.3.20)"
2295 msgstr "B<PR_GET_DUMPABLE> (Linux 2.3.20 以降)"
2297 #. Since Linux 2.6.13, the dumpable flag can have the value 2,
2298 #. but in 2.6.13 PR_GET_DUMPABLE simply returns 1 if the dumpable
2299 #. flags has a nonzero value. This was fixed in 2.6.14.
2301 #: build/C/man2/prctl.2:135
2303 "Return (as the function result) the current state of the calling process's "
2306 "(Linux 2.3.20 以降) 呼び出し元プロセスにおけるダンプ可能フラグの 現在の状態"
2310 #: build/C/man2/prctl.2:135
2312 msgid "B<PR_SET_ENDIAN> (since Linux 2.6.18, PowerPC only)"
2313 msgstr "B<PR_SET_ENDIAN> (Linux 2.6.18 以降、PowerPC のみ)"
2315 #. Respectively 0, 1, 2
2317 #: build/C/man2/prctl.2:145
2319 "Set the endian-ness of the calling process to the value given in I<arg2>, "
2320 "which should be one of the following: B<PR_ENDIAN_BIG>, B<PR_ENDIAN_LITTLE>, "
2321 "or B<PR_ENDIAN_PPC_LITTLE> (PowerPC pseudo little endian)."
2323 "呼び出し元プロセスのエンディアン設定 (endian-ness) を I<arg2> で指定された値"
2324 "に設定する。 指定できる値は B<PR_ENDIAN_BIG>, B<PR_ENDIAN_LITTLE>, "
2325 "B<PR_ENDIAN_PPC_LITTLE> (PowerPC 擬似リトルエンディアン) のいずれか一つであ"
2329 #: build/C/man2/prctl.2:145
2331 msgid "B<PR_GET_ENDIAN> (since Linux 2.6.18, PowerPC only)"
2332 msgstr "B<PR_GET_ENDIAN> (Linux 2.6.18 以降、PowerPC のみ)"
2335 #: build/C/man2/prctl.2:150
2337 "Return the endian-ness of the calling process, in the location pointed to by "
2338 "I<(int\\ *) arg2>."
2340 "呼び出し元プロセスのエンディアン設定 (endian-ness) を I<(int\\ *) arg2> が指"
2344 #: build/C/man2/prctl.2:150
2346 msgid "B<PR_SET_FPEMU> (since Linux 2.4.18, 2.5.9, only on ia64)"
2347 msgstr "B<PR_SET_FPEMU> (Linux 2.4.18 以降, 2.5.9, ia64 のみ)"
2350 #: build/C/man2/prctl.2:157
2352 "Set floating-point emulation control bits to I<arg2>. Pass "
2353 "B<PR_FPEMU_NOPRINT> to silently emulate fp operations accesses, or "
2354 "B<PR_FPEMU_SIGFPE> to not emulate fp operations and send B<SIGFPE> instead."
2356 "浮動小数点エミュレーション (floating-point emulation) 制御ビットを I<arg2> で"
2357 "指定された値に設定する。 指定できる値は B<PR_FPEMU_NOPRINT> (浮動小数点命令ア"
2358 "クセスを黙って エミュレートする) か B<PR_FPEMU_SIGFPE> (浮動小数点命令をエ"
2359 "ミュレートせず、 代わりに B<SIGFPE> を送る) である。"
2362 #: build/C/man2/prctl.2:157
2364 msgid "B<PR_GET_FPEMU> (since Linux 2.4.18, 2.5.9, only on ia64)"
2365 msgstr "B<PR_GET_FPEMU> (Linux 2.4.18 以降, 2.5.9, ia64 のみ)"
2368 #: build/C/man2/prctl.2:162
2370 "Return floating-point emulation control bits, in the location pointed to by "
2371 "I<(int\\ *) arg2>."
2373 "浮動小数点エミュレーション制御ビットの値を I<(int\\ *) arg2> が指す場所に格納"
2377 #: build/C/man2/prctl.2:162
2379 msgid "B<PR_SET_FPEXC> (since Linux 2.4.21, 2.5.32, only on PowerPC)"
2380 msgstr "B<PR_SET_FPEXC> (Linux 2.4.21 および 2.5.32 以降、PowerPC のみ)"
2383 #: build/C/man2/prctl.2:175
2385 "Set floating-point exception mode to I<arg2>. Pass B<PR_FP_EXC_SW_ENABLE> "
2386 "to use FPEXC for FP exception enables, B<PR_FP_EXC_DIV> for floating-point "
2387 "divide by zero, B<PR_FP_EXC_OVF> for floating-point overflow, "
2388 "B<PR_FP_EXC_UND> for floating-point underflow, B<PR_FP_EXC_RES> for floating-"
2389 "point inexact result, B<PR_FP_EXC_INV> for floating-point invalid operation, "
2390 "B<PR_FP_EXC_DISABLED> for FP exceptions disabled, B<PR_FP_EXC_NONRECOV> for "
2391 "async nonrecoverable exception mode, B<PR_FP_EXC_ASYNC> for async "
2392 "recoverable exception mode, B<PR_FP_EXC_PRECISE> for precise exception mode."
2394 "浮動小数点例外モード (floating-point exception mode) を I<arg2> で指定された"
2395 "値に設定する。 指定できるのは以下の値である: B<PR_FP_EXC_SW_ENABLE> (FPEXC で"
2396 "浮動小数点例外を有効にする)、 B<PR_FP_EXC_DIV> (0 除算)、 B<PR_FP_EXC_OVF> "
2397 "(オーバーフロー)、 B<PR_FP_EXC_UND> (アンダーフロー)、 B<PR_FP_EXC_RES> (不正"
2398 "確な結果 (inexact result))、 B<PR_FP_EXC_INV> (不正な命令 (invalid "
2399 "operation))、 B<PR_FP_EXC_DISABLED> (浮動小数点例外を無効にする)、 "
2400 "B<PR_FP_EXC_NONRECOV> (async nonrecoverable exception mode)、 "
2401 "B<PR_FP_EXC_ASYNC> (async recoverable exception mode)、 B<PR_FP_EXC_PRECISE> "
2402 "(precise exception mode)。"
2405 #: build/C/man2/prctl.2:175
2407 msgid "B<PR_GET_FPEXC> (since Linux 2.4.21, 2.5.32, only on PowerPC)"
2408 msgstr "B<PR_GET_FPEXC>(Linux 2.4.21 および 2.5.32 以降、PowerPC のみ)"
2411 #: build/C/man2/prctl.2:180
2413 "Return floating-point exception mode, in the location pointed to by I<(int\\ "
2416 "浮動小数点例外モードの値を I<(int\\ *) arg2> が指す場所に格納して返す。"
2419 #: build/C/man2/prctl.2:180
2421 msgid "B<PR_SET_KEEPCAPS> (since Linux 2.2.18)"
2422 msgstr "B<PR_SET_KEEPCAPS> (Linux 2.2.18 以降)"
2425 #: build/C/man2/prctl.2:198
2427 "Set the state of the thread's \"keep capabilities\" flag, which determines "
2428 "whether the threads's permitted capability set is cleared when a change is "
2429 "made to the threads's user IDs such that the threads's real UID, effective "
2430 "UID, and saved set-user-ID all become nonzero when at least one of them "
2431 "previously had the value 0. By default, the permitted capability set is "
2432 "cleared when such a change is made; setting the \"keep capabilities\" flag "
2433 "prevents it from being cleared. I<arg2> must be either 0 (permitted "
2434 "capabilities are cleared) or 1 (permitted capabilities are kept). (A "
2435 "thread's I<effective> capability set is always cleared when such a "
2436 "credential change is made, regardless of the setting of the \"keep "
2437 "capabilities\" flag.) The \"keep capabilities\" value will be reset to 0 on "
2438 "subsequent calls to B<execve>(2)."
2440 "スレッドの「ケーパビリティ保持」フラグを設定する。\n"
2441 "このフラグは、スレッドの実 UID、実効 UID、保存 set-user-ID のうち少なく\n"
2442 "とも一つが 0 であった状態から、これら全てが 0 以外に変更されたとき、\n"
2443 "スレッドの許可ケーパビリティ集合がクリアされるかどうかを決定する。\n"
2444 "デフォルトでは、このような変更が行われた場合、許可ケーパビリティセット\n"
2445 "はクリアされる。「ケーパビリティ保持」フラグを設定すると、\n"
2446 "許可ケーパビリティセットはクリアされなくなる。\n"
2447 "I<arg2> は 0 (許可ケーパビリティをクリアする) か 1 (許可ケーパビリティ\n"
2448 "を保持する) の どちらかでなければならない。\n"
2449 "(このような ID の変更が行われた場合、「ケーパビリティ保持」フラグの設定\n"
2450 "に関わらず、スレッドのI<実効>ケーパビリティセットは常にクリアされる。)\n"
2451 "B<execve>(2) が呼び出されると、「ケーパビリティ保持」フラグは 0\n"
2455 #: build/C/man2/prctl.2:198
2457 msgid "B<PR_GET_KEEPCAPS> (since Linux 2.2.18)"
2458 msgstr "B<PR_GET_KEEPCAPS> (Linux 2.2.18 以降)"
2461 #: build/C/man2/prctl.2:202
2463 "Return (as the function result) the current state of the calling threads's "
2464 "\"keep capabilities\" flag."
2466 "呼び出し元スレッドにおける「ケーパビリティ保持」フラグの 現在の状態を (関数の"
2470 #: build/C/man2/prctl.2:202
2472 msgid "B<PR_SET_NAME> (since Linux 2.6.9)"
2473 msgstr "B<PR_SET_NAME> (Linux 2.6.9 以降)"
2475 #. TASK_COMM_LEN in include/linux/sched.h
2477 #: build/C/man2/prctl.2:210
2479 "Set the process name for the calling process, using the value in the "
2480 "location pointed to by I<(char\\ *) arg2>. The name can be up to 16 bytes "
2481 "long, and should be null-terminated if it contains fewer bytes."
2483 "呼び出し元プロセスのプロセス名を I<(char\\ *) arg2> が指す場所に格納された値"
2484 "を使って設定する。 名前は最大で 16 バイトであり、 それより少ないバイト数の場"
2485 "合は NULL で終端すべきである。"
2488 #: build/C/man2/prctl.2:210
2490 msgid "B<PR_GET_NAME> (since Linux 2.6.11)"
2491 msgstr "B<PR_GET_NAME> (Linux 2.6.11 以降)"
2494 #: build/C/man2/prctl.2:217
2496 "Return the process name for the calling process, in the buffer pointed to by "
2497 "I<(char\\ *) arg2>. The buffer should allow space for up to 16 bytes; the "
2498 "returned string will be null-terminated if it is shorter than that."
2500 "呼び出し元プロセスのプロセス名を I<(char\\ *) arg2> が指す場所に格納して返"
2501 "す。 バッファは最大で 16 バイトを格納できるようにすべきである。 返される文字"
2502 "列は、長さが 16 バイトより短い場合は NULL 終端される。"
2505 #: build/C/man2/prctl.2:217
2507 msgid "B<PR_SET_PDEATHSIG> (since Linux 2.1.57)"
2508 msgstr "B<PR_SET_PDEATHSIG> (Linux 2.1.57 以降)"
2511 #: build/C/man2/prctl.2:228
2513 "Set the parent process death signal of the calling process to I<arg2> "
2514 "(either a signal value in the range 1..maxsig, or 0 to clear). This is the "
2515 "signal that the calling process will get when its parent dies. This value "
2516 "is cleared for the child of a B<fork>(2) and (since Linux 2.5.36 / 2.6.23) "
2517 "when executing a set-user_ID or set-group-ID binary."
2519 "親プロセス死亡シグナル (parent process death signal) を I<arg2> に設定\n"
2520 "する (設定できるシグナル値の範囲は 1..maxsig であり、0 は通知の解除であ\n"
2521 "る)。 呼び出し元プロセスの親プロセスが死んだ際に、ここで設定した値が シ\n"
2522 "グナルとして通知される。この値は B<fork>(2) の子プロセスでは解除される。\n"
2523 "(Linux 2.5.36 以降および 2.6.23 以降では) set-user-ID もしくは\n"
2524 "set-group-ID されたバイナリを実行した場合にも、このフラグは解除される。"
2527 #: build/C/man2/prctl.2:228
2529 msgid "B<PR_GET_PDEATHSIG> (since Linux 2.3.15)"
2530 msgstr "B<PR_GET_PDEATHSIG> (Linux 2.3.15 以降)"
2533 #: build/C/man2/prctl.2:233
2535 "Return the current value of the parent process death signal, in the location "
2536 "pointed to by I<(int\\ *) arg2>."
2538 "親プロセス死亡シグナルの現在の値を I<(int\\ *) arg2> が指す場所に格納して返"
2542 #: build/C/man2/prctl.2:233
2544 msgid "B<PR_SET_SECCOMP> (since Linux 2.6.23)"
2545 msgstr "B<PR_SET_SECCOMP> (Linux 2.6.23 以降)"
2547 #. See http://thread.gmane.org/gmane.linux.kernel/542632
2548 #. [PATCH 0 of 2] seccomp updates
2549 #. andrea@cpushare.com
2551 #: build/C/man2/prctl.2:257
2553 "Set the secure computing mode for the calling thread. In the current "
2554 "implementation, I<arg2> must be 1. After the secure computing mode has been "
2555 "set to 1, the only system calls that the thread is permitted to make are "
2556 "B<read>(2), B<write>(2), B<_exit>(2), and B<sigreturn>(2). Other system "
2557 "calls result in the delivery of a B<SIGKILL> signal. Secure computing mode "
2558 "is useful for number-crunching applications that may need to execute "
2559 "untrusted byte code, perhaps obtained by reading from a pipe or socket. "
2560 "This operation is only available if the kernel is configured with "
2561 "CONFIG_SECCOMP enabled."
2563 "呼び出したスレッドの secure computing モードを設定する。 現在の実装では、 "
2564 "I<arg2> は 1 にしなければならない。 secure computing モードを 1 に設定する"
2565 "と、 そのスレッドが呼び出しを許可されるシステムコールは B<read>(2), B<write>"
2566 "(2), B<_exit>(2), B<sigreturn>(2) だけになる。 それ以外のシステムコールを呼"
2567 "び出すと、シグナル B<SIGKILL> が配送される。 パイプやソケットから読み込んだ、"
2568 "信頼できないバイトコードを実行する 必要がある大量の演算を行うアプリケーション"
2569 "において、 secure computing モードは役立つ。 この操作は利用できるのは、カーネ"
2570 "ルが CONFIG_SECCOMP を有効にして 作成されている場合だけである。"
2573 #: build/C/man2/prctl.2:257
2575 msgid "B<PR_GET_SECCOMP> (since Linux 2.6.23)"
2576 msgstr "B<PR_GET_SECCOMP> (Linux 2.6.23 以降)"
2579 #: build/C/man2/prctl.2:270
2581 "Return the secure computing mode of the calling thread. Not very useful for "
2582 "the current implementation (mode equals 1), but may be useful for other "
2583 "possible future modes: if the caller is not in secure computing mode, this "
2584 "operation returns 0; if the caller is in secure computing mode, then the "
2585 "B<prctl>() call will cause a B<SIGKILL> signal to be sent to the process. "
2586 "This operation is only available if the kernel is configured with "
2587 "CONFIG_SECCOMP enabled."
2589 "呼び出したスレッドの secure computing モードを返す。 現在の実装 (モードは 1 "
2590 "固定) はあまり役に立たないが、 将来他のモードが実装されると役立つようになるか"
2591 "もしれない。 呼び出したスレッドが secure computing モードでなかった場合、 こ"
2592 "の操作は 0 を返す。 呼び出したスレッドが secure computing モードの場合、 "
2593 "B<prctl>() を呼び出すとシグナル B<SIGKILL> がそのプロセスに送信される。 この"
2594 "操作が利用できるのは、カーネルが CONFIG_SECCOMP を有効にして 作成されている場"
2598 #: build/C/man2/prctl.2:270
2600 msgid "B<PR_SET_SECUREBITS> (since Linux 2.6.26)"
2601 msgstr "B<PR_SET_SECUREBITS> (Linux 2.6.26 以降)"
2604 #: build/C/man2/prctl.2:276
2606 "Set the \"securebits\" flags of the calling thread to the value supplied in "
2607 "I<arg2>. See B<capabilities>(7)."
2609 "呼び出したスレッドの \"securebits\" フラグを I<arg2> で渡された値に設定す"
2610 "る。 B<capabilities>(7) 参照。"
2613 #: build/C/man2/prctl.2:276
2615 msgid "B<PR_GET_SECUREBITS> (since Linux 2.6.26)"
2616 msgstr "B<PR_GET_SECUREBITS> (Linux 2.6.26 以降)"
2619 #: build/C/man2/prctl.2:282
2621 "Return (as the function result) the \"securebits\" flags of the calling "
2622 "thread. See B<capabilities>(7)."
2624 "呼び出したスレッドの \"securebits\" フラグを (関数の返り値として) 返す。 "
2625 "B<capabilities>(7) 参照。"
2628 #: build/C/man2/prctl.2:282
2630 msgid "B<PR_SET_TIMING> (since Linux 2.6.0-test4)"
2631 msgstr "B<PR_SET_TIMING> (Linux 2.6.0-test4 以降)"
2635 #. PR_TIMING_TIMESTAMP doesn't do anything in 2.6.26-rc8,
2636 #. and looking at the patch history, it appears
2637 #. that it never did anything.
2639 #: build/C/man2/prctl.2:299
2641 "Set whether to use (normal, traditional) statistical process timing or "
2642 "accurate timestamp-based process timing, by passing B<PR_TIMING_STATISTICAL> "
2643 "or B<PR_TIMING_TIMESTAMP> to I<arg2>. B<PR_TIMING_TIMESTAMP> is not "
2644 "currently implemented (attempting to set this mode will yield the error "
2647 "(通常の、伝統的に使われてきた) 統計的なプロセスタイミングを使用するか、\n"
2648 "正確なタイムスタンプに基づくプロセスタイミングを使用するかを設定する。\n"
2649 "I<arg2> に指定できる値は B<PR_TIMING_STATISTICAL> か\n"
2650 "B<PR_TIMING_TIMESTAMP> である。 B<PR_TIMING_TIMESTAMP> は現在のところ実\n"
2651 "装されていない (このモードに設定しようとするとエラー B<EINVAL> が起こる\n"
2655 #: build/C/man2/prctl.2:299
2657 msgid "B<PR_GET_TIMING> (since Linux 2.6.0-test4)"
2658 msgstr "B<PR_GET_TIMING> (Linux 2.6.0-test4 以降)"
2661 #: build/C/man2/prctl.2:303
2663 "Return (as the function result) which process timing method is currently in "
2665 msgstr "現在使用中のプロセスタイミングを決める方法を返す。"
2668 #: build/C/man2/prctl.2:303
2670 msgid "B<PR_TASK_PERF_EVENTS_DISABLE> (since Linux 2.6.31)"
2671 msgstr "B<PR_TASK_PERF_EVENTS_DISABLE> (Linux 2.6.31 以降)"
2674 #: build/C/man2/prctl.2:312
2676 "Disable all performance counters attached to the calling process, regardless "
2677 "of whether the counters were created by this process or another process. "
2678 "Performance counters created by the calling process for other processes are "
2679 "unaffected. For more information on performance counters, see the kernel "
2680 "source file I<tools/perf/design.txt>."
2683 #. commit 1d1c7ddbfab358445a542715551301b7fc363e28
2685 #: build/C/man2/prctl.2:318
2687 "Originally called B<PR_TASK_PERF_COUNTERS_DISABLE>; renamed (with same "
2688 "numerical value) in Linux 2.6.32."
2690 "以前は B<PR_TASK_PERF_COUNTERS_DISABLE> と呼ばれていた。\n"
2691 "Linux 2.6.32 で名前が変更された (数値は同じままである)。"
2694 #: build/C/man2/prctl.2:318
2696 msgid "B<PR_TASK_PERF_EVENTS_ENABLE> (since Linux 2.6.31)"
2697 msgstr "B<PR_TASK_PERF_EVENTS_ENABLE> (Linux 2.6.31 以降)"
2700 #: build/C/man2/prctl.2:323
2702 "The converse of B<PR_TASK_PERF_EVENTS_DISABLE>; enable performance counters "
2703 "attached to the calling process."
2706 #. commit 1d1c7ddbfab358445a542715551301b7fc363e28
2707 #. commit cdd6c482c9ff9c55475ee7392ec8f672eddb7be6
2709 #: build/C/man2/prctl.2:330
2711 "Originally called B<PR_TASK_PERF_COUNTERS_ENABLE>; renamed in Linux 2.6.32."
2713 "以前は B<PR_TASK_PERF_COUNTERS_ENABLE> と呼ばれていた。\n"
2714 "Linux 2.6.32 で名前が変更された。"
2717 #: build/C/man2/prctl.2:330
2719 msgid "B<PR_SET_TSC> (since Linux 2.6.26, x86 only)"
2720 msgstr "B<PR_SET_TSC> (Linux 2.6.26 以降, x86 のみ)"
2723 #: build/C/man2/prctl.2:343
2725 "Set the state of the flag determining whether the timestamp counter can be "
2726 "read by the process. Pass B<PR_TSC_ENABLE> to I<arg2> to allow it to be "
2727 "read, or B<PR_TSC_SIGSEGV> to generate a B<SIGSEGV> when the process tries "
2728 "to read the timestamp counter."
2730 "そのプロセスがタイムスタンプ・カウンタを読み出せるかを決定する フラグの状態を"
2731 "設定する。 読み出しを許可する場合は I<arg2> に B<PR_TSC_ENABLE> を、そのプロ"
2732 "セスがタイムスタンプ・カウンタを読み出そうとした際に B<SIGSEGV> を発生させる"
2733 "場合には B<PR_TSC_SIGSEGV> を渡す。"
2736 #: build/C/man2/prctl.2:343
2738 msgid "B<PR_GET_TSC> (since Linux 2.6.26, x86 only)"
2739 msgstr "B<PR_GET_TSC> (Linux 2.6.26 以降, x86 のみ)"
2742 #: build/C/man2/prctl.2:349
2744 "Return the state of the flag determining whether the timestamp counter can "
2745 "be read, in the location pointed to by I<(int\\ *) arg2>."
2747 "そのプロセスがタイムスタンプ・カウンタを読み出せるかを決定する フラグの状態"
2748 "を I<(int\\ *) arg2> が指す場所に格納して返す。"
2751 #: build/C/man2/prctl.2:349
2753 msgid "B<PR_SET_UNALIGN>"
2754 msgstr "B<PR_SET_UNALIGN>"
2757 #: build/C/man2/prctl.2:359
2759 "(Only on: ia64, since Linux 2.3.48; parisc, since Linux 2.6.15; PowerPC, "
2760 "since Linux 2.6.18; Alpha, since Linux 2.6.22) Set unaligned access control "
2761 "bits to I<arg2>. Pass B<PR_UNALIGN_NOPRINT> to silently fix up unaligned "
2762 "user accesses, or B<PR_UNALIGN_SIGBUS> to generate B<SIGBUS> on unaligned "
2765 "(ia64 では Linux 2.3.48 以降; parisc では Linux 2.6.15 以降; PowerPC では "
2766 "Linux 2.6.18 以降; Alpha では Linux 2.6.22 以降; これらのアーキテクチャの"
2767 "み) unaligned アクセス制御ビットを I<arg2> で指定された値に設定する。 指定で"
2768 "きる値は B<PR_UNALIGN_NOPRINT> (unaligned なユーザアクセスを黙って 修正する) "
2769 "か B<PR_UNALIGN_SIGBUS> (unaligned なユーザアクセスがあった場合 B<SIGBUS> を"
2773 #: build/C/man2/prctl.2:359
2775 msgid "B<PR_GET_UNALIGN>"
2776 msgstr "B<PR_GET_UNALIGN>"
2779 #: build/C/man2/prctl.2:366
2781 "(see B<PR_SET_UNALIGN> for information on versions and architectures) "
2782 "Return unaligned access control bits, in the location pointed to by I<(int\\ "
2785 "(バージョンとアーキテクチャの情報は B<PR_SET_UNALIGN> 参照) unaligned アクセ"
2786 "ス制御ビットの値を I<(int\\ *) arg2> が指す場所に格納して返す。"
2789 #: build/C/man2/prctl.2:366
2791 msgid "B<PR_MCE_KILL> (since Linux 2.6.32)"
2792 msgstr "B<PR_MCE_KILL> (Linux 2.6.32 以降)"
2795 #: build/C/man2/prctl.2:406
2797 "Set the machine check memory corruption kill policy for the current thread. "
2798 "If I<arg2> is B<PR_MCE_KILL_CLEAR>, clear the thread memory corruption kill "
2799 "policy and use the system-wide default. (The system-wide default is defined "
2800 "by I</proc/sys/vm/memory_failure_early_kill>; see B<proc>(5).) If I<arg2> "
2801 "is B<PR_MCE_KILL_SET>, use a thread-specific memory corruption kill policy. "
2802 "In this case, I<arg3> defines whether the policy is I<early kill> "
2803 "(B<PR_MCE_KILL_EARLY>), I<late kill> (B<PR_MCE_KILL_LATE>), or the system-"
2804 "wide default (B<PR_MCE_KILL_DEFAULT>). Early kill means that the thread "
2805 "receives a B<SIGBUS> signal as soon as hardware memory corruption is "
2806 "detected inside its address space. In late kill mode, the process is only "
2807 "killed when it accesses a corrupted page. See B<sigaction>(2) for more "
2808 "information on the B<SIGBUS> signal. The policy is inherited by children. "
2809 "The remaining unused B<prctl>() arguments must be zero for future "
2814 #: build/C/man2/prctl.2:406
2816 msgid "B<PR_MCE_KILL_GET> (since Linux 2.6.32)"
2817 msgstr "B<PR_MCE_KILL_GET> (Linux 2.6.32 以降)"
2820 #: build/C/man2/prctl.2:412
2822 "Return the current per-process machine check kill policy. All unused "
2823 "B<prctl>() arguments must be zero."
2827 #: build/C/man2/prctl.2:412
2829 msgid "B<PR_SET_MM> (since Linux 3.3)"
2830 msgstr "B<PR_SET_MM> (Linux 3.3 以降)"
2833 #: build/C/man2/prctl.2:432
2835 "Modify certain kernel memory map descriptor fields of the calling process. "
2836 "Usually these fields are set by the kernel and dynamic loader (see B<ld.so>"
2837 "(8) for more information) and a regular application should not use this "
2838 "feature. However, there are cases, such as self-modifying programs, where a "
2839 "program might find it useful to change its own memory map. This feature is "
2840 "available only if the kernel is built with the B<CONFIG_CHECKPOINT_RESTORE> "
2841 "option enabled. The calling process must have the B<CAP_SYS_RESOURCE> "
2842 "capability. The value in I<arg2> is one of the options below, while I<arg3> "
2843 "provides a new value for the option."
2847 #: build/C/man2/prctl.2:433
2849 msgid "B<PR_SET_MM_START_CODE>"
2850 msgstr "B<PR_SET_MM_START_CODE>"
2853 #: build/C/man2/prctl.2:442
2855 "Set the address above which the program text can run. The corresponding "
2856 "memory area must be readable and executable, but not writable or sharable "
2857 "(see B<mprotect>(2) and B<mmap>(2) for more information)."
2861 #: build/C/man2/prctl.2:442
2863 msgid "B<PR_SET_MM_END_CODE>"
2864 msgstr "B<PR_SET_MM_END_CODE>"
2867 #: build/C/man2/prctl.2:447
2869 "Set the address below which the program text can run. The corresponding "
2870 "memory area must be readable and executable, but not writable or sharable."
2874 #: build/C/man2/prctl.2:447
2876 msgid "B<PR_SET_MM_START_DATA>"
2877 msgstr "B<PR_SET_MM_START_DATA>"
2880 #: build/C/man2/prctl.2:453
2882 "Set the address above which initialized and uninitialized (bss) data are "
2883 "placed. The corresponding memory area must be readable and writable, but "
2884 "not executable or sharable."
2888 #: build/C/man2/prctl.2:453
2890 msgid "B<PR_SET_MM_END_DATA>"
2891 msgstr "B<PR_SET_MM_END_DATA>"
2894 #: build/C/man2/prctl.2:459
2896 "Set the address below which initialized and uninitialized (bss) data are "
2897 "placed. The corresponding memory area must be readable and writable, but "
2898 "not executable or sharable."
2902 #: build/C/man2/prctl.2:459
2904 msgid "B<PR_SET_MM_START_STACK>"
2905 msgstr "B<PR_SET_MM_START_STACK>"
2908 #: build/C/man2/prctl.2:463
2910 "Set the start address of the stack. The corresponding memory area must be "
2911 "readable and writable."
2915 #: build/C/man2/prctl.2:463
2917 msgid "B<PR_SET_MM_START_BRK>"
2918 msgstr "B<PR_SET_MM_START_BRK>"
2921 #: build/C/man2/prctl.2:475
2923 "Set the address above which the program heap can be expanded with B<brk>(2) "
2924 "call. The address must be greater than the ending address of the current "
2925 "program data segment. In addition, the combined size of the resulting heap "
2926 "and the size of the data segment can't exceed the B<RLIMIT_DATA> resource "
2927 "limit (see B<setrlimit>(2))."
2931 #: build/C/man2/prctl.2:475
2933 msgid "B<PR_SET_MM_BRK>"
2934 msgstr "B<PR_SET_MM_BRK>"
2936 #. FIXME The following (until ========) is not yet in mainline kernel,
2937 #. so commented out for the moment.
2939 #. .BR PR_SET_MM_ARG_START
2940 #. Set the address above which the program command line is placed.
2942 #. .BR PR_SET_MM_ARG_END
2943 #. Set the address below which the program command line is placed.
2945 #. .BR PR_SET_MM_ENV_START
2946 #. Set the address above which the program environment is placed.
2948 #. .BR PR_SET_MM_ENV_END
2949 #. Set the address below which the program environment is placed.
2951 #. The address passed with
2952 #. .BR PR_SET_MM_ARG_START ,
2953 #. .BR PR_SET_MM_ARG_END ,
2954 #. .BR PR_SET_MM_ENV_START ,
2956 #. .BR PR_SET_MM_ENV_END
2957 #. should belong to a process stack area.
2958 #. Thus, the corresponding memory area must be readable, writable, and
2959 #. (depending on the kernel configuration) have the
2960 #. .BR MAP_GROWSDOWN
2961 #. attribute set (see
2964 #. .BR PR_SET_MM_AUXV
2965 #. Set a new auxiliary vector.
2968 #. argument should provide the address of the vector.
2971 #. is the size of the vector.
2973 #. .BR PR_SET_MM_EXE_FILE
2975 #. .IR /proc/pid/exe
2976 #. symbolic link with a new one pointing to a new executable file
2977 #. identified by the file descriptor provided in
2980 #. The file descriptor should be obtained with a regular
2984 #. To change the symbolic link, one needs to unmap all existing
2985 #. executable memory areas, including those created by the kernel itself
2986 #. (for example the kernel usually creates at least one executable
2987 #. memory area for the ELF
2991 #. The second limitation is that such transitions can be done only once
2992 #. in a process life time.
2993 #. Any further attempts will be rejected.
2994 #. This should help system administrators to monitor unusual
2995 #. symbolic-link transitions over all process running in a system.
2996 #. ========== END FIXME
2998 #: build/C/man2/prctl.2:544
3000 "Set the current B<brk>(2) value. The requirements for the address are the "
3001 "same as for the B<PR_SET_MM_START_BRK> option."
3005 #: build/C/man2/prctl.2:563
3007 "On success, B<PR_GET_DUMPABLE>, B<PR_GET_KEEPCAPS>, B<PR_CAPBSET_READ>, "
3008 "B<PR_GET_TIMING>, B<PR_GET_SECUREBITS>, B<PR_MCE_KILL_GET>, and (if it "
3009 "returns) B<PR_GET_SECCOMP> return the nonnegative values described above. "
3010 "All other I<option> values return 0 on success. On error, -1 is returned, "
3011 "and I<errno> is set appropriately."
3013 "成功すると、 B<PR_GET_DUMPABLE>, B<PR_GET_KEEPCAPS>,\n"
3014 "B<PR_CAPBSET_READ>, B<PR_GET_TIMING>, B<PR_GET_SECUREBITS>,\n"
3015 "B<PR_MCE_KILL_GET>, B<PR_GET_SECCOMP> は上述の負でない値を返す (なお、\n"
3016 "B<PR_GET_SECCOMP> は返らない場合もある)。 I<option> が他の値の場合は\n"
3018 "エラーの場合、-1 を返し、 I<errno> に適切な値を設定する。"
3021 #: build/C/man2/prctl.2:568
3022 msgid "I<arg2> is an invalid address."
3023 msgstr "I<arg2> が不正なアドレスである。"
3026 #: build/C/man2/prctl.2:573
3027 msgid "The value of I<option> is not recognized."
3028 msgstr "I<option> の値が理解できない。"
3031 #: build/C/man2/prctl.2:585
3033 "I<option> is B<PR_MCE_KILL> or B<PR_MCE_KILL_GET> or B<PR_SET_MM>, and "
3034 "unused B<prctl>() arguments were not specified as zero."
3038 #: build/C/man2/prctl.2:590
3039 msgid "I<arg2> is not valid value for this I<option>."
3040 msgstr "I<arg2> が指定された I<option> で有効な値ではない。"
3043 #: build/C/man2/prctl.2:599
3045 "I<option> is B<PR_SET_SECCOMP> or B<PR_SET_SECCOMP>, and the kernel was not "
3046 "configured with B<CONFIG_SECCOMP>."
3048 "I<option> が B<PR_SET_SECCOMP> か B<PR_GET_SECCOMP> だが、カーネルが "
3049 "B<CONFIG_SECCOMP> を有効にして作成されていなかった。"
3052 #: build/C/man2/prctl.2:605
3053 msgid "I<option> is B<PR_SET_MM>, and one of the following is true"
3057 #: build/C/man2/prctl.2:611
3058 msgid "I<arg4> or I<arg5> is nonzero;"
3062 #: build/C/man2/prctl.2:616
3064 "I<arg3> is greater than B<TASK_SIZE> (the limit on the size of the user "
3065 "address space for this architecture);"
3069 #: build/C/man2/prctl.2:626
3071 "I<arg2> is B<PR_SET_MM_START_CODE>, B<PR_SET_MM_END_CODE>, "
3072 "B<PR_SET_MM_START_DATA>, B<PR_SET_MM_END_DATA>, or B<PR_SET_MM_START_STACK,> "
3073 "and the permissions of the corresponding memory area are not as required;"
3077 #: build/C/man2/prctl.2:638
3079 "I<arg2> is B<PR_SET_MM_START_BRK> or B<PR_SET_MM_BRK>, and I<arg3> is less "
3080 "than or equal to the end of the data segment or specifies a value that would "
3081 "cause the B<RLIMIT_DATA> resource limit to be exceeded."
3085 #: build/C/man2/prctl.2:651
3087 "I<option> is B<PR_SET_SECUREBITS>, and the caller does not have the "
3088 "B<CAP_SETPCAP> capability, or tried to unset a \"locked\" flag, or tried to "
3089 "set a flag whose corresponding locked flag was set (see B<capabilities>(7))."
3091 "I<option> が B<PR_SET_SECUREBITS> で、呼び出し元がケーパビリティ "
3092 "B<CAP_SETPCAP> を持っていない。 または、\"locked\" フラグを解除しようとし"
3093 "た。 または、locked フラグがセットされているフラグをセットしようとした "
3094 "(B<capabilities>(7) 参照)。"
3097 #: build/C/man2/prctl.2:661
3099 "I<option> is B<PR_SET_KEEPCAPS>, and the callers's "
3100 "B<SECURE_KEEP_CAPS_LOCKED> flag is set (see B<capabilities>(7))."
3102 "I<option> が B<PR_SET_KEEPCAPS> で、呼び出し元のフラグ "
3103 "B<SECURE_KEEP_CAPS_LOCKED> がセットされている (B<capabilities>(7) 参照)。"
3106 #: build/C/man2/prctl.2:669
3108 "I<option> is B<PR_CAPBSET_DROP>, and the caller does not have the "
3109 "B<CAP_SETPCAP> capability."
3111 "I<option> が B<PR_CAPBSET_DROP> で、呼び出し元がケーパビリティ "
3112 "B<CAP_SETPCAP> を持っていない。"
3114 #. FIXME The following (until ========) is not yet in mainline kernel,
3115 #. so commented out for the moment.
3124 #. .BR PR_SET_MM_EXE_FILE ,
3125 #. the file is not executable.
3133 #. .BR PR_SET_MM_EXE_FILE ,
3134 #. and this the second attempt to change the
3136 #. symbolic link, which is prohibited.
3144 #. .BR PR_SET_MM_EXE_FILE ,
3145 #. and the file descriptor passed in
3148 #. ========== END FIXME
3149 #. The following can't actually happen, because prctl() in
3150 #. seccomp mode will cause SIGKILL.
3155 #. .BR PR_SET_SECCOMP ,
3156 #. and secure computing mode is already 1.
3158 #: build/C/man2/prctl.2:720
3160 "I<option> is B<PR_SET_MM>, and the caller does not have the "
3161 "B<CAP_SYS_RESOURCE> capability."
3163 "I<option> が B<PR_SET_MM> で、呼び出し元がケーパビリティ\n"
3164 "B<CAP_SYS_RESOURCE> を持っていない。"
3166 #. The library interface was added in glibc 2.0.6
3168 #: build/C/man2/prctl.2:725
3169 msgid "The B<prctl>() system call was introduced in Linux 2.1.57."
3170 msgstr "B<prctl>() システムコールは Linux 2.1.57 で導入された。"
3173 #: build/C/man2/prctl.2:732
3175 "This call is Linux-specific. IRIX has a B<prctl>() system call (also "
3176 "introduced in Linux 2.1.44 as irix_prctl on the MIPS architecture), with "
3179 "このコールは Linux 特有である。 IRIX には B<prctl>() システム・コールがある"
3180 "が (MIPS アーキテクチャにおいて irix_prctl として Linux 2.1.44 で同様に導入さ"
3184 #: build/C/man2/prctl.2:734
3185 msgid "B<ptrdiff_t prctl(int >I<option>B<, int >I<arg2>B<, int >I<arg3>B<);>"
3186 msgstr "B<ptrdiff_t prctl(int >I<option>B<, int >I<arg2>B<, int >I<arg3>B<);>"
3189 #: build/C/man2/prctl.2:739
3191 "and options to get the maximum number of processes per user, get the maximum "
3192 "number of processors the calling process can use, find out whether a "
3193 "specified process is currently blocked, get or set the maximum stack size, "
3196 "である。ユーザー当りのプロセス最大数を取得するオプション、 プロセスの使用でき"
3197 "る最大プロッサー数を取得するオプション、 現在特定のプロセスが停止(block)させ"
3198 "られているかどうか調べるオプション、 スタックサイズの最大値の取得や設定を行な"
3202 #: build/C/man2/prctl.2:742
3203 msgid "B<signal>(2), B<core>(5)"
3204 msgstr "B<signal>(2), B<core>(5)"
3207 #: build/C/man3/profil.3:28
3213 #: build/C/man3/profil.3:31
3214 msgid "profil - execution time profile"
3215 msgstr "profil - 実行時間プロファイル (profile)"
3218 #: build/C/man3/profil.3:36
3220 "B<int profil(unsigned short *>I<buf>B<, size_t >I<bufsiz>B<, size_t "
3221 ">I<offset>B<, unsigned int >I<scale>B<);>"
3223 "B<int profil(unsigned short *>I<buf>B<, size_t >I<bufsiz>B<, size_t "
3224 ">I<offset>B<, unsigned int >I<scale>B<);>"
3227 #: build/C/man3/profil.3:44
3229 "B<profil>(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
3231 "B<profil>(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
3234 #: build/C/man3/profil.3:66
3236 "This routine provides a means to find out in what areas your program spends "
3237 "most of its time. The argument I<buf> points to I<bufsiz> bytes of core. "
3238 "Every virtual 10 milliseconds, the user's program counter (PC) is examined: "
3239 "I<offset> is subtracted and the result is multiplied by I<scale> and divided "
3240 "by 65536. If the resulting value is less than I<bufsiz>, then the "
3241 "corresponding entry in I<buf> is incremented. If I<buf> is NULL, profiling "
3244 "このルーティンはプログラムのどこの部分で時間を費やしているかを調べる 手段を提"
3245 "供する。引き数 I<buf> は I<bufsiz> バイトのメモリを指している。仮想の 10 ミリ"
3246 "秒ごとに、ユーザーの プログラム・カウンター (PC) が検査される: I<offset> が引"
3247 "かれ、その結果が I<scale> 倍され 65536 で割られる。 結果が I<bufsiz> より小さ"
3248 "い場合は I<buf> の対応するエントリがインクリメントされる。 I<buf> が NULL な"
3249 "らば、プロファイル (profile) は無効にされる。"
3252 #: build/C/man3/profil.3:68
3253 msgid "Zero is always returned."
3254 msgstr "常に 0 が返される。"
3257 #: build/C/man3/profil.3:70
3258 msgid "Similar to a call in SVr4 (but not POSIX.1-2001)."
3259 msgstr "SVr4 のコールに似ている (しかし POSIX.1-2001 ではない)。"
3262 #: build/C/man3/profil.3:76
3264 "B<profil>() cannot be used on a program that also uses B<ITIMER_PROF> "
3265 "interval timers (see B<setitimer>(2))."
3267 "B<profil>() は B<ITIMER_PROF> インターバル・タイマーも使用しているプログラム"
3268 "では使用できない (B<setitimer>(2) 参照)。"
3271 #: build/C/man3/profil.3:79
3273 "True kernel profiling provides more accurate results. Libc 4.4 contained a "
3274 "kernel patch providing a system call profil."
3276 "本当のカーネル・プロファイルはより正確な結果を与える。 libc 4.4 にはシステム"
3277 "コール profil を提供するための カーネルパッチが含まれていた。"
3280 #: build/C/man3/profil.3:84
3281 msgid "B<gprof>(1), B<setitimer>(2), B<sigaction>(2), B<signal>(2)"
3282 msgstr "B<gprof>(1), B<setitimer>(2), B<sigaction>(2), B<signal>(2)"
3285 #: build/C/man3/psignal.3:28
3291 #: build/C/man3/psignal.3:28
3297 #: build/C/man3/psignal.3:28 build/C/man3/raise.3:27
3298 #: build/C/man7/sigevent.7:24
3304 #: build/C/man3/psignal.3:31
3305 msgid "psignal, psiginfo - print signal message"
3306 msgstr "psignal, psiginfo - シグナルメッセージを表示"
3309 #: build/C/man3/psignal.3:37
3312 "B<void psignal(int >I<sig>B<, const char *>I<s>B<);>\n"
3313 "B<void psiginfo(const siginfo_t *>I<pinfo>B<, const char *>I<s>B<);>\n"
3315 "B<void psignal(int >I<sig>B<, const char *>I<s>B<);>\n"
3316 "B<void psiginfo(const siginfo_t *>I<pinfo>B<, const char *>I<s>B<);>\n"
3319 #: build/C/man3/psignal.3:39
3321 msgid "B<extern const char *const >I<sys_siglist>B<[];>\n"
3322 msgstr "B<extern const char *const >I<sys_siglist>B<[];>\n"
3325 #: build/C/man3/psignal.3:48
3326 msgid "B<psignal>(): _SVID_SOURCE || _BSD_SOURCE"
3327 msgstr "B<psignal>(): _SVID_SOURCE || _BSD_SOURCE"
3330 #: build/C/man3/psignal.3:51
3332 "B<psiginfo>(): _XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ "
3335 "B<psiginfo>(): _XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ "
3339 #: build/C/man3/psignal.3:54
3340 msgid "I<sys_siglist>: _BSD_SOURCE"
3341 msgstr "I<sys_siglist>: _BSD_SOURCE"
3344 #: build/C/man3/psignal.3:63
3346 "The B<psignal>() function displays a message on I<stderr> consisting of the "
3347 "string I<s>, a colon, a space, a string describing the signal number I<sig>, "
3348 "and a trailing newline. If the string I<s> is NULL or empty, the colon and "
3349 "space are omitted. If I<sig> is invalid, the message displayed will "
3350 "indicate an unknown signal."
3352 "B<psignal>() 関数は、文字列 I<s>、コロン、スペース、\n"
3353 "シグナル番号 I<sig> を説明する文字列、終端の改行から\n"
3354 "構成されるメッセージを I<stderr> に表示する。\n"
3355 "文字列 I<s> が NULL か空の場合、コロンとスペースは省略される。\n"
3356 "I<sig> が不正ならば、表示される メッセージは未知のシグナルを示す。"
3359 #: build/C/man3/psignal.3:84
3361 "The B<psiginfo>() function is like B<psignal>(), except that it displays "
3362 "information about the signal described by I<pinfo>, which should point to a "
3363 "valid I<siginfo_t> structure. As well as the signal description, B<psiginfo>"
3364 "() displays information about the origin of the signal, and other "
3365 "information relevant to the signal (e.g., the relevant memory address for "
3366 "hardware-generated signals, the child process ID for B<SIGCHLD>, and the "
3367 "user ID and process ID of the sender, for signals set using B<kill>(2) or "
3372 #: build/C/man3/psignal.3:87
3374 "The array I<sys_siglist> holds the signal description strings indexed by "
3377 "配列 I<sys_siglist> はシグナルを説明する文字列を保持しており、 配列へのアクセ"
3378 "スにはシグナル番号を添え字として用いる事ができる。"
3381 #: build/C/man3/psignal.3:93
3382 msgid "The B<psignal>() and B<psiginfo>() functions return no value."
3383 msgstr "関数 B<psignal>() と B<psiginfo>() は、値を返さない。"
3386 #: build/C/man3/psignal.3:97
3387 msgid "The B<psiginfo>() function was added to glibc in version 2.10."
3388 msgstr "B<psiginfo>() 関数は glibc バージョン 2.10 で追加された。"
3391 #: build/C/man3/psignal.3:99
3392 msgid "POSIX.1-2008, 4.3BSD."
3393 msgstr "POSIX.1-2008, 4.3BSD."
3396 #: build/C/man3/psignal.3:103
3397 msgid "In glibc versions up to 2.12, B<psiginfo>() had the following bugs:"
3399 "バージョン 2.12 までの glibc では B<psiginfo>() には以下のバグがあった。"
3401 #. FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12107
3402 #. Reportedly now fixed; check glibc 2.13
3404 #: build/C/man3/psignal.3:107
3405 msgid "In some circumstances, a trailing newline is not printed."
3408 #. FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12108
3409 #. Reportedly now fixed; check glibc 2.13
3411 #: build/C/man3/psignal.3:111
3412 msgid "Additional details are not displayed for real-time signals."
3416 #: build/C/man3/psignal.3:116
3417 msgid "B<sigaction>(2), B<perror>(3), B<strsignal>(3), B<signal>(7)"
3418 msgstr "B<sigaction>(2), B<perror>(3), B<strsignal>(3), B<signal>(7)"
3421 #: build/C/man3/raise.3:27
3427 #: build/C/man3/raise.3:27
3433 #: build/C/man3/raise.3:30
3434 msgid "raise - send a signal to the caller"
3435 msgstr "raise - 呼び出し元にシグナルを送る"
3438 #: build/C/man3/raise.3:35
3440 msgid "B<int raise(int >I<sig>B<);>\n"
3441 msgstr "B<int raise(int >I<sig>B<);>\n"
3444 #: build/C/man3/raise.3:41
3446 "The B<raise>() function sends a signal to the calling process or thread. "
3447 "In a single-threaded program it is equivalent to"
3449 "B<raise>() 関数は、呼び出し元のプロセスもしくはスレッドにシグナルを送る。 シ"
3450 "ングルスレッドのプログラムでは、以下と等価である。"
3453 #: build/C/man3/raise.3:45
3455 msgid "kill(getpid(), sig);\n"
3456 msgstr "kill(getpid(), sig);\n"
3459 #: build/C/man3/raise.3:49
3460 msgid "In a multithreaded program it is equivalent to"
3461 msgstr "マルチスレッドのプログラムでは、以下と等価である。"
3464 #: build/C/man3/raise.3:53
3466 msgid "pthread_kill(pthread_self(), sig);\n"
3467 msgstr "pthread_kill(pthread_self(), sig);\n"
3470 #: build/C/man3/raise.3:59
3472 "If the signal causes a handler to be called, B<raise>() will only return "
3473 "after the signal handler has returned."
3475 "シグナルに起因してシグナル・ハンドラが呼び出される場合には、 B<raise>() が返"
3476 "るのは必ずシグナル・ハンドラが返った後になる。"
3479 #: build/C/man3/raise.3:62
3480 msgid "B<raise>() returns 0 on success, and nonzero for failure."
3481 msgstr "成功した場合は 0 を、失敗した場合は 0 以外の値を返す。"
3484 #: build/C/man3/raise.3:64 build/C/man2/signal.2:107
3485 msgid "C89, C99, POSIX.1-2001."
3486 msgstr "C89, C99, POSIX.1-2001."
3488 #. 2.3.2 used the obsolete tkill(), if available.
3490 #: build/C/man3/raise.3:75
3492 "Since version 2.3.3, glibc implements B<raise>() by calling B<tgkill>(2), "
3493 "if the kernel supports that system call. Older glibc versions implemented "
3494 "B<raise>() using B<kill>(2)."
3496 "glibc バージョン 2.3.3 以降では、カーネルが B<tgkill>(2) システムコール\n"
3497 "をサポートしている場合はB<raise>() は B<tgkill>(2) を使って実装されて\n"
3498 "いる。古いバージョンの glibc では、B<raise>() は B<kill>(2) を使って\n"
3502 #: build/C/man3/raise.3:82
3504 "B<getpid>(2), B<kill>(2), B<sigaction>(2), B<signal>(2), B<pthread_kill>(3), "
3507 "B<getpid>(2), B<kill>(2), B<sigaction>(2), B<signal>(2), B<pthread_kill>(3), "
3511 #: build/C/man2/rt_sigqueueinfo.2:23
3513 msgid "RT_SIGQUEUEINFO"
3514 msgstr "RT_SIGQUEUEINFO"
3517 #: build/C/man2/rt_sigqueueinfo.2:23 build/C/man2/tkill.2:29
3523 #: build/C/man2/rt_sigqueueinfo.2:26
3524 msgid "rt_sigqueueinfo, rt_tgsigqueueinfo - queue a signal and data"
3528 #: build/C/man2/rt_sigqueueinfo.2:29
3530 msgid "B<int rt_sigqueueinfo(pid_t >I<tgid>B<, int >I<sig>B<, siginfo_t *>I<uinfo>B<);>\n"
3531 msgstr "B<int rt_sigqueueinfo(pid_t >I<tgid>B<, int >I<sig>B<, siginfo_t *>I<uinfo>B<);>\n"
3534 #: build/C/man2/rt_sigqueueinfo.2:32
3537 "B<int rt_tgsigqueueinfo(pid_t >I<tgid>B<, pid_t >I<tid>B<, int >I<sig>B<,>\n"
3538 "B< siginfo_t *>I<uinfo>B<);>\n"
3540 "B<int rt_tgsigqueueinfo(pid_t >I<tgid>B<, pid_t >I<tid>B<, int >I<sig>B<,>\n"
3541 "B< siginfo_t *>I<uinfo>B<);>\n"
3544 #: build/C/man2/rt_sigqueueinfo.2:45
3546 "The B<rt_sigqueueinfo>() and B<rt_tgsigqueueinfo>() system calls are the "
3547 "low-level interfaces used to send a signal plus data to a process or "
3548 "thread. The receiver of the signal can obtain the accompanying data by "
3549 "establishing a signal handler with the B<sigaction>(2) B<SA_SIGINFO> flag."
3553 #: build/C/man2/rt_sigqueueinfo.2:51
3555 "These system calls are not intended for direct application use; they are "
3556 "provided to allow the implementation of B<sigqueue>(3) and "
3557 "B<pthread_sigqueue>(3)."
3561 #: build/C/man2/rt_sigqueueinfo.2:63
3563 "The B<rt_sigqueueinfo>() system call sends the signal I<sig> to the thread "
3564 "group with the ID I<tgid>. (The term \"thread group\" is synonymous with "
3565 "\"process\", and I<tid> corresponds to the traditional UNIX process ID.) "
3566 "The signal will be delivered to an arbitrary member of the thread group (i."
3567 "e., one of the threads that is not currently blocking the signal)."
3571 #: build/C/man2/rt_sigqueueinfo.2:74
3573 "The I<uinfo> argument specifies the data to accompany the signal. This "
3574 "argument is a pointer to a structure of type I<siginfo_t>, described in "
3575 "B<sigaction>(2) (and defined by including I<E<lt>sigaction.hE<gt>>). The "
3576 "caller should set the following fields in this structure:"
3580 #: build/C/man2/rt_sigqueueinfo.2:74 build/C/man7/sigevent.7:86
3581 #: build/C/man2/wait.2:315
3588 #: build/C/man2/rt_sigqueueinfo.2:90
3590 "This must be one of the B<SI_*> codes in the kernel source file I<include/"
3591 "asm-generic/siginfo.h>, with the restriction that the code must be negative "
3592 "(i.e., cannot be B<SI_USER>, which is used by the kernel to indicate a "
3593 "signal sent by B<kill>(2)) and cannot (since Linux 2.6.39) be B<SI_TKILL> "
3594 "(which is used by the kernel to indicate a signal sent using B<tgkill>(2))."
3598 #: build/C/man2/rt_sigqueueinfo.2:90 build/C/man2/wait.2:294
3604 #: build/C/man2/rt_sigqueueinfo.2:94
3606 "This should be set to a process ID, typically the process ID of the sender."
3610 #: build/C/man2/rt_sigqueueinfo.2:94 build/C/man2/wait.2:297
3616 #: build/C/man2/rt_sigqueueinfo.2:98
3618 "This should be set to a user ID, typically the real user ID of the sender."
3622 #: build/C/man2/rt_sigqueueinfo.2:98 build/C/man7/sigevent.7:94
3625 msgstr "I<si_value>"
3628 #: build/C/man2/rt_sigqueueinfo.2:105
3630 "This field contains the user data to accompany the signal. For more "
3631 "information, see the description of the last (I<union sigval>) argument of "
3636 #: build/C/man2/rt_sigqueueinfo.2:112
3638 "Internally, the kernel sets the I<si_signo> field to the value specified in "
3639 "I<sig>, so that the receiver of the signal can also obtain the signal number "
3644 #: build/C/man2/rt_sigqueueinfo.2:124
3646 "The B<rt_tgsigqueueinfo>() system call is like B<rt_sigqueueinfo>(), but "
3647 "sends the signal and data to the single thread specified by the combination "
3648 "of I<tgid>, a thread group ID, and I<tid>, a thread in that thread group."
3652 #: build/C/man2/rt_sigqueueinfo.2:129
3654 "On success, these system calls return 0. On error, they return -1 and "
3655 "I<errno> is set to indicate the error."
3659 #: build/C/man2/rt_sigqueueinfo.2:130 build/C/man3/sigqueue.3:90
3660 #: build/C/man2/sigwaitinfo.2:111 build/C/man2/timer_create.2:174
3666 #: build/C/man2/rt_sigqueueinfo.2:136 build/C/man3/sigqueue.3:96
3668 "The limit of signals which may be queued has been reached. (See B<signal>"
3669 "(7) for further information.)"
3671 "待ち行列に入れられるシグナルの最大数に達した (より詳しい情報は B<signal>(7) "
3675 #: build/C/man2/rt_sigqueueinfo.2:143
3676 msgid "I<sig>, I<tgid>, or I<tid> was invalid."
3680 #: build/C/man2/rt_sigqueueinfo.2:151
3682 "The caller does not have permission to send the signal to the target. For "
3683 "the required permissions, see B<kill>(2). Or: I<uinfo-E<gt>si_code> is "
3688 #: build/C/man2/rt_sigqueueinfo.2:157
3689 msgid "B<rt_sigqueueinfo>(): No thread group matching I<tgid> was found."
3693 #: build/C/man2/rt_sigqueueinfo.2:164
3694 msgid "B<rt_tgsigqueinfo>(): No thread matching I<tgid> and I<tid> was found."
3698 #: build/C/man2/rt_sigqueueinfo.2:171
3700 "The B<rt_sigqueueinfo>() system call was added to Linux in version 2.2. "
3701 "The B<rt_tgsigqueueinfo>() system call was added to Linux in version 2.6.31."
3705 #: build/C/man2/rt_sigqueueinfo.2:173 build/C/man2/sgetmask.2:63
3706 #: build/C/man2/timerfd_create.2:372
3707 msgid "These system calls are Linux-specific."
3708 msgstr "これらのシステムコールは Linux 固有である。"
3711 #: build/C/man2/rt_sigqueueinfo.2:178
3713 "Since these system calls are not intended for application use, there are no "
3714 "glibc wrapper functions; use B<syscall>(2) in the unlikely case that you "
3715 "want to call them directly."
3719 #: build/C/man2/rt_sigqueueinfo.2:183
3721 "As with B<kill>(2), the null signal (0) can be used to check if the "
3722 "specified process or thread exists."
3726 #: build/C/man2/rt_sigqueueinfo.2:191
3728 "B<kill>(2), B<sigaction>(2), B<sigprocmask>(2), B<tgkill>(2), "
3729 "B<pthread_sigqueue>(3), B<sigqueue>(3), B<signal>(7)"
3731 "B<kill>(2), B<sigaction>(2), B<sigprocmask>(2), B<tgkill>(2), "
3732 "B<pthread_sigqueue>(3), B<sigqueue>(3), B<signal>(7)"
3735 #: build/C/man2/sgetmask.2:24
3741 #: build/C/man2/sgetmask.2:24
3747 #: build/C/man2/sgetmask.2:27
3748 msgid "sgetmask, ssetmask - manipulation of signal mask (obsolete)"
3749 msgstr "sgetmask, ssetmask - シグナルマスクの操作 (廃止予定)"
3752 #: build/C/man2/sgetmask.2:29
3753 msgid "B<long sgetmask(void);>"
3754 msgstr "B<long sgetmask(void);>"
3757 #: build/C/man2/sgetmask.2:31
3758 msgid "B<long ssetmask(long >I<newmask>B<);>"
3759 msgstr "B<long ssetmask(long >I<newmask>B<);>"
3762 #: build/C/man2/sgetmask.2:37
3764 "These system calls are obsolete. I<Do not use them>; use B<sigprocmask>(2) "
3767 "これらのシステムコールは廃止予定であり、 「使用しないこと」。 代わりに "
3768 "B<sigprocmask>(2) を使用すること。"
3771 #: build/C/man2/sgetmask.2:40
3772 msgid "B<sgetmask>() returns the signal mask of the calling process."
3773 msgstr "B<sgetmask>() は、呼び出し元プロセスのシグナルマスクを返す。"
3776 #: build/C/man2/sgetmask.2:45
3778 "B<ssetmask>() sets the signal mask of the calling process to the value "
3779 "given in I<newmask>. The previous signal mask is returned."
3781 "B<ssetmask>() は、呼び出し元プロセスのシグナルマスクを I<newmask> で指定され"
3782 "た値に設定し、変更前のシグナルマスクを返す。"
3785 #: build/C/man2/sgetmask.2:54
3787 "The signal masks dealt with by these two system calls are plain bit masks "
3788 "(unlike the I<sigset_t> used by B<sigprocmask>(2)); use B<sigmask>(3) to "
3789 "create and inspect these masks."
3791 "これら二つのシステムコールが扱うシグナルマスクは、 単純なビットマスクである "
3792 "(この点が B<sigprocmask>(2) で使用される I<sigset_t> と異なる)。 これらのマ"
3793 "スクを作成したり検査するには B<sigmask>(3) を使用すること。"
3796 #: build/C/man2/sgetmask.2:59
3798 "B<sgetmask>() always successfully returns the signal mask. B<ssetmask>() "
3799 "always succeeds, and returns the previous signal mask."
3801 "B<sgetmask>() は常に成功し、シグナルマスクを返す。 B<ssetmask>() は常に成功"
3805 #: build/C/man2/sgetmask.2:61
3806 msgid "These system calls always succeed."
3807 msgstr "これらのシステムコールは常に成功する。"
3810 #: build/C/man2/sgetmask.2:66
3812 "Glibc does not provide wrappers for these system calls; use B<syscall>(2)."
3814 "glibc はこれらのシステムコールに対するラッパー関数を提供していない。 "
3815 "B<syscall>(2) を使用すること。"
3818 #: build/C/man2/sgetmask.2:69
3820 "These system calls are unaware of signal numbers greater than 31 (i.e., real-"
3823 "これらのシステムコールは、 31 より大きいシグナル番号 (つまり、リアルタイムシ"
3827 #: build/C/man2/sgetmask.2:74
3828 msgid "It is not possible to block B<SIGSTOP> or B<SIGKILL>."
3829 msgstr "B<SIGSTOP> や B<SIGKILL> をブロックすることはできない。"
3832 #: build/C/man2/sgetmask.2:77
3833 msgid "B<sigprocmask>(2), B<signal>(7)"
3834 msgstr "B<sigprocmask>(2), B<signal>(7)"
3837 #: build/C/man2/sigaction.2:45
3843 #: build/C/man2/sigaction.2:45
3849 #: build/C/man2/sigaction.2:48
3850 msgid "sigaction - examine and change a signal action"
3851 msgstr "sigaction - シグナルの動作の確認と変更"
3854 #: build/C/man2/sigaction.2:54
3857 "B<int sigaction(int >I<signum>B<, const struct sigaction *>I<act>B<,>\n"
3858 "B< struct sigaction *>I<oldact>B<);>\n"
3860 "B<int sigaction(int >I<signum>B<, const struct sigaction *>I<act>B<,>\n"
3861 "B< struct sigaction *>I<oldact>B<);>\n"
3864 #: build/C/man2/sigaction.2:64
3866 "B<sigaction>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
3869 "B<sigaction>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
3873 #: build/C/man2/sigaction.2:73
3875 "The B<sigaction>() system call is used to change the action taken by a "
3876 "process on receipt of a specific signal. (See B<signal>(7) for an overview "
3879 "B<sigaction>() システムコールは、特定のシグナルを受信した際の プロセスの動作"
3880 "を変更するのに使用される (シグナルの概要については B<signal>(7) を参照)。"
3883 #: build/C/man2/sigaction.2:79
3885 "I<signum> specifies the signal and can be any valid signal except B<SIGKILL> "
3888 "I<signum> には、 B<SIGKILL> と B<SIGSTOP> 以外の有効なシグナルをどれでも指定"
3892 #: build/C/man2/sigaction.2:90
3894 "If I<act> is non-NULL, the new action for signal I<signum> is installed from "
3895 "I<act>. If I<oldact> is non-NULL, the previous action is saved in I<oldact>."
3897 "I<act> が NULL 以外であれば、シグナル I<signum> の新しい動作 (action) として "
3898 "I<act> が設定される。 I<oldact> が NULL でなければ、今までの動作が I<oldact> "
3902 #: build/C/man2/sigaction.2:94
3903 msgid "The I<sigaction> structure is defined as something like:"
3904 msgstr "I<sigaction> 構造体は以下のような感じに定義される。"
3907 #: build/C/man2/sigaction.2:104
3910 "struct sigaction {\n"
3911 " void (*sa_handler)(int);\n"
3912 " void (*sa_sigaction)(int, siginfo_t *, void *);\n"
3913 " sigset_t sa_mask;\n"
3915 " void (*sa_restorer)(void);\n"
3918 "struct sigaction {\n"
3919 " void (*sa_handler)(int);\n"
3920 " void (*sa_sigaction)(int, siginfo_t *, void *);\n"
3921 " sigset_t sa_mask;\n"
3923 " void (*sa_restorer)(void);\n"
3927 #: build/C/man2/sigaction.2:111
3929 "On some architectures a union is involved: do not assign to both "
3930 "I<sa_handler> and I<sa_sigaction>."
3932 "アーキテクチャによっては共用体 (union) が用いられており、その場合には "
3933 "I<sa_handler> と I<sa_sigaction> の両方を同時に割り当てることはできない。"
3936 #: build/C/man2/sigaction.2:118
3938 "The I<sa_restorer> element is obsolete and should not be used. POSIX does "
3939 "not specify a I<sa_restorer> element."
3941 "I<sa_restorer> 要素は廃止予定であり使用すべきではない。 POSIX には "
3942 "I<sa_restorer> 要素に関する規定はない。"
3945 #: build/C/man2/sigaction.2:128
3947 "I<sa_handler> specifies the action to be associated with I<signum> and may "
3948 "be B<SIG_DFL> for the default action, B<SIG_IGN> to ignore this signal, or a "
3949 "pointer to a signal handling function. This function receives the signal "
3950 "number as its only argument."
3952 "I<sa_handler> は I<signum> に対応する動作を指定するもので、 デフォルトの動作"
3953 "を行う B<SIG_DFL>、 そのシグナルを無視する B<SIG_IGN>、 シグナルハンドラ関数"
3954 "へのポインタが設定できる。 シグナルハンドラ関数の引き数は一つであり、シグナル"
3958 #: build/C/man2/sigaction.2:150
3960 "If B<SA_SIGINFO> is specified in I<sa_flags>, then I<sa_sigaction> (instead "
3961 "of I<sa_handler>) specifies the signal-handling function for I<signum>. "
3962 "This function receives the signal number as its first argument, a pointer to "
3963 "a I<siginfo_t> as its second argument and a pointer to a I<ucontext_t> (cast "
3964 "to I<void\\ *>) as its third argument. (Commonly, the handler function "
3965 "doesn't make any use of the third argument. See B<getcontext>(2) for "
3966 "further information about I<ucontext_t>.)"
3968 "I<sa_flags> に B<SA_SIGINFO> が指定された場合、 (I<sa_handler> ではなく)\n"
3969 "I<sa_sigaction> により I<signum> に対応するシグナルハンドラ関数が指定さ\n"
3970 "れる。指定される関数は、最初の引き数としてシグナル番号を、二番目の引き\n"
3971 "数として I<siginfo_t> へのポインタを、三番目の引き数として (I<void\\ *>\n"
3972 "にキャストした) I<ucontext_t> へのポインタを受けとる。 (一般的には、\n"
3973 "ハンドラ関数の三番目の引き数が使用されない。I<ucontext_t> についての\n"
3974 "詳しい情報は B<getcontext>(2) を参照。)"
3977 #: build/C/man2/sigaction.2:160
3979 "I<sa_mask> specifies a mask of signals which should be blocked (i.e., added "
3980 "to the signal mask of the thread in which the signal handler is invoked) "
3981 "during execution of the signal handler. In addition, the signal which "
3982 "triggered the handler will be blocked, unless the B<SA_NODEFER> flag is used."
3984 "I<sa_mask> は、シグナル・ハンドラ実行中に禁止 (block) すべきシグナルのマスク"
3985 "を指定する (ハンドラ実行中のシグナルの禁止は、シグナル・ハンドラが起動された"
3986 "スレッド のシグナルのマスクに追加することで行われる)。 さらに、 "
3987 "B<SA_NODEFER> フラグが指定されていない場合は、ハンドラを起動するきっかけとな"
3988 "る シグナルにも I<sa_mask> が適用される。"
3991 #: build/C/man2/sigaction.2:164
3993 "I<sa_flags> specifies a set of flags which modify the behavior of the "
3994 "signal. It is formed by the bitwise OR of zero or more of the following:"
3996 "I<sa_flags> はシグナル・ハンドラの動作を変更するためのフラグの集合を指定す"
3997 "る。 I<sa_flags> には、以下に示すフラグの (0 個以上の) 論理和をとったものを指"
4001 #: build/C/man2/sigaction.2:165
4003 msgid "B<SA_NOCLDSTOP>"
4004 msgstr "B<SA_NOCLDSTOP>"
4007 #: build/C/man2/sigaction.2:182
4009 "If I<signum> is B<SIGCHLD>, do not receive notification when child processes "
4010 "stop (i.e., when they receive one of B<SIGSTOP>, B<SIGTSTP>, B<SIGTTIN> or "
4011 "B<SIGTTOU>) or resume (i.e., they receive B<SIGCONT>) (see B<wait>(2)). "
4012 "This flag is only meaningful when establishing a handler for B<SIGCHLD>."
4014 "I<signum> が B<SIGCHLD> の場合、 子プロセスが停止したり (子プロセスが "
4015 "B<SIGSTOP>, B<SIGTSTP>, B<SIGTTIN>, B<SIGTTOU> を受けたとき) 再開したり (子プ"
4016 "ロセスが B<SIGCONT> を受けたとき) したときに B<SIGCHLD> の通知を受けない。 こ"
4017 "のフラグは、 B<SIGCHLD> に対してハンドラを設定する際にのみ意味を持つ。"
4020 #: build/C/man2/sigaction.2:182
4022 msgid "B<SA_NOCLDWAIT> (since Linux 2.6)"
4023 msgstr "B<SA_NOCLDWAIT> (Linux 2.6 以降)"
4025 #. To be precise: Linux 2.5.60 -- MTK
4027 #: build/C/man2/sigaction.2:196
4029 "If I<signum> is B<SIGCHLD>, do not transform children into zombies when they "
4030 "terminate. See also B<waitpid>(2). This flag is only meaningful when "
4031 "establishing a handler for B<SIGCHLD>, or when setting that signal's "
4032 "disposition to B<SIG_DFL>."
4034 "(Linux 2.6 以降) I<signum> が B<SIGCHLD> の場合、子プロセスが終了したときに "
4035 "子プロセスをゾンビプロセスに変化させない (B<waitpid>(2) も参照)。 このフラグ"
4036 "は、 B<SIGCHLD> に対してハンドラを設定する際、もしくはそのシグナルの処理方法"
4037 "を B<SIG_DFL> に設定する際にのみ意味を持つ。"
4040 #: build/C/man2/sigaction.2:208
4042 "If the B<SA_NOCLDWAIT> flag is set when establishing a handler for "
4043 "B<SIGCHLD>, POSIX.1 leaves it unspecified whether a B<SIGCHLD> signal is "
4044 "generated when a child process terminates. On Linux, a B<SIGCHLD> signal is "
4045 "generated in this case; on some other implementations, it is not."
4047 "B<SIGCHLD> に対してハンドラを設定する際に B<SA_NOCLDWAIT> フラグをセットした"
4048 "場合、 子プロセスが終了した際に B<SIGCHLD> シグナルが生成されるかどうかは、 "
4049 "POSIX.1 では規定されていない。 Linux では、この状況で B<SIGCHLD> シグナルは生"
4050 "成される。 いくつかの他の実装では生成されない。"
4053 #: build/C/man2/sigaction.2:208
4055 msgid "B<SA_NODEFER>"
4056 msgstr "B<SA_NODEFER>"
4059 #: build/C/man2/sigaction.2:215
4061 "Do not prevent the signal from being received from within its own signal "
4062 "handler. This flag is only meaningful when establishing a signal handler. "
4063 "B<SA_NOMASK> is an obsolete, nonstandard synonym for this flag."
4065 "それ自身のシグナル・ハンドラーの内部にいる時でも そのシグナルをマスクしないよ"
4066 "うにする。 このフラグはシグナルハンドラを設定する際にのみ意味を持つ。 "
4067 "B<SA_NOMASK> はこのフラグと同じ意味だが、廃止されており、非標準である。"
4070 #: build/C/man2/sigaction.2:215
4072 msgid "B<SA_ONSTACK>"
4073 msgstr "B<SA_ONSTACK>"
4076 #: build/C/man2/sigaction.2:221
4078 "Call the signal handler on an alternate signal stack provided by "
4079 "B<sigaltstack>(2). If an alternate stack is not available, the default "
4080 "stack will be used. This flag is only meaningful when establishing a signal "
4083 "B<sigaltstack>(2) で提供される別のシグナル・スタックでシグナルハンドラを呼び"
4084 "出す。 別のシグナル・スタックが利用可能でなければ、デフォルトのスタックが 使"
4085 "用される。 このフラグはシグナルハンドラを設定する際にのみ意味を持つ。"
4088 #: build/C/man2/sigaction.2:221
4090 msgid "B<SA_RESETHAND>"
4091 msgstr "B<SA_RESETHAND>"
4094 #: build/C/man2/sigaction.2:228
4096 "Restore the signal action to the default state once the signal handler has "
4097 "been called. This flag is only meaningful when establishing a signal "
4098 "handler. B<SA_ONESHOT> is an obsolete, nonstandard synonym for this flag."
4100 "シグナルハンドラが呼ばれる度に、シグナルの動作をデフォルトに戻す。 このフラグ"
4101 "はシグナルハンドラを設定する際にのみ意味を持つ。 B<SA_ONESHOT> はこのフラグと"
4102 "同じ意味だが、廃止されており、非標準である。"
4105 #: build/C/man2/sigaction.2:228
4107 msgid "B<SA_RESTART>"
4108 msgstr "B<SA_RESTART>"
4111 #: build/C/man2/sigaction.2:236
4113 "Provide behavior compatible with BSD signal semantics by making certain "
4114 "system calls restartable across signals. This flag is only meaningful when "
4115 "establishing a signal handler. See B<signal>(7) for a discussion of system "
4118 "いくつかのシステムコールをシグナルの通知の前後で再開できるようにして、 BSD シ"
4119 "グナル方式 (semantics) と互換性のある動作を提供する。 このフラグはシグナルハ"
4120 "ンドラを設定する際にのみ意味を持つ。 B<signal>(7) に書かれているシステムコー"
4124 #: build/C/man2/sigaction.2:236
4126 msgid "B<SA_SIGINFO> (since Linux 2.2)"
4127 msgstr "B<SA_SIGINFO> (Linux 2.2 以降)"
4131 #. field was added in Linux 2.1.86.)
4133 #: build/C/man2/sigaction.2:247
4135 "The signal handler takes 3 arguments, not one. In this case, "
4136 "I<sa_sigaction> should be set instead of I<sa_handler>. This flag is only "
4137 "meaningful when establishing a signal handler."
4139 "シグナルハンドラは一つではなく、三つの引き数を持つ。この場合は I<sa_handler> "
4140 "のかわりに I<sa_sigaction> を設定しなければならない このフラグはシグナルハン"
4144 #: build/C/man2/sigaction.2:254
4146 "The I<siginfo_t> argument to I<sa_sigaction> is a struct with the following "
4149 "I<sa_sigaction> のパラメータ I<siginfo_t> は以下の要素を持つ構造体である:"
4152 #. si_trapno seems to be only used on SPARC and Alpha;
4153 #. this page could use a little more detail on its purpose there.
4154 #. In the kernel: si_tid
4156 #: build/C/man2/sigaction.2:285
4160 " int si_signo; /* Signal number */\n"
4161 " int si_errno; /* An errno value */\n"
4162 " int si_code; /* Signal code */\n"
4163 " int si_trapno; /* Trap number that caused\n"
4164 " hardware-generated signal\n"
4165 " (unused on most architectures) */\n"
4166 " pid_t si_pid; /* Sending process ID */\n"
4167 " uid_t si_uid; /* Real user ID of sending process */\n"
4168 " int si_status; /* Exit value or signal */\n"
4169 " clock_t si_utime; /* User time consumed */\n"
4170 " clock_t si_stime; /* System time consumed */\n"
4171 " sigval_t si_value; /* Signal value */\n"
4172 " int si_int; /* POSIX.1b signal */\n"
4173 " void *si_ptr; /* POSIX.1b signal */\n"
4174 " int si_overrun; /* Timer overrun count; POSIX.1b timers */\n"
4175 " int si_timerid; /* Timer ID; POSIX.1b timers */\n"
4176 " void *si_addr; /* Memory location which caused fault */\n"
4177 " long si_band; /* Band event (was I<int> in\n"
4178 " glibc 2.3.2 and earlier) */\n"
4179 " int si_fd; /* File descriptor */\n"
4180 " short si_addr_lsb; /* Least significant bit of address\n"
4181 " (since kernel 2.6.32) */\n"
4185 " int si_signo; /* Signal number */\n"
4186 " int si_errno; /* An errno value */\n"
4187 " int si_code; /* Signal code */\n"
4188 " int si_trapno; /* Trap number that caused\n"
4189 " hardware-generated signal\n"
4190 " (unused on most architectures) */\n"
4191 " pid_t si_pid; /* Sending process ID */\n"
4192 " uid_t si_uid; /* Real user ID of sending process */\n"
4193 " int si_status; /* Exit value or signal */\n"
4194 " clock_t si_utime; /* User time consumed */\n"
4195 " clock_t si_stime; /* System time consumed */\n"
4196 " sigval_t si_value; /* Signal value */\n"
4197 " int si_int; /* POSIX.1b signal */\n"
4198 " void *si_ptr; /* POSIX.1b signal */\n"
4199 " int si_overrun; /* Timer overrun count; POSIX.1b timers */\n"
4200 " int si_timerid; /* Timer ID; POSIX.1b timers */\n"
4201 " void *si_addr; /* Memory location which caused fault */\n"
4202 " long si_band; /* Band event (was I<int> in\n"
4203 " glibc 2.3.2 and earlier) */\n"
4204 " int si_fd; /* File descriptor */\n"
4205 " short si_addr_lsb; /* Least significant bit of address\n"
4206 " (since kernel 2.6.32) */\n"
4210 #: build/C/man2/sigaction.2:294
4212 "I<si_signo>, I<si_errno> and I<si_code> are defined for all signals. "
4213 "(I<si_errno> is generally unused on Linux.) The rest of the struct may be a "
4214 "union, so that one should only read the fields that are meaningful for the "
4217 "I<si_signo>, I<si_errno>, I<si_code> は全てのシグナルに対して定義されている "
4218 "(I<si_errno> は Linux では一般的には使用されない)。 構造体の残りの部分は、共"
4219 "用体 (union) になっているかもしれない。 その場合は該当するシグナルにおいて意"
4220 "味のあるフィールドのみを読み込む ことができる。"
4223 #: build/C/man2/sigaction.2:309
4225 "Signals sent with B<kill>(2) and B<sigqueue>(3) fill in I<si_pid> and "
4226 "I<si_uid>. In addition, signals sent with B<sigqueue>(3) fill in I<si_int> "
4227 "and I<si_ptr> with the values specified by the sender of the signal; see "
4228 "B<sigqueue>(3) for more details."
4232 #: build/C/man2/sigaction.2:325
4234 "Signals sent by POSIX.1b timers (since Linux 2.6) fill in I<si_overrun> and "
4235 "I<si_timerid>. The I<si_timerid> field is an internal ID used by the kernel "
4236 "to identify the timer; it is not the same as the timer ID returned by "
4237 "B<timer_create>(2). The I<si_overrun> field is the timer overrun count; "
4238 "this is the same information as is obtained by a call to B<timer_getoverrun>"
4239 "(2). These fields are nonstandard Linux extensions."
4241 "POSIX.1b タイマ (Linux 2.6 以降) は I<si_overrun> と I<si_timerid> を\n"
4242 "設定する。 I<si_timerid> フィールドはカーネルがタイマを特定するのに\n"
4243 "使用する内部 ID であり、 B<timer_create>(2) が返すタイマ ID と同じではな"
4245 "I<si_overrun> フィールドはタイマが回り切った回数である。\n"
4246 "これは B<timer_getoverrun>(2) の呼び出しで取得できる情報と同じである。\n"
4247 "これらのフィールドは非標準で Linux による拡張である。"
4250 #: build/C/man2/sigaction.2:340
4252 "Signals sent for message queue notification (see the description of "
4253 "B<SIGEV_SIGNAL> in B<mq_notify>(3)) fill in I<si_int>/I<si_ptr>, with the "
4254 "I<sigev_value> supplied to B<mq_notify>(3); I<si_pid>, with the process ID "
4255 "of the message sender; and I<si_uid>, with the real user ID of the message "
4260 #. When si_utime and si_stime where originally implemented, the
4261 #. measurement unit was HZ, which was the same as clock ticks
4262 #. (sysconf(_SC_CLK_TCK)). In 2.6, HZ became configurable, and
4263 #. was *still* used as the unit to return the info these fields,
4264 #. with the result that the field values depended on the the
4265 #. configured HZ. Of course, the should have been measured in
4266 #. USER_HZ instead, so that sysconf(_SC_CLK_TCK) could be used to
4267 #. convert to seconds. I have a queued patch to fix this:
4268 #. http://thread.gmane.org/gmane.linux.kernel/698061/ .
4269 #. This patch made it into 2.6.27.
4270 #. But note that these fields still don't return the times of
4271 #. waited-for children (as is done by getrusage() and times()
4272 #. and wait4()). Solaris 8 does include child times.
4274 #: build/C/man2/sigaction.2:387
4276 "B<SIGCHLD> fills in I<si_pid>, I<si_uid>, I<si_status>, I<si_utime> and "
4277 "I<si_stime>, providing information about the child. The I<si_pid> field is "
4278 "the process ID of the child; I<si_uid> is the child's real user ID. The "
4279 "I<si_status> field contains the exit status of the child (if I<si_code> is "
4280 "B<CLD_EXITED>), or the signal number that caused the process to change "
4281 "state. The I<si_utime> and I<si_stime> contain the user and system CPU time "
4282 "used by the child process; these fields do not include the times used by "
4283 "waited-for children (unlike B<getrusage>(2) and B<time>(2)). In kernels up "
4284 "to 2.6, and since 2.6.27, these fields report CPU time in units of I<sysconf"
4285 "(_SC_CLK_TCK)>. In 2.6 kernels before 2.6.27, a bug meant that these fields "
4286 "reported time in units of the (configurable) system jiffy (see B<time>(7))."
4288 "B<SIGCHLD> は I<si_pid>, I<si_uid>, I<si_status>, I<si_utime>,\n"
4289 "I<si_stime> を設定し、子プロセスに関する情報を提供する。\n"
4290 "I<si_pid> フィールドは子プロセスのプロセス ID で、\n"
4291 "I<si_uid> フィールドは子プロセスの実ユーザ ID である。\n"
4292 "I<si_stime> フィールドには、 (I<si_code> が B<CLD_EXITED> の場合は) \n"
4293 "子プロセスの終了ステータスが、それ以外の場合は状態が変化する原因と\n"
4294 "なったシグナル番号が格納される。\n"
4295 "I<si_utime> と I<si_stime> には子プロセスが使用したユーザ CPU 時間とシ\n"
4296 "ステム CPU 時間がそれぞれ格納される。(B<getrusage>(2) や B<time>(2) と\n"
4297 "異なり) これらのフィールドには wait 待ちの子プロセスにより使用された時\n"
4298 "間は含まれない。 2.6 より前と 2.6.27 以降のカーネルでは、 これらのフィー\n"
4299 "ルドに格納される CPU 時間の単位は I<sysconf(_SC_CLK_TCK)> である。\n"
4300 "2.6.27 より前の 2.6 系のカーネルでは、バグがあり、 これらのフィールドの\n"
4301 "CPU 時間の単位が (カーネルのコンフィグで指定される) システムの jiffy で\n"
4302 "あった (B<time>(7) 参照)。"
4304 #. FIXME SIGTRAP also sets the following for ptrace_notify() ?
4305 #. info.si_code = exit_code;
4306 #. info.si_pid = task_pid_vnr(current);
4307 #. info.si_uid = current_uid(); /* Real UID */
4309 #: build/C/man2/sigaction.2:423
4311 "B<SIGILL>, B<SIGFPE>, B<SIGSEGV>, B<SIGBUS>, and B<SIGTRAP> fill in "
4312 "I<si_addr> with the address of the fault. On some architectures, these "
4313 "signals also fill in the I<si_trapno> filed. Some suberrors of B<SIGBUS>, "
4314 "in particular B<BUS_MCEERR_AO> and B<BUS_MCEERR_AR>, also fill in "
4315 "I<si_addr_lsb>. This field indicates the least significant bit of the "
4316 "reported address and therefore the extent of the corruption. For example, "
4317 "if a full page was corrupted, I<si_addr_lsb> contains I<log2(sysconf"
4318 "(_SC_PAGESIZE))>. B<BUS_MCERR_*> and I<si_addr_lsb> are Linux-specific "
4323 #: build/C/man2/sigaction.2:437
4325 "B<SIGIO>/B<SIGPOLL> (the two names are synonyms on Linux) fills in "
4326 "I<si_band> and I<si_fd>. The I<si_band> event is a bit mask containing the "
4327 "same values as are filled in the I<revents> field by B<poll>(2). The "
4328 "I<si_fd> field indicates the file descriptor for which the I/O event "
4333 #: build/C/man2/sigaction.2:444
4335 "I<si_code> is a value (not a bit mask) indicating why this signal was "
4336 "sent. The following list shows the values which can be placed in I<si_code> "
4337 "for any signal, along with reason that the signal was generated."
4339 "I<si_code> は、そのシグナルが送信された理由を示す値である (ビットマスクではな"
4340 "い)。 以下のリストに、どのシグナルの場合でも I<si_code> に入りうる値を、シグ"
4341 "ナルが生成された理由とともに記載する。"
4344 #: build/C/man2/sigaction.2:445
4350 #: build/C/man2/sigaction.2:448 build/C/man7/signal.7:109
4356 #: build/C/man2/sigaction.2:448
4358 msgid "B<SI_KERNEL>"
4359 msgstr "B<SI_KERNEL>"
4362 #: build/C/man2/sigaction.2:451
4363 msgid "Sent by the kernel."
4364 msgstr "カーネルにより送信された"
4367 #: build/C/man2/sigaction.2:451
4370 msgstr "B<SI_QUEUE>"
4373 #: build/C/man2/sigaction.2:454 build/C/man7/signal.7:126
4375 msgid "B<sigqueue>(3)"
4376 msgstr "B<sigqueue>(3)"
4379 #: build/C/man2/sigaction.2:454
4382 msgstr "B<SI_TIMER>"
4385 #: build/C/man2/sigaction.2:457
4386 msgid "POSIX timer expired"
4387 msgstr "POSIX タイマが満了した"
4390 #: build/C/man2/sigaction.2:457
4393 msgstr "B<SI_MESGQ>"
4396 #: build/C/man2/sigaction.2:461
4398 "POSIX message queue state changed (since Linux 2.6.6); see B<mq_notify>(3)"
4400 "POSIX メッセージキューの状態が変化した (Linux 2.6.6 以降)。 B<mq_notify>(3)B<"
4404 #: build/C/man2/sigaction.2:461
4406 msgid "B<SI_ASYNCIO>"
4407 msgstr "B<SI_ASYNCIO>"
4410 #: build/C/man2/sigaction.2:464
4411 msgid "AIO completed"
4412 msgstr "非同期 IO (AIO) が完了した"
4415 #: build/C/man2/sigaction.2:464
4418 msgstr "B<SI_SIGIO>"
4421 #: build/C/man2/sigaction.2:473
4423 "Queued B<SIGIO> (only in kernels up to Linux 2.2; from Linux 2.4 onward "
4424 "B<SIGIO>/B<SIGPOLL> fills in I<si_code> as described below)."
4428 #: build/C/man2/sigaction.2:473
4431 msgstr "B<SI_TKILL>"
4433 #. SI_DETHREAD is defined in 2.6.9 sources, but isn't implemented
4434 #. It appears to have been an idea that was tried during 2.5.6
4435 #. through to 2.5.24 and then was backed out.
4437 #: build/C/man2/sigaction.2:482
4438 msgid "B<tkill>(2) or B<tgkill>(2) (since Linux 2.4.19)"
4439 msgstr "B<tkill>(2) または B<tgkill>(2) (Linux 2.4.19 以降)"
4442 #: build/C/man2/sigaction.2:489
4444 "The following values can be placed in I<si_code> for a B<SIGILL> signal:"
4445 msgstr "B<SIGILL> シグナルの場合、 I<si_code> には以下の値を指定できる:"
4448 #: build/C/man2/sigaction.2:490
4450 msgid "B<ILL_ILLOPC>"
4451 msgstr "B<ILL_ILLOPC>"
4454 #: build/C/man2/sigaction.2:493
4455 msgid "illegal opcode"
4456 msgstr "不正な命令コード (opcode)"
4459 #: build/C/man2/sigaction.2:493
4461 msgid "B<ILL_ILLOPN>"
4462 msgstr "B<ILL_ILLOPN>"
4465 #: build/C/man2/sigaction.2:496
4466 msgid "illegal operand"
4470 #: build/C/man2/sigaction.2:496
4472 msgid "B<ILL_ILLADR>"
4473 msgstr "B<ILL_ILLADR>"
4476 #: build/C/man2/sigaction.2:499
4477 msgid "illegal addressing mode"
4478 msgstr "不正なアドレッシングモード"
4481 #: build/C/man2/sigaction.2:499
4483 msgid "B<ILL_ILLTRP>"
4484 msgstr "B<ILL_ILLTRP>"
4487 #: build/C/man2/sigaction.2:502
4488 msgid "illegal trap"
4492 #: build/C/man2/sigaction.2:502
4494 msgid "B<ILL_PRVOPC>"
4495 msgstr "B<ILL_PRVOPC>"
4498 #: build/C/man2/sigaction.2:505
4499 msgid "privileged opcode"
4500 msgstr "特権が必要な命令コード (opcode)"
4503 #: build/C/man2/sigaction.2:505
4505 msgid "B<ILL_PRVREG>"
4506 msgstr "B<ILL_PRVREG>"
4509 #: build/C/man2/sigaction.2:508
4510 msgid "privileged register"
4514 #: build/C/man2/sigaction.2:508
4516 msgid "B<ILL_COPROC>"
4517 msgstr "B<ILL_COPROC>"
4520 #: build/C/man2/sigaction.2:511
4521 msgid "coprocessor error"
4525 #: build/C/man2/sigaction.2:511
4527 msgid "B<ILL_BADSTK>"
4528 msgstr "B<ILL_BADSTK>"
4531 #: build/C/man2/sigaction.2:514
4532 msgid "internal stack error"
4536 #: build/C/man2/sigaction.2:521
4538 "The following values can be placed in I<si_code> for a B<SIGFPE> signal:"
4539 msgstr "B<SIGFPE> シグナルの場合、 I<si_code> には以下の値を指定できる:"
4542 #: build/C/man2/sigaction.2:522
4544 msgid "B<FPE_INTDIV>"
4545 msgstr "B<FPE_INTDIV>"
4548 #: build/C/man2/sigaction.2:525
4549 msgid "integer divide by zero"
4550 msgstr "整数の 0 による除算"
4553 #: build/C/man2/sigaction.2:525
4555 msgid "B<FPE_INTOVF>"
4556 msgstr "B<FPE_INTOVF>"
4559 #: build/C/man2/sigaction.2:528
4560 msgid "integer overflow"
4564 #: build/C/man2/sigaction.2:528
4566 msgid "B<FPE_FLTDIV>"
4567 msgstr "B<FPE_FLTDIV>"
4570 #: build/C/man2/sigaction.2:531
4571 msgid "floating-point divide by zero"
4572 msgstr "浮動小数点の 0 による除算"
4575 #: build/C/man2/sigaction.2:531
4577 msgid "B<FPE_FLTOVF>"
4578 msgstr "B<FPE_FLTOVF>"
4581 #: build/C/man2/sigaction.2:534
4582 msgid "floating-point overflow"
4583 msgstr "浮動小数点のオーバーフロー"
4586 #: build/C/man2/sigaction.2:534
4588 msgid "B<FPE_FLTUND>"
4589 msgstr "B<FPE_FLTUND>"
4592 #: build/C/man2/sigaction.2:537
4593 msgid "floating-point underflow"
4594 msgstr "浮動小数点のアンダーフロー"
4597 #: build/C/man2/sigaction.2:537
4599 msgid "B<FPE_FLTRES>"
4600 msgstr "B<FPE_FLTRES>"
4603 #: build/C/man2/sigaction.2:540
4604 msgid "floating-point inexact result"
4605 msgstr "浮動小数点の不正確な演算結果 (inexact result)"
4608 #: build/C/man2/sigaction.2:540
4610 msgid "B<FPE_FLTINV>"
4611 msgstr "B<FPE_FLTINV>"
4614 #: build/C/man2/sigaction.2:543
4615 msgid "floating-point invalid operation"
4616 msgstr "浮動小数点の不正な操作"
4619 #: build/C/man2/sigaction.2:543
4621 msgid "B<FPE_FLTSUB>"
4622 msgstr "B<FPE_FLTSUB>"
4625 #: build/C/man2/sigaction.2:546
4626 msgid "subscript out of range"
4627 msgstr "範囲外の添字 (subscript)"
4630 #: build/C/man2/sigaction.2:553
4632 "The following values can be placed in I<si_code> for a B<SIGSEGV> signal:"
4633 msgstr "B<SIGSEGV> シグナルの場合、 I<si_code> には以下の値を指定できる:"
4636 #: build/C/man2/sigaction.2:554
4638 msgid "B<SEGV_MAPERR>"
4639 msgstr "B<SEGV_MAPERR>"
4642 #: build/C/man2/sigaction.2:557
4643 msgid "address not mapped to object"
4644 msgstr "オブジェクトにマッピングされていないアドレス"
4647 #: build/C/man2/sigaction.2:557
4649 msgid "B<SEGV_ACCERR>"
4650 msgstr "B<SEGV_ACCERR>"
4653 #: build/C/man2/sigaction.2:560
4654 msgid "invalid permissions for mapped object"
4655 msgstr "マッピングされたオブジェクトに対するアクセス許可がない"
4658 #: build/C/man2/sigaction.2:567
4660 "The following values can be placed in I<si_code> for a B<SIGBUS> signal:"
4661 msgstr "B<SIGBUS> シグナルの場合、 I<si_code> には以下の値を指定できる:"
4664 #: build/C/man2/sigaction.2:568
4666 msgid "B<BUS_ADRALN>"
4667 msgstr "B<BUS_ADRALN>"
4670 #: build/C/man2/sigaction.2:571
4671 msgid "invalid address alignment"
4672 msgstr "不正なアドレス・アライメント (alignment)"
4675 #: build/C/man2/sigaction.2:571
4677 msgid "B<BUS_ADRERR>"
4678 msgstr "B<BUS_ADRERR>"
4681 #: build/C/man2/sigaction.2:574
4682 msgid "nonexistent physical address"
4683 msgstr "存在しない物理アドレス"
4686 #: build/C/man2/sigaction.2:574
4688 msgid "B<BUS_OBJERR>"
4689 msgstr "B<BUS_OBJERR>"
4692 #: build/C/man2/sigaction.2:577
4693 msgid "object-specific hardware error"
4694 msgstr "オブジェクト固有のハードウェアエラー"
4697 #: build/C/man2/sigaction.2:577
4699 msgid "B<BUS_MCEERR_AR> (since Linux 2.6.32)"
4700 msgstr "B<BUS_MCEERR_AR> (Linux 2.6.32 以降)"
4703 #: build/C/man2/sigaction.2:580
4704 msgid "Hardware memory error consumed on a machine check; action required."
4708 #: build/C/man2/sigaction.2:580
4710 msgid "B<BUS_MCEERR_AO> (since Linux 2.6.32)"
4711 msgstr "B<BUS_MCEERR_AO> (Linux 2.6.32 以降)"
4714 #: build/C/man2/sigaction.2:583
4716 "Hardware memory error detected in process but not consumed; action optional."
4720 #: build/C/man2/sigaction.2:590
4722 "The following values can be placed in I<si_code> for a B<SIGTRAP> signal:"
4723 msgstr "B<SIGTRAP> シグナルの場合、 I<si_code> には以下の値を指定できる:"
4726 #: build/C/man2/sigaction.2:591
4728 msgid "B<TRAP_BRKPT>"
4729 msgstr "B<TRAP_BRKPT>"
4732 #: build/C/man2/sigaction.2:594
4733 msgid "process breakpoint"
4734 msgstr "プロセスのブレークポイント"
4737 #: build/C/man2/sigaction.2:594
4739 msgid "B<TRAP_TRACE>"
4740 msgstr "B<TRAP_TRACE>"
4743 #: build/C/man2/sigaction.2:597
4744 msgid "process trace trap"
4745 msgstr "プロセスのトレース・トラップ"
4748 #: build/C/man2/sigaction.2:597
4750 msgid "B<TRAP_BRANCH> (since Linux 2.4)"
4751 msgstr "B<TRAP_BRANCH> (Linux 2.4 以降)"
4754 #: build/C/man2/sigaction.2:600
4755 msgid "process taken branch trap"
4759 #: build/C/man2/sigaction.2:600
4761 msgid "B<TRAP_HWBKPT> (since Linux 2.4)"
4762 msgstr "B<TRAP_HWBKPT> (Linux 2.4 以降)"
4765 #: build/C/man2/sigaction.2:603
4766 msgid "hardware breakpoint/watchpoint"
4770 #: build/C/man2/sigaction.2:610
4772 "The following values can be placed in I<si_code> for a B<SIGCHLD> signal:"
4773 msgstr "B<SIGCHLD> シグナルの場合、 I<si_code> には以下の値を指定できる:"
4776 #: build/C/man2/sigaction.2:611
4778 msgid "B<CLD_EXITED>"
4779 msgstr "B<CLD_EXITED>"
4782 #: build/C/man2/sigaction.2:614
4783 msgid "child has exited"
4784 msgstr "子プロセスが終了した (exited)"
4787 #: build/C/man2/sigaction.2:614
4789 msgid "B<CLD_KILLED>"
4790 msgstr "B<CLD_KILLED>"
4793 #: build/C/man2/sigaction.2:617
4794 msgid "child was killed"
4795 msgstr "子プロセスが kill された"
4798 #: build/C/man2/sigaction.2:617
4800 msgid "B<CLD_DUMPED>"
4801 msgstr "B<CLD_DUMPED>"
4804 #: build/C/man2/sigaction.2:620
4805 msgid "child terminated abnormally"
4806 msgstr "子プロセスが異常終了した"
4809 #: build/C/man2/sigaction.2:620
4811 msgid "B<CLD_TRAPPED>"
4812 msgstr "B<CLD_TRAPPED>"
4815 #: build/C/man2/sigaction.2:623
4816 msgid "traced child has trapped"
4817 msgstr "トレース対象の子プロセスがトラップを上げた"
4820 #: build/C/man2/sigaction.2:623
4822 msgid "B<CLD_STOPPED>"
4823 msgstr "B<CLD_STOPPED>"
4826 #: build/C/man2/sigaction.2:626
4827 msgid "child has stopped"
4828 msgstr "子プロセスが停止 (stop) した"
4831 #: build/C/man2/sigaction.2:626
4833 msgid "B<CLD_CONTINUED>"
4834 msgstr "B<CLD_CONTINUED>"
4837 #: build/C/man2/sigaction.2:629
4838 msgid "stopped child has continued (since Linux 2.6.9)"
4839 msgstr "停止していた子プロセスが再開した (Linux 2.6.9 以降)"
4842 #: build/C/man2/sigaction.2:636
4844 "The following values can be placed in I<si_code> for a B<SIGIO>/B<SIGPOLL> "
4847 "B<SIGIO>/B<SIGPOLL> シグナルの場合、 I<si_code> には以下の値を\n"
4851 #: build/C/man2/sigaction.2:637
4857 #: build/C/man2/sigaction.2:640
4858 msgid "data input available"
4862 #: build/C/man2/sigaction.2:640
4865 msgstr "B<POLL_OUT>"
4868 #: build/C/man2/sigaction.2:643
4869 msgid "output buffers available"
4870 msgstr "出力バッファが利用可能"
4873 #: build/C/man2/sigaction.2:643
4876 msgstr "B<POLL_MSG>"
4879 #: build/C/man2/sigaction.2:646
4880 msgid "input message available"
4881 msgstr "入力メッセージが利用可能"
4884 #: build/C/man2/sigaction.2:646
4887 msgstr "B<POLL_ERR>"
4890 #: build/C/man2/sigaction.2:649
4895 #: build/C/man2/sigaction.2:649
4898 msgstr "B<POLL_PRI>"
4901 #: build/C/man2/sigaction.2:652
4902 msgid "high priority input available"
4903 msgstr "高優先の入力が利用可能"
4906 #: build/C/man2/sigaction.2:652
4909 msgstr "B<POLL_HUP>"
4912 #: build/C/man2/sigaction.2:655
4913 msgid "device disconnected"
4914 msgstr "デバイスが接続されていない"
4917 #: build/C/man2/sigaction.2:659
4918 msgid "B<sigaction>() returns 0 on success and -1 on error."
4919 msgstr "B<sigaction>() は成功すれば 0 を返し、エラーならば -1 を返す。"
4922 #: build/C/man2/sigaction.2:664
4924 "I<act> or I<oldact> points to memory which is not a valid part of the "
4925 "process address space."
4927 "I<act> か I<oldact> が指しているメモリが正しいプロセスのアドレス空間にない。"
4930 #: build/C/man2/sigaction.2:671
4932 "An invalid signal was specified. This will also be generated if an attempt "
4933 "is made to change the action for B<SIGKILL> or B<SIGSTOP>, which cannot be "
4934 "caught or ignored."
4936 "無効なシグナルが指定された。補足 (catch) したり無視したりできない シグナルで"
4937 "ある B<SIGKILL> や B<SIGSTOP> に対する動作を変更しようとした場合にも発生す"
4940 #. SVr4 does not document the EINTR condition.
4942 #: build/C/man2/sigaction.2:674
4943 msgid "POSIX.1-2001, SVr4."
4944 msgstr "POSIX.1-2001, SVr4."
4947 #: build/C/man2/sigaction.2:682 build/C/man7/signal.7:103
4949 "A child created via B<fork>(2) inherits a copy of its parent's signal "
4950 "dispositions. During an B<execve>(2), the dispositions of handled signals "
4951 "are reset to the default; the dispositions of ignored signals are left "
4954 "B<fork>(2) 経由で作成された子プロセスは、親プロセスのシグナルの処理方法の コ"
4956 "B<execve>(2) の前後で、ハンドラが設定されているシグナルの処理方法はデフォルト"
4958 "無視が設定されているシグナルの処理方法は変更されずそのままとなる。"
4961 #: build/C/man2/sigaction.2:700 build/C/man2/signal.2:129
4963 "According to POSIX, the behavior of a process is undefined after it ignores "
4964 "a B<SIGFPE>, B<SIGILL>, or B<SIGSEGV> signal that was not generated by "
4965 "B<kill>(2) or B<raise>(3). Integer division by zero has undefined result. "
4966 "On some architectures it will generate a B<SIGFPE> signal. (Also dividing "
4967 "the most negative integer by -1 may generate B<SIGFPE>.) Ignoring this "
4968 "signal might lead to an endless loop."
4970 "POSIX では、 B<kill>(2) や B<raise>(3) で生成できないシグナル B<SIGFPE>, "
4971 "B<SIGILL>, B<SIGSEGV> を無視 (ignore) した場合、その後の動作は未定義である。 "
4972 "ゼロによる整数割り算の結果は未定義となる。 アーキテクチャーによっては、このと"
4973 "き B<SIGFPE> シグナルが生成される。 (同様に負の最大整数を -1 で割ると "
4974 "B<SIGFPE> が生成されるかもしれない) このシグナルを無視すると無限ループに陥る"
4978 #: build/C/man2/sigaction.2:717
4980 "POSIX.1-1990 disallowed setting the action for B<SIGCHLD> to B<SIG_IGN>. "
4981 "POSIX.1-2001 allows this possibility, so that ignoring B<SIGCHLD> can be "
4982 "used to prevent the creation of zombies (see B<wait>(2)). Nevertheless, the "
4983 "historical BSD and System V behaviors for ignoring B<SIGCHLD> differ, so "
4984 "that the only completely portable method of ensuring that terminated "
4985 "children do not become zombies is to catch the B<SIGCHLD> signal and perform "
4986 "a B<wait>(2) or similar."
4988 "POSIX.1-1990 では B<SIGCHLD> に B<SIG_IGN> を設定することを認めていない。 "
4989 "POSIX.1-2001 では認められており、 B<SIGCHLD> を無視することでゾンビプロセスの"
4990 "生成を防止することができる (B<wait>(2) を参照)。 さらに、BSD と SystemV で"
4991 "は B<SIGCHLD> を無視した際の動作が異なっている。 そのため、完全に移植性がある"
4992 "方法で、終了した子プロセスがゾンビにならないこと を保証するには、 B<SIGCHLD> "
4993 "シグナルを補足し、 B<wait>(2) などを実行するしかない。"
4996 #: build/C/man2/sigaction.2:730
4998 "POSIX.1-1990 only specified B<SA_NOCLDSTOP>. POSIX.1-2001 added "
4999 "B<SA_NOCLDWAIT>, B<SA_RESETHAND>, B<SA_NODEFER>, and B<SA_SIGINFO>. Use of "
5000 "these latter values in I<sa_flags> may be less portable in applications "
5001 "intended for older UNIX implementations."
5003 "POSIX.1-1990 の仕様では B<SA_NOCLDSTOP> のみが定義されている。\n"
5004 "POSIX.1-2001 では B<SA_NOCLDWAIT>, B<SA_RESETHAND>, B<SA_NODEFER>,\n"
5005 "B<SA_SIGINFO> が追加された。 UNIX の古い実装で動かすアプリケーションで、\n"
5006 "他の I<sa_flags> フラグを使用すると移植性が下がる。"
5009 #: build/C/man2/sigaction.2:734
5011 "The B<SA_RESETHAND> flag is compatible with the SVr4 flag of the same name."
5012 msgstr "B<SA_RESETHAND> フラグは SVr4 の同じ名前のフラグと互換性がある。"
5015 #: build/C/man2/sigaction.2:744
5017 "The B<SA_NODEFER> flag is compatible with the SVr4 flag of the same name "
5018 "under kernels 1.3.9 and newer. On older kernels the Linux implementation "
5019 "allowed the receipt of any signal, not just the one we are installing "
5020 "(effectively overriding any I<sa_mask> settings)."
5022 "B<SA_NODEFER> フラグは 1.3.9 以降のカーネルでは同じ名前の SVr4 のフラグと互換"
5023 "性がある。 ぞれ以前の Linux カーネルの実装では、このフラグを設定しているシグ"
5024 "ナル だけでなく、どのシグナルでも受けることを許していた (実際には I<sa_mask> "
5028 #: build/C/man2/sigaction.2:750
5030 "B<sigaction>() can be called with a NULL second argument to query the "
5031 "current signal handler. It can also be used to check whether a given signal "
5032 "is valid for the current machine by calling it with NULL second and third "
5035 "B<sigaction>() の二番目の引き数に NULL を指定して呼び出すと、現在のシグナル"
5036 "ハンドラを確認する ことができる。また、二番目と三番目の引き数を NULL にて呼び"
5037 "出すことで、 指定されたシグナルが現在のマシンで使えるかどうかチェックできる。"
5040 #: build/C/man2/sigaction.2:756
5042 "It is not possible to block B<SIGKILL> or B<SIGSTOP> (by specifying them in "
5043 "I<sa_mask>). Attempts to do so are silently ignored."
5045 "B<SIGKILL> や B<SIGSTOP> を (I<sa_mask> に指定して) 禁止することはできない。 "
5046 "禁止しようとしても黙って無視される。"
5049 #: build/C/man2/sigaction.2:760 build/C/man2/sigpending.2:65
5050 #: build/C/man2/sigprocmask.2:139 build/C/man2/sigsuspend.2:104
5051 msgid "See B<sigsetops>(3) for details on manipulating signal sets."
5052 msgstr "シグナル集合の操作に関する詳細は B<sigsetops>(3) を参照のこと。"
5055 #: build/C/man2/sigaction.2:765
5057 "See B<signal>(7) for a list of the async-signal-safe functions that can be "
5058 "safely called inside from inside a signal handler."
5060 "シグナルハンドラ内から安全に呼び出すことができる、 async-signal-safe "
5061 "functions (非同期シングルで安全な関数) の リストについては B<signal>(7) を参"
5065 #: build/C/man2/sigaction.2:765
5067 msgid "Undocumented"
5071 #: build/C/man2/sigaction.2:775
5073 "Before the introduction of B<SA_SIGINFO> it was also possible to get some "
5074 "additional information, namely by using a I<sa_handler> with second argument "
5075 "of type I<struct sigcontext>. See the relevant kernel sources for details. "
5076 "This use is obsolete now."
5078 "B<SA_SIGINFO> が導入される前は、 I<struct sigcontext> 型の二番目の引き数と一"
5079 "緒に I<sa_handler> を使用することで、 いくつかの追加の情報を入手することがで"
5080 "きた。 詳細についてはカーネルソースの関連部分を見てほしい。 現在はこの使用法"
5084 #: build/C/man2/sigaction.2:784
5086 "In kernels up to and including 2.6.13, specifying B<SA_NODEFER> in "
5087 "I<sa_flags> prevents not only the delivered signal from being masked during "
5088 "execution of the handler, but also the signals specified in I<sa_mask>. "
5089 "This bug was fixed in kernel 2.6.14."
5091 "2.6.13 以前のカーネルでは、 I<sa_flags> に B<SA_NODEFER> を指定した場合、 ハ"
5092 "ンドラが実行中に配送されたシグナル自身がマスクされなくなるだけでなく、 "
5093 "I<sa_mask> に指定されたシグナルもマスクされなくなる。 このバグは、カーネル "
5097 #: build/C/man2/sigaction.2:787
5098 msgid "See B<mprotect>(2)."
5099 msgstr "B<mprotect>(2) 参照。"
5102 #: build/C/man2/sigaction.2:806
5104 "B<kill>(1), B<kill>(2), B<killpg>(2), B<pause>(2), B<sigaltstack>(2), "
5105 "B<signal>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), "
5106 "B<sigsuspend>(2), B<wait>(2), B<raise>(3), B<siginterrupt>(3), B<sigqueue>"
5107 "(3), B<sigsetops>(3), B<sigvec>(3), B<core>(5), B<signal>(7)"
5109 "B<kill>(1), B<kill>(2), B<killpg>(2), B<pause>(2), B<sigaltstack>(2),\n"
5110 "B<signal>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2),\n"
5111 "B<sigsuspend>(2), B<wait>(2), B<raise>(3), B<siginterrupt>(3),\n"
5112 "B<sigqueue>(3), B<sigsetops>(3), B<sigvec>(3), B<core>(5),\n"
5116 #: build/C/man2/sigaltstack.2:25
5119 msgstr "SIGALTSTACK"
5122 #: build/C/man2/sigaltstack.2:25 build/C/man2/wait.2:50
5128 #: build/C/man2/sigaltstack.2:28
5129 msgid "sigaltstack - set and/or get signal stack context"
5130 msgstr "sigaltstack - シグナルスタックのコンテキストを設定・取得する"
5133 #: build/C/man2/sigaltstack.2:32
5134 msgid "B<int sigaltstack(const stack_t *>I<ss>B<, stack_t *>I<oss>B<);>"
5135 msgstr "B<int sigaltstack(const stack_t *>I<ss>B<, stack_t *>I<oss>B<);>"
5138 #: build/C/man2/sigaltstack.2:39
5139 msgid "B<sigaltstack>():"
5140 msgstr "B<sigaltstack>():"
5143 #: build/C/man2/sigaltstack.2:46 build/C/man3/siginterrupt.3:51
5144 #: build/C/man2/wait.2:79
5145 msgid "|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
5146 msgstr "|| /* glibc 2.12 以降: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
5149 #: build/C/man2/sigaltstack.2:58
5151 "B<sigaltstack>() allows a process to define a new alternate signal stack "
5152 "and/or retrieve the state of an existing alternate signal stack. An "
5153 "alternate signal stack is used during the execution of a signal handler if "
5154 "the establishment of that handler (see B<sigaction>(2)) requested it."
5156 "B<sigaltstack>() を使うと、 プロセスは新しい代替シグナルスタックを定義した"
5157 "り、 既存の代替シグナルスタックの状態を取得できる。 シグナルハンドラが代替シ"
5158 "グナルスタックを要求するように設定されていると (B<sigaction>(2) 参照)、ハン"
5159 "ドラの実行中はそのシグナルスタックが使われる。"
5162 #: build/C/man2/sigaltstack.2:61
5164 "The normal sequence of events for using an alternate signal stack is the "
5166 msgstr "代替シグナルスタックを使う際の一般的な手順は、以下の通りである:"
5169 #: build/C/man2/sigaltstack.2:61 build/C/man7/signal.7:385
5175 #: build/C/man2/sigaltstack.2:65
5176 msgid "Allocate an area of memory to be used for the alternate signal stack."
5177 msgstr "代替シグナルスタックで使うメモリ領域を確保する。"
5180 #: build/C/man2/sigaltstack.2:65 build/C/man7/signal.7:389
5186 #: build/C/man2/sigaltstack.2:71
5188 "Use B<sigaltstack>() to inform the system of the existence and location of "
5189 "the alternate signal stack."
5191 "B<sigaltstack>() を使って、 代替シグナルスタックの存在と場所をシステムに知ら"
5195 #: build/C/man2/sigaltstack.2:71 build/C/man7/signal.7:409
5201 #: build/C/man2/sigaltstack.2:78
5203 "When establishing a signal handler using B<sigaction>(2), inform the system "
5204 "that the signal handler should be executed on the alternate signal stack by "
5205 "specifying the B<SA_ONSTACK> flag."
5207 "B<sigaction>(2) を使ってシグナルハンドラを確立する際、 B<SA_ONSTACK> フラグ"
5208 "を指定することにより、 そのシグナルハンドラを代替シグナルスタック上で実行する"
5212 #: build/C/man2/sigaltstack.2:86
5214 "The I<ss> argument is used to specify a new alternate signal stack, while "
5215 "the I<oss> argument is used to retrieve information about the currently "
5216 "established signal stack. If we are interested in performing just one of "
5217 "these tasks then the other argument can be specified as NULL. Each of these "
5218 "arguments is a structure of the following type:"
5220 "I<ss> 引き数は、新しいシグナルスタックを指定するために使う。 また I<oss> 引き"
5221 "数は、現在確立されている シグナルスタックの情報を取得するために使う。 この操"
5222 "作のうち 1 つだけを実行させるには、 使用しない引き数を NULL に指定すればよ"
5223 "い。 引き数となる構造体は、以下のような型である:"
5226 #: build/C/man2/sigaltstack.2:94
5229 "typedef struct {\n"
5230 " void *ss_sp; /* Base address of stack */\n"
5231 " int ss_flags; /* Flags */\n"
5232 " size_t ss_size; /* Number of bytes in stack */\n"
5235 "typedef struct {\n"
5236 " void *ss_sp; /* スタックのベースアドレス */\n"
5237 " int ss_flags; /* フラグ */\n"
5238 " size_t ss_size; /* スタックのバイト数 */\n"
5242 #: build/C/man2/sigaltstack.2:105
5244 "To establish a new alternate signal stack, I<ss.ss_flags> is set to zero, "
5245 "and I<ss.ss_sp> and I<ss.ss_size> specify the starting address and size of "
5246 "the stack. The constant B<SIGSTKSZ> is defined to be large enough to cover "
5247 "the usual size requirements for an alternate signal stack, and the constant "
5248 "B<MINSIGSTKSZ> defines the minimum size required to execute a signal handler."
5250 "新規の代替シグナルスタックを確立するには、 I<ss.ss_flags> を 0 に設定し、 "
5251 "I<ss.ss_sp> と I<ss.ss_size> に スタックの開始アドレスとスタックサイズを指定"
5252 "する。 定数 B<SIGSTKSZ> は、代替シグナルスタックが通常必要する サイズよりも充"
5253 "分大きく定義されている。 また定数 B<MINSIGSTKSZ> は、 シグナルハンドラの実行"
5254 "に必要な最小サイズに定義されている。"
5257 #: build/C/man2/sigaltstack.2:109
5259 "When a signal handler is invoked on the alternate stack, the kernel "
5260 "automatically aligns the address given in I<ss.ss_sp> to a suitable address "
5261 "boundary for the underlying hardware architecture."
5263 "代替スタックでシグナルハンドラが起動された場合には、 カーネルにより自動的に、"
5264 "I<ss.ss_sp> で指定されたアドレスは 動作しているハードウェアアーキテクチャに適"
5268 #: build/C/man2/sigaltstack.2:114
5270 "To disable an existing stack, specify I<ss.ss_flags> as B<SS_DISABLE>. In "
5271 "this case, the remaining fields in I<ss> are ignored."
5273 "既存のスタックを無効にするには、 I<ss.ss_flags> を B<SS_DISABLE> に指定す"
5274 "る。 この場合、I<ss> の他のフィールドは無視される。"
5277 #: build/C/man2/sigaltstack.2:122
5279 "If I<oss> is not NULL, then it is used to return information about the "
5280 "alternate signal stack which was in effect prior to the call to "
5281 "B<sigaltstack>(). The I<oss.ss_sp> and I<oss.ss_size> fields return the "
5282 "starting address and size of that stack. The I<oss.ss_flags> may return "
5283 "either of the following values:"
5285 "I<oss> が NULL 以外の場合、 I<oss> に代替シグナルスタックの情報が返される。 "
5286 "これは (実質的に) B<sigaltstack>() の呼び出しより先に行われる。 I<oss."
5287 "ss_sp> と I<oss.ss_size> フィールドに スタックの開始アドレスとスタックサイズ"
5288 "が返される。 I<oss.ss_flags> には以下のどちらかの値が返される:"
5291 #: build/C/man2/sigaltstack.2:122
5293 msgid "B<SS_ONSTACK>"
5294 msgstr "B<SS_ONSTACK>"
5297 #: build/C/man2/sigaltstack.2:128
5299 "The process is currently executing on the alternate signal stack. (Note "
5300 "that it is not possible to change the alternate signal stack if the process "
5301 "is currently executing on it.)"
5303 "プロセスが代替シグナルスタック上で実行されている (プロセスが既にそのシグナル"
5304 "スタック上で実行されている場合は、 それと同じシグナルスタックには変更できない"
5308 #: build/C/man2/sigaltstack.2:128
5310 msgid "B<SS_DISABLE>"
5311 msgstr "B<SS_DISABLE>"
5314 #: build/C/man2/sigaltstack.2:131
5315 msgid "The alternate signal stack is currently disabled."
5316 msgstr "代替シグナルスタックが現在無効になっている。"
5319 #: build/C/man2/sigaltstack.2:135
5321 "B<sigaltstack>() returns 0 on success, or -1 on failure with I<errno> set "
5322 "to indicate the error."
5324 "B<sigaltstack>() は成功した場合 0 を返す。 失敗した場合は -1 を返して、 エ"
5325 "ラーを示す値に I<errno> を設定する。"
5328 #: build/C/man2/sigaltstack.2:140
5330 "Either I<ss> or I<oss> is not NULL and points to an area outside of the "
5331 "process's address space."
5333 "I<ss> または I<oss> のどちらが、NULL 以外で、 かつプロセスのアドレス空間の外"
5337 #: build/C/man2/sigaltstack.2:145
5339 "I<ss> is not NULL and the I<ss_flags> field contains a nonzero value other "
5340 "than B<SS_DISABLE>."
5342 "I<ss> が NULL 以外で、I<ss_flags> フィールドが B<SS_DISABLE> 以外の 0 でない"
5346 #: build/C/man2/sigaltstack.2:149
5348 "The specified size of the new alternate signal stack (I<ss.ss_size>) was "
5349 "less than B<MINSTKSZ>."
5351 "新しい代替シグナルスタック (I<ss.ss_size>) に指定したサイズが B<MINSTKSZ> よ"
5355 #: build/C/man2/sigaltstack.2:154
5357 "An attempt was made to change the alternate signal stack while it was active "
5358 "(i.e., the process was already executing on the current alternate signal "
5361 "代替シグナルスタックが有効であるときに変更を行おうとした (つまり、プロセスが"
5362 "既に現在の代替シグナルスタック上で実行されていた)。"
5365 #: build/C/man2/sigaltstack.2:156
5366 msgid "SUSv2, SVr4, POSIX.1-2001."
5367 msgstr "SUSv2, SVr4, POSIX.1-2001."
5370 #: build/C/man2/sigaltstack.2:164
5372 "The most common usage of an alternate signal stack is to handle the "
5373 "B<SIGSEGV> signal that is generated if the space available for the normal "
5374 "process stack is exhausted: in this case, a signal handler for B<SIGSEGV> "
5375 "cannot be invoked on the process stack; if we wish to handle it, we must use "
5376 "an alternate signal stack."
5378 "代替シグナルスタックを使用する最もよくある場面は、 B<SIGSEGV> シグナルを扱う"
5379 "ときである。 B<SIGSEGV> はプロセスの通常のスタックが利用できる空間が使い果た"
5380 "された際に 生成されるシグナルである。この場合には、 B<SIGSEGV> 用のシグナルハ"
5381 "ンドラをプロセスのスタック上では起動することができない。 そのため、このシグナ"
5382 "ルを扱おうとする場合には、 代替シグナルスタックを使用しなければならない。"
5385 #: build/C/man2/sigaltstack.2:174
5387 "Establishing an alternate signal stack is useful if a process expects that "
5388 "it may exhaust its standard stack. This may occur, for example, because the "
5389 "stack grows so large that it encounters the upwardly growing heap, or it "
5390 "reaches a limit established by a call to B<setrlimit(RLIMIT_STACK, &rlim)>. "
5391 "If the standard stack is exhausted, the kernel sends the process a "
5392 "B<SIGSEGV> signal. In these circumstances the only way to catch this signal "
5393 "is on an alternate signal stack."
5395 "プロセスが標準のシグナルスタックを使い果たすことが予想される場合は、 代替シグ"
5396 "ナルスタックを確立すると便利である。 例えば、スタックが最上位アドレスから 下"
5397 "位アドレス方向に非常にたくさん積まれてしまうことで、 最下位アドレスから上位ア"
5398 "ドレス方向に積まれるヒープとぶつかってしまう場合や、 B<setrlimit"
5399 "(RLIMIT_STACK, &rlim)> の呼び出しで確立された 制限に達してしまった場合に、こ"
5400 "の様な事が起こる。 標準のスタックを使い果たしてしまうと、 カーネルはプロセス"
5401 "に B<SIGSEGV> シグナルを送る。 このような状況では、代替シグナルスタック上でし"
5405 #: build/C/man2/sigaltstack.2:180
5407 "On most hardware architectures supported by Linux, stacks grow downward. "
5408 "B<sigaltstack>() automatically takes account of the direction of stack "
5411 "Linux がサポートする多くのハードウェアアーキテクチャでは、 スタックは下位アド"
5412 "レス方向に積まれる。 B<sigaltstack>() はスタックが積まれる方向を自動的に決定"
5416 #: build/C/man2/sigaltstack.2:189
5418 "Functions called from a signal handler executing on an alternate signal "
5419 "stack will also use the alternate signal stack. (This also applies to any "
5420 "handlers invoked for other signals while the process is executing on the "
5421 "alternate signal stack.) Unlike the standard stack, the system does not "
5422 "automatically extend the alternate signal stack. Exceeding the allocated "
5423 "size of the alternate signal stack will lead to unpredictable results."
5425 "代替シグナルスタック上で実行されている シグナルハンドラから呼ばれる関数も、代"
5426 "替シグナルハンドラを使う (プロセスが代替シグナルスタック上で実行されている場"
5427 "合、 他のシグナルで呼び出されるハンドラもこの代替シグナルハンドラを使う)。 標"
5428 "準のスタックとは異なり、 システムは代替シグナルスタックを自動的に拡張しな"
5429 "い。 代替シグナルスタック用に確保したサイズを越えた場合、 結果は予想できな"
5433 #: build/C/man2/sigaltstack.2:197
5435 "A successful call to B<execve>(2) removes any existing alternate signal "
5436 "stack. A child process created via B<fork>(2) inherits a copy of its "
5437 "parent's alternate signal stack settings."
5439 "B<execve>(2) の呼び出しが成功すると、 既存の全ての代替シグナルスタックが削除"
5440 "される。 B<fork>(2) 経由で作成された子プロセスは、親プロセスの代替シグナルス"
5444 #: build/C/man2/sigaltstack.2:206
5446 "B<sigaltstack>() supersedes the older B<sigstack>() call. For backward "
5447 "compatibility, glibc also provides B<sigstack>(). All new applications "
5448 "should be written using B<sigaltstack>()."
5450 "B<sigaltstack>() は以前の B<sigstack>() を置き換えるものである。 過去プログ"
5451 "ラムとの互換性のため、glibc では B<sigstack>() も提供している。 新しいのアプ"
5452 "リケーションは全て B<sigaltstack>() を使って書くべきである。"
5455 #: build/C/man2/sigaltstack.2:206 build/C/man3/sigpause.3:59
5461 #: build/C/man2/sigaltstack.2:213
5463 "4.2BSD had a B<sigstack>() system call. It used a slightly different "
5464 "struct, and had the major disadvantage that the caller had to know the "
5465 "direction of stack growth."
5467 "4.2BSD には B<sigstack>() システムコールがあった。 この関数は少し異なった構"
5468 "造体を使っており、 呼び出した側がスタックの積まれる方向を知っていなければなら"
5472 #: build/C/man2/sigaltstack.2:216
5473 msgid "The following code segment demonstrates the use of B<sigaltstack>():"
5474 msgstr "以下のコードで B<sigaltstack>() の使用法の一部を示す:"
5477 #: build/C/man2/sigaltstack.2:220
5479 msgid "stack_t ss;\n"
5480 msgstr "stack_t ss;\n"
5483 #: build/C/man2/sigaltstack.2:228
5486 "ss.ss_sp = malloc(SIGSTKSZ);\n"
5487 "if (ss.ss_sp == NULL)\n"
5488 " /* Handle error */;\n"
5489 "ss.ss_size = SIGSTKSZ;\n"
5490 "ss.ss_flags = 0;\n"
5491 "if (sigaltstack(&ss, NULL) == -1)\n"
5492 " /* Handle error */;\n"
5494 "ss.ss_sp = malloc(SIGSTKSZ);\n"
5495 "if (ss.ss_sp == NULL)\n"
5497 "ss.ss_size = SIGSTKSZ;\n"
5498 "ss.ss_flags = 0;\n"
5499 "if (sigaltstack(&ss, NULL) == -1)\n"
5503 #: build/C/man2/sigaltstack.2:237
5505 "B<execve>(2), B<setrlimit>(2), B<sigaction>(2), B<siglongjmp>(3), "
5506 "B<sigsetjmp>(3), B<signal>(7)"
5508 "B<execve>(2), B<setrlimit>(2), B<sigaction>(2), B<siglongjmp>(3), "
5509 "B<sigsetjmp>(3), B<signal>(7)"
5512 #: build/C/man7/sigevent.7:24
5518 #: build/C/man7/sigevent.7:24 build/C/man3/siginterrupt.3:29
5524 #: build/C/man7/sigevent.7:27
5525 msgid "sigevent - structure for notification from asynchronous routines"
5529 #: build/C/man7/sigevent.7:34
5532 "union sigval { /* Data passed with notification */\n"
5533 " int sival_int; /* Integer value */\n"
5534 " void *sival_ptr; /* Pointer value */\n"
5537 "union sigval { /* Data passed with notification */\n"
5538 " int sival_int; /* Integer value */\n"
5539 " void *sival_ptr; /* Pointer value */\n"
5543 #: build/C/man7/sigevent.7:49
5546 "struct sigevent {\n"
5547 " int sigev_notify; /* Notification method */\n"
5548 " int sigev_signo; /* Notification signal */\n"
5549 " union sigval sigev_value; /* Data passed with\n"
5550 " notification */\n"
5551 " void (*sigev_notify_function) (union sigval);\n"
5552 " /* Function used for thread\n"
5553 " notification (SIGEV_THREAD) */\n"
5554 " void *sigev_notify_attributes;\n"
5555 " /* Attributes for notification thread\n"
5556 " (SIGEV_THREAD) */\n"
5557 " pid_t sigev_notify_thread_id;\n"
5558 " /* ID of thread to signal (SIGEV_THREAD_ID) */\n"
5561 "struct sigevent {\n"
5562 " int sigev_notify; /* Notification method */\n"
5563 " int sigev_signo; /* Notification signal */\n"
5564 " union sigval sigev_value; /* Data passed with\n"
5565 " notification */\n"
5566 " void (*sigev_notify_function) (union sigval);\n"
5567 " /* Function used for thread\n"
5568 " notification (SIGEV_THREAD) */\n"
5569 " void *sigev_notify_attributes;\n"
5570 " /* Attributes for notification thread\n"
5571 " (SIGEV_THREAD) */\n"
5572 " pid_t sigev_notify_thread_id;\n"
5573 " /* ID of thread to signal (SIGEV_THREAD_ID) */\n"
5577 #: build/C/man7/sigevent.7:58
5579 "The I<sigevent> structure is used by various APIs to describe the way a "
5580 "process is to be notified about an event (e.g., completion of an "
5581 "asynchronous request, expiration of a timer, or the arrival of a message)."
5585 #: build/C/man7/sigevent.7:66
5587 "The definition shown in the SYNOPSIS is approximate: some of the fields in "
5588 "the I<sigevent> structure may be defined as part of a union. Programs "
5589 "should only employ those fields relevant to the value specified in "
5594 #: build/C/man7/sigevent.7:71
5596 "The I<sigev_notify> field specifies how notification is to be performed. "
5597 "This field can have one of the following values:"
5601 #: build/C/man7/sigevent.7:71 build/C/man2/timer_create.2:105
5603 msgid "B<SIGEV_NONE>"
5604 msgstr "B<SIGEV_NONE>"
5607 #: build/C/man7/sigevent.7:74
5608 msgid "A \"null\" notification: don't do anything when the event occurs."
5612 #: build/C/man7/sigevent.7:74 build/C/man2/timer_create.2:110
5614 msgid "B<SIGEV_SIGNAL>"
5615 msgstr "B<SIGEV_SIGNAL>"
5618 #: build/C/man7/sigevent.7:78
5619 msgid "Notify the process by sending the signal specified in I<sigev_signo>."
5623 #: build/C/man7/sigevent.7:85
5625 "If the signal is caught with a signal handler that was registered using the "
5626 "B<sigaction>(2) B<SA_SIGINFO> flag, then the following fields are set in "
5627 "the I<siginfo_t> structure that is passed as the second argument of the "
5632 #: build/C/man7/sigevent.7:90
5634 "This field is set to a value that depends on the API delivering the "
5639 #: build/C/man7/sigevent.7:90 build/C/man2/wait.2:301
5642 msgstr "I<si_signo>"
5645 #: build/C/man7/sigevent.7:94
5647 "This field is set to the signal number (i.e., the same value as in "
5652 #: build/C/man7/sigevent.7:98
5653 msgid "This field is set to the value specified in I<sigev_value>."
5657 #: build/C/man7/sigevent.7:103
5659 "Depending on the API, other fields may also be set in the I<siginfo_t> "
5664 #: build/C/man7/sigevent.7:106
5666 "The same information is also available if the signal is accepted using "
5667 "B<sigwaitinfo>(2)."
5671 #: build/C/man7/sigevent.7:106 build/C/man2/timer_create.2:128
5673 msgid "B<SIGEV_THREAD>"
5674 msgstr "B<SIGEV_THREAD>"
5677 #: build/C/man7/sigevent.7:123
5679 "Notify the process by invoking I<sigev_notify_function> \"as if\" it were "
5680 "the start function of a new thread. (Among the implementation possibilities "
5681 "here are that each timer notification could result in the creation of a new "
5682 "thread, or that a single thread is created to receive all notifications.) "
5683 "The function is invoked with I<sigev_value> as its sole argument. If "
5684 "I<sigev_notify_attributes> is not NULL, it should point to a "
5685 "I<pthread_attr_t> structure that defines attributes for the new thread (see "
5686 "B<pthread_attr_init>(3))."
5690 #: build/C/man7/sigevent.7:123 build/C/man2/timer_create.2:136
5692 msgid "B<SIGEV_THREAD_ID> (Linux-specific)"
5695 #. | SIGEV_SIGNAL vs not?
5697 #: build/C/man7/sigevent.7:128
5698 msgid "Currently used only by POSIX timers; see B<timer_create>(2)."
5702 #: build/C/man7/sigevent.7:130 build/C/man2/sigpending.2:61
5703 #: build/C/man2/sigprocmask.2:109 build/C/man3/sigqueue.3:114
5704 #: build/C/man3/sigsetops.3:128 build/C/man2/sigsuspend.2:82
5705 #: build/C/man3/sigwait.3:79 build/C/man2/sigwaitinfo.2:131
5706 #: build/C/man2/timer_create.2:193 build/C/man2/timer_delete.2:66
5707 #: build/C/man2/timer_getoverrun.2:96 build/C/man2/timer_settime.2:205
5708 msgid "POSIX.1-2001."
5709 msgstr "POSIX.1-2001."
5712 #: build/C/man7/sigevent.7:140
5714 "B<timer_create>(2), B<aio_fsync>(3), B<aio_read>(3), B<aio_write>(3), "
5715 "B<getaddrinfo_a>(3), B<lio_listio>(3), B<mq_notify>(3), B<aio>(7), "
5718 "B<timer_create>(2), B<aio_fsync>(3), B<aio_read>(3), B<aio_write>(3), "
5719 "B<getaddrinfo_a>(3), B<lio_listio>(3), B<mq_notify>(3), B<aio>(7), "
5723 #: build/C/man3/siginterrupt.3:29
5725 msgid "SIGINTERRUPT"
5726 msgstr "SIGINTERRUPT"
5729 #: build/C/man3/siginterrupt.3:32
5730 msgid "siginterrupt - allow signals to interrupt system calls"
5731 msgstr "siginterrupt - シグナルでシステム・コールに割り込むことを許す"
5734 #: build/C/man3/siginterrupt.3:37
5736 msgid "B<int siginterrupt(int >I<sig>B<, int >I<flag>B<);>\n"
5737 msgstr "B<int siginterrupt(int >I<sig>B<, int >I<flag>B<);>\n"
5740 #: build/C/man3/siginterrupt.3:45
5741 msgid "B<siginterrupt>():"
5742 msgstr "B<siginterrupt>():"
5745 #: build/C/man3/siginterrupt.3:62
5747 "The B<siginterrupt>() function changes the restart behavior when a system "
5748 "call is interrupted by the signal I<sig>. If the I<flag> argument is false "
5749 "(0), then system calls will be restarted if interrupted by the specified "
5750 "signal I<sig>. This is the default behavior in Linux."
5752 "B<siginterrupt>() 関数は、システム・コールがシグナル I<sig> によって割り込ま"
5753 "れた後、再実行の際の振る舞いを変更する。 I<flag> 引き数が偽 (0) ならば、シス"
5754 "テム・コールが指定した シグナル I<sig> によって割り込まれた後に、そのシステ"
5755 "ム・コールは 再実行される。これは Linux においてデフォルトの動作である。"
5758 #: build/C/man3/siginterrupt.3:67
5760 "If the I<flag> argument is true (1) and no data has been transferred, then a "
5761 "system call interrupted by the signal I<sig> will return -1 and I<errno> "
5762 "will be set to B<EINTR>."
5764 "I<flag> 引き数が真 (1) でデータの転送が全く行なわれていないならば、 シグナル "
5765 "I<sig> でシステム・コールは中断されて、-1 が返され、 I<errno> に B<EINTR> が"
5769 #: build/C/man3/siginterrupt.3:71
5771 "If the I<flag> argument is true (1) and data transfer has started, then the "
5772 "system call will be interrupted and will return the actual amount of data "
5775 "I<flag> 引き数が真 (1) でデータの転送が開始されていれば、 システム・コールは"
5776 "中断され、それまでに実際に転送されたデータ の量が返される。"
5779 #: build/C/man3/siginterrupt.3:76
5781 "The B<siginterrupt>() function returns 0 on success, or -1 if the signal "
5782 "number I<sig> is invalid."
5784 "B<siginterrupt>() 関数は成功した場合 0 を返す。 シグナル番号 I<sig> が不正な"
5788 #: build/C/man3/siginterrupt.3:80
5789 msgid "The specified signal number is invalid."
5790 msgstr "指定したシグナル番号が不正である。"
5793 #: build/C/man3/siginterrupt.3:89
5795 "4.3BSD, POSIX.1-2001. POSIX.1-2008 marks B<siginterrupt>() as obsolete, "
5796 "recommending the use of B<sigaction>(2) with the B<SA_RESTART> flag instead."
5798 "4.3BSD, POSIX.1-2001. POSIX.1-2008 は、 B<siginterrupt>() を廃止予定として"
5799 "いる。 代わりに、 B<sigaction>(2) に B<SA_RESTART> フラグを指定して使うこと"
5803 #: build/C/man3/siginterrupt.3:91
5804 msgid "B<signal>(2)"
5805 msgstr "B<signal>(2)"
5808 #: build/C/man2/signal.2:34 build/C/man7/signal.7:44
5814 #: build/C/man2/signal.2:34
5820 #: build/C/man2/signal.2:37
5821 msgid "signal - ANSI C signal handling"
5822 msgstr "signal - ANSI C シグナル操作"
5825 #: build/C/man2/signal.2:43
5826 msgid "B<sighandler_t signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
5828 "B<sighandler_t signal(int >I<signum>B<, sighandler_t >I<sighandler>B<);>"
5831 #: build/C/man2/signal.2:52
5833 "The behavior of B<signal>() varies across UNIX versions, and has also "
5834 "varied historically across different versions of Linux. B<Avoid its use>: "
5835 "use B<sigaction>(2) instead. See I<Portability> below."
5837 "B<signal>() の動作は UNIX のバージョンにより異なる。 また、歴史的に見て "
5838 "Linux のバージョンによっても異なっている。 B<このシステムコールの使用は避け、"
5839 "> 代わりに B<sigaction>(2) を使用すること。 下記の「移植性」を参照。"
5842 #: build/C/man2/signal.2:62
5844 "B<signal>() sets the disposition of the signal I<signum> to I<handler>, "
5845 "which is either B<SIG_IGN>, B<SIG_DFL>, or the address of a programmer-"
5846 "defined function (a \"signal handler\")."
5848 "B<signal>() はシグナル I<signum> の処理方法を I<handler> に設定する。 "
5849 "I<handler> には、 B<SIG_IGN>、 B<SIG_DFL>、 プログラマが定義した関数 (「シグ"
5850 "ナル・ハンドラ」) のアドレスの いずれかを指定する。"
5853 #: build/C/man2/signal.2:66
5855 "If the signal I<signum> is delivered to the process, then one of the "
5856 "following happens:"
5858 "シグナル I<signum> がプロセスに配送されると、以下のいずれかが発生する。"
5861 #: build/C/man2/signal.2:71
5862 msgid "If the disposition is set to B<SIG_IGN>, then the signal is ignored."
5863 msgstr "処理方法が B<SIG_IGN> に設定されている場合、そのシグナルは無視される。"
5866 #: build/C/man2/signal.2:78
5868 "If the disposition is set to B<SIG_DFL>, then the default action associated "
5869 "with the signal (see B<signal>(7)) occurs."
5871 "処理方法が B<SIG_DFL> に設定されている場合、シグナルに関連づけられた デフォル"
5872 "トの動作が行われる (B<signal>(7) 参照)。"
5875 #: build/C/man2/signal.2:89
5877 "If the disposition is set to a function, then first either the disposition "
5878 "is reset to B<SIG_DFL>, or the signal is blocked (see I<Portability> below), "
5879 "and then I<handler> is called with argument I<signum>. If invocation of the "
5880 "handler caused the signal to be blocked, then the signal is unblocked upon "
5881 "return from the handler."
5883 "処理方法として関数が設定されている場合、 まず最初に処理方法が B<SIG_DFL> にリ"
5884 "セットされるかそのシグナルのブロックが実行された後、 I<signum> を引き数とし"
5885 "て I<handler> が呼び出される。 ハンドラが起動される際にシグナルがブロックされ"
5886 "た場合、 ハンドラが返る際にそのシグナルのブロックが解除される。"
5889 #: build/C/man2/signal.2:95
5890 msgid "The signals B<SIGKILL> and B<SIGSTOP> cannot be caught or ignored."
5892 "シグナル B<SIGKILL> と B<SIGSTOP> は捕捉できず、無視することもできない。"
5895 #: build/C/man2/signal.2:100
5897 "B<signal>() returns the previous value of the signal handler, or B<SIG_ERR> "
5900 "B<signal>() は、今までのシグナル・ハンドラの値を返す。エラーの場合は "
5904 #: build/C/man2/signal.2:105
5905 msgid "I<signum> is invalid."
5906 msgstr "I<signum> が不正である。"
5909 #: build/C/man2/signal.2:111
5910 msgid "The effects of B<signal>() in a multithreaded process are unspecified."
5912 "マルチスレッドプロセスにおける B<signal>() の結果は、指定されていない。"
5915 #: build/C/man2/signal.2:136
5917 "See B<sigaction>(2) for details on what happens when B<SIGCHLD> is set to "
5920 "B<SIGCHLD> の動作として B<SIG_IGN> を設定した場合の詳細な動作については、 "
5921 "B<sigaction>(2) を参照すること。"
5924 #: build/C/man2/signal.2:141
5926 "See B<signal>(7) for a list of the async-signal-safe functions that can be "
5927 "safely called from inside a signal handler."
5929 "シグナル・ハンドラ内から安全に呼び出すことができる、 async-signal-safe "
5930 "functions (非同期シングルで安全な関数) の リストについては B<signal>(7) を参"
5933 #. libc4 and libc5 define
5934 #. .IR SignalHandler ;
5936 #: build/C/man2/signal.2:157
5938 "The use of I<sighandler_t> is a GNU extension, exposed if B<_GNU_SOURCE> is "
5939 "defined; glibc also defines (the BSD-derived) I<sig_t> if B<_BSD_SOURCE> is "
5940 "defined. Without use of such a type, the declaration of B<signal>() is the "
5941 "somewhat harder to read:"
5943 "I<sighandler_t> の使用は GNU 拡張であり、 B<_GNU_SOURCE> が定義された\n"
5944 "場合に公開される。glibc では B<_BSD_SOURCE> が定義された場合には (BSD\n"
5945 "由来の) I<sig_t> も定義される。このような型を使用しないと、\n"
5946 "B<signal>() の宣言は読みにくいものとなる。"
5949 #: build/C/man2/signal.2:161
5951 msgid "B<void ( *>I<signal>B<(int >I<signum>B<, void (*>I<handler>B<)(int)) ) (int);>\n"
5952 msgstr "B<void ( *>I<signal>B<(int >I<signum>B<, void (*>I<handler>B<)(int)) ) (int);>\n"
5955 #: build/C/man2/signal.2:163
5961 #: build/C/man2/signal.2:175
5963 "The only portable use of B<signal>() is to set a signal's disposition to "
5964 "B<SIG_DFL> or B<SIG_IGN>. The semantics when using B<signal>() to "
5965 "establish a signal handler vary across systems (and POSIX.1 explicitly "
5966 "permits this variation); B<do not use it for this purpose.>"
5968 "移植性のある B<signal>() の使い方は、シグナルの処理方法を B<SIG_DFL> か "
5969 "B<SIG_IGN> に設定する方法だけである。 シグナル・ハンドラを設定するのに "
5970 "B<signal>() を使ったときの動作はシステムにより異なる (POSIX.1 は明示的にこの"
5971 "違いを認めている)。 B<移植性が必要なときはこのシステムコールを使用しないこ"
5975 #: build/C/man2/signal.2:181
5977 "POSIX.1 solved the portability mess by specifying B<sigaction>(2), which "
5978 "provides explicit control of the semantics when a signal handler is invoked; "
5979 "use that interface instead of B<signal>()."
5981 "POSIX.1 は、 B<sigaction>(2) を規定することで移植性に関する混乱を解決した。 "
5982 "B<sigaction>(2) はシグナル・ハンドラが起動される際の挙動を明示的に制御でき"
5983 "る。 B<signal>() の代わりにこのインターフェイスを使うこと。"
5986 #: build/C/man2/signal.2:194
5988 "In the original UNIX systems, when a handler that was established using "
5989 "B<signal>() was invoked by the delivery of a signal, the disposition of the "
5990 "signal would be reset to B<SIG_DFL>, and the system did not block delivery "
5991 "of further instances of the signal. System V also provides these semantics "
5992 "for B<signal>(). This was bad because the signal might be delivered again "
5993 "before the handler had a chance to reestablish itself. Furthermore, rapid "
5994 "deliveries of the same signal could result in recursive invocations of the "
5997 "オリジナルの UNIX システムでは、 B<signal>() を使って設定されたハンドラがシ"
5998 "グナルの配送により起動されると、 そのシグナルの処理方法は B<SIG_DFL> にリセッ"
5999 "トされ、システムは同じシグナルがさらに生成されても シグナルの配送をブロックし"
6000 "なかった。 System V でも、 B<signal>() に対してこれらの挙動を規定している。 "
6001 "こうした挙動はまずく、ハンドラがハンドラ自身を再設定する機会が 来るより前に、"
6002 "同じシグナルがまた配送される可能性がある。 さらに、同じシグナルが立て続けに配"
6003 "送されると、同じシグナルが ハンドラを繰り返し起動されることになる。"
6006 #: build/C/man2/signal.2:204
6008 "BSD improved on this situation by changing the semantics of signal handling "
6009 "(but, unfortunately, silently changed the semantics when establishing a "
6010 "handler with B<signal>()). On BSD, when a signal handler is invoked, the "
6011 "signal disposition is not reset, and further instances of the signal are "
6012 "blocked from being delivered while the handler is executing."
6014 "BSD では、シグナル処理の挙動を変更することで、この状況を改善した (しかし、残"
6015 "念なことに、 B<signal>() を使ってハンドラを設定する際に挙動が黙って変更され"
6016 "る)。 BSD では、シグナルハンドラが起動された際、 シグナルの処理方法はリセット"
6017 "されず、 ハンドラの実行中は、同じシグナルのさらなる生成は配送がブロックされ"
6021 #: build/C/man2/signal.2:206
6022 msgid "The situation on Linux is as follows:"
6023 msgstr "Linux での状況は以下の通りである。"
6026 #: build/C/man2/signal.2:210
6027 msgid "The kernel's B<signal>() system call provides System V semantics."
6028 msgstr "カーネルの B<signal>() システムコールは System V 方式を提供している。"
6031 #: build/C/man2/signal.2:226
6033 "By default, in glibc 2 and later, the B<signal>() wrapper function does not "
6034 "invoke the kernel system call. Instead, it calls B<sigaction>(2) using "
6035 "flags that supply BSD semantics. This default behavior is provided as long "
6036 "as the B<_BSD_SOURCE> feature test macro is defined. By default, "
6037 "B<_BSD_SOURCE> is defined; it is also implicitly defined if one defines "
6038 "B<_GNU_SOURCE>, and can of course be explicitly defined."
6040 "デフォルトでは、glibc 2 以降では、 B<signal>() ラッパー関数はカーネルのシス"
6041 "テムコールを起動しない。 代わりに、ラッパー関数は BSD 方式を示すフラグを使っ"
6042 "て B<sigaction>(2) を呼び出す。 機能検査マクロ B<_BSD_SOURCE> を定義していれ"
6043 "ば、このデフォルトの動作となる。 デフォルトでは、 B<_BSD_SOURCE> が定義され"
6044 "る。 B<_BSD_SOURCE> は B<_GNU_SOURCE> が定義された場合には暗黙のうちに定義さ"
6045 "れ、 もちろん明示的に定義することもできる。"
6047 #. System V semantics are also provided if one uses the separate
6048 #. .BR sysv_signal (3)
6051 #: build/C/man2/signal.2:249
6053 "On glibc 2 and later, if the B<_BSD_SOURCE> feature test macro is not "
6054 "defined, then B<signal>() provides System V semantics. (The default "
6055 "implicit definition of B<_BSD_SOURCE> is not provided if one invokes B<gcc>"
6056 "(1) in one of its standard modes (I<-std=xxx> or I<-ansi>) or defines "
6057 "various other feature test macros such as B<_POSIX_SOURCE>, "
6058 "B<_XOPEN_SOURCE>, or B<_SVID_SOURCE>; see B<feature_test_macros>(7).)"
6060 "glibc 2 以降では、機能検査マクロ B<_BSD_SOURCE> が定義されていなければ、 "
6061 "B<signal>() は System V 方式となる。 (B<gcc>(1) が標準指定モード (I<-"
6062 "std=xxx> or I<-ansi>) で起動された場合、もしくは B<_POSIX_SOURCE>, "
6063 "B<_XOPEN_SOURCE>, B<_SVID_SOURCE> といった他の様々な機能検査マクロが定義され"
6064 "た場合、 デフォルトの B<_BSD_SOURCE> の暗黙の定義は行われない。 "
6065 "B<feature_test_macros>(7) を参照のこと。)"
6068 #: build/C/man2/signal.2:260
6070 "The B<signal>() function in Linux libc4 and libc5 provide System V "
6071 "semantics. If one on a libc5 system includes I<E<lt>bsd/signal.hE<gt>> "
6072 "instead of I<E<lt>signal.hE<gt>>, then B<signal>() provides BSD semantics."
6074 "Linux の libc4 と libc5 の B<signal>() 関数は System V 方式である。 libc5 シ"
6075 "ステムにおいて I<E<lt>signal.hE<gt>> のかわりに I<E<lt>bsd/signal.hE<gt>> を"
6076 "インクルードすると、 B<signal>() は B<__bsd_signal>() に再定義され、 "
6077 "B<signal>() は BSD 方式となる。"
6080 #: build/C/man2/signal.2:279
6082 "B<kill>(1), B<alarm>(2), B<kill>(2), B<killpg>(2), B<pause>(2), B<sigaction>"
6083 "(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), B<sigsuspend>(2), "
6084 "B<bsd_signal>(3), B<raise>(3), B<siginterrupt>(3), B<sigqueue>(3), "
6085 "B<sigsetops>(3), B<sigvec>(3), B<sysv_signal>(3), B<signal>(7)"
6087 "B<kill>(1), B<alarm>(2), B<kill>(2), B<killpg>(2), B<pause>(2), B<sigaction>"
6088 "(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), B<sigsuspend>(2), "
6089 "B<bsd_signal>(3), B<raise>(3), B<siginterrupt>(3), B<sigqueue>(3), "
6090 "B<sigsetops>(3), B<sigvec>(3), B<sysv_signal>(3), B<signal>(7)"
6093 #: build/C/man7/signal.7:44
6099 #: build/C/man7/signal.7:47
6100 msgid "signal - overview of signals"
6101 msgstr "signal - シグナルの概要"
6104 #: build/C/man7/signal.7:50
6106 "Linux supports both POSIX reliable signals (hereinafter \"standard signals"
6107 "\") and POSIX real-time signals."
6109 "Linux は POSIX 信頼シグナル (reliable signal; 以後 \"標準シグナル\"と表記) "
6110 "と POSIX リアルタイムシグナルの両方に対応している。"
6113 #: build/C/man7/signal.7:50
6115 msgid "Signal Dispositions"
6119 #: build/C/man7/signal.7:55
6121 "Each signal has a current I<disposition>, which determines how the process "
6122 "behaves when it is delivered the signal."
6124 "シグナルはそれぞれ現在の「処理方法 (disposition)」を保持しており、 この処理方"
6125 "法によりシグナルが配送された際にプロセスが どのような振舞いをするかが決まる。"
6128 #: build/C/man7/signal.7:58
6130 "The entries in the \"Action\" column of the tables below specify the default "
6131 "disposition for each signal, as follows:"
6133 "後述の表の \"動作\" の欄のエントリは各シグナルのデフォルトの 処理方法を示して"
6137 #: build/C/man7/signal.7:58
6143 #: build/C/man7/signal.7:60
6144 msgid "Default action is to terminate the process."
6145 msgstr "デフォルトの動作はプロセス終了。"
6148 #: build/C/man7/signal.7:60
6154 #: build/C/man7/signal.7:62
6155 msgid "Default action is to ignore the signal."
6156 msgstr "デフォルトの動作はこのシグナルの無視。"
6159 #: build/C/man7/signal.7:62
6165 #: build/C/man7/signal.7:65
6167 "Default action is to terminate the process and dump core (see B<core>(5))."
6168 msgstr "デフォルトの動作はプロセス終了とコアダンプ出力 (B<core>(5) 参照)。"
6171 #: build/C/man7/signal.7:65
6177 #: build/C/man7/signal.7:67
6178 msgid "Default action is to stop the process."
6179 msgstr "デフォルトの動作はプロセスの一時停止。"
6182 #: build/C/man7/signal.7:67
6188 #: build/C/man7/signal.7:69
6189 msgid "Default action is to continue the process if it is currently stopped."
6190 msgstr "デフォルトの動作は、プロセスが停止中の場合にその実行の再開。"
6193 #: build/C/man7/signal.7:91
6195 "A process can change the disposition of a signal using B<sigaction>(2) or "
6196 "B<signal>(2). (The latter is less portable when establishing a signal "
6197 "handler; see B<signal>(2) for details.) Using these system calls, a "
6198 "process can elect one of the following behaviors to occur on delivery of the "
6199 "signal: perform the default action; ignore the signal; or catch the signal "
6200 "with a I<signal handler>, a programmer-defined function that is "
6201 "automatically invoked when the signal is delivered. (By default, the signal "
6202 "handler is invoked on the normal process stack. It is possible to arrange "
6203 "that the signal handler uses an alternate stack; see B<sigaltstack>(2) for "
6204 "a discussion of how to do this and when it might be useful.)"
6206 "プロセスは、 B<sigaction>(2) や B<signal>(2) を使って、シグナルの処理方法を"
6207 "変更することができる (B<signal>(2) の方がシグナルハンドラを設定する際の移植"
6208 "性が低い; 詳細は B<signal>(2) を参照)。 シグナルの配送時に起こる動作として "
6209 "プロセスが選択できるのは、次のいずれか一つである。 デフォルトの動作を実行す"
6210 "る、シグナルを無視する、 I<シグナルハンドラ (signal handler)> でシグナルを捕"
6211 "捉する。シグナルハンドラとは、シグナル配送時に 自動的に起動されるプログラマ定"
6212 "義の関数である。 (デフォルトでは、シグナルハンドラは通常のプロセスのスタック"
6213 "上で起動される。 シグナルハンドラが代替スタック (alternate stack) を使用する"
6214 "ように設定する こともできる。代替スタックを使用するように設定する方法と、どの"
6215 "ような際に 代替スタックが役に立つかについての議論については B<sigaltstack>"
6219 #: build/C/man7/signal.7:95
6221 "The signal disposition is a per-process attribute: in a multithreaded "
6222 "application, the disposition of a particular signal is the same for all "
6225 "シグナルの処理方法はプロセス単位の属性である。 マルチスレッドのアプリケーショ"
6226 "ンでは、あるシグナルの処理方法は 全てのスレッドで同じである。"
6229 #: build/C/man7/signal.7:103
6231 msgid "Sending a Signal"
6235 #: build/C/man7/signal.7:106
6237 "The following system calls and library functions allow the caller to send a "
6240 "以下のシステムコールとライブラリ関数を使って、 呼び出し者はシグナルを送信する"
6244 #: build/C/man7/signal.7:106
6247 msgstr "B<raise>(3)"
6250 #: build/C/man7/signal.7:109
6251 msgid "Sends a signal to the calling thread."
6252 msgstr "呼び出したスレッドにシグナルを送る。"
6255 #: build/C/man7/signal.7:114
6257 "Sends a signal to a specified process, to all members of a specified process "
6258 "group, or to all processes on the system."
6260 "指定されたプロセスや、指定されたプロセスグループの全メンバー、 システムの全プ"
6264 #: build/C/man7/signal.7:114
6266 msgid "B<killpg>(2)"
6267 msgstr "B<killpg>(2)"
6270 #: build/C/man7/signal.7:117
6271 msgid "Sends a signal to all of the members of a specified process group."
6272 msgstr "指定されたプロセスグループの全メンバーにシグナルを送る。"
6275 #: build/C/man7/signal.7:117
6277 msgid "B<pthread_kill>(3)"
6278 msgstr "B<pthread_kill>(3)"
6281 #: build/C/man7/signal.7:121
6283 "Sends a signal to a specified POSIX thread in the same process as the caller."
6285 "呼び出し者と同じプロセス内の指定された POSIX スレッドにシグナルを送る。"
6288 #: build/C/man7/signal.7:121
6290 msgid "B<tgkill>(2)"
6291 msgstr "B<tgkill>(2)"
6294 #: build/C/man7/signal.7:126
6296 "Sends a signal to a specified thread within a specific process. (This is "
6297 "the system call used to implement B<pthread_kill>(3).)"
6299 "指定されたプロセス内の指定されたスレッドにシグナルを送る (このシステムコール"
6300 "を使って B<pthread_kill>(3) は実装されている)。"
6303 #: build/C/man7/signal.7:129
6304 msgid "Sends a real-time signal with accompanying data to a specified process."
6305 msgstr "指定されたプロセスに付属データとともにリアルタイムシグナルを送る。"
6308 #: build/C/man7/signal.7:129
6310 msgid "Waiting for a Signal to be Caught"
6311 msgstr "シグナルが捕捉されるのを待つ"
6314 #: build/C/man7/signal.7:133
6316 "The following system calls suspend execution of the calling process or "
6317 "thread until a signal is caught (or an unhandled signal terminates the "
6320 "以下のシステムコールを使って、シグナルが捕捉されるまで 呼び出したプロセスやス"
6321 "レッドの実行を中断 (suspend) することができる (ハンドラが設定されていないシグ"
6322 "ナルによりそのプロセスが終了した 場合にも実行の停止は終了する)。"
6325 #: build/C/man7/signal.7:133
6328 msgstr "B<pause>(2)"
6331 #: build/C/man7/signal.7:136
6332 msgid "Suspends execution until any signal is caught."
6333 msgstr "何かシグナルが捕捉されるまで実行を停止する。"
6336 #: build/C/man7/signal.7:136
6338 msgid "B<sigsuspend>(2)"
6339 msgstr "B<sigsuspend>(2)"
6342 #: build/C/man7/signal.7:140
6344 "Temporarily changes the signal mask (see below) and suspends execution until "
6345 "one of the unmasked signals is caught."
6347 "一時的にシグナルマスク (下記参照) を変更し、 マスクされていないシグナルのいず"
6348 "れかが捕捉されるまで 実行を中断する。"
6351 #: build/C/man7/signal.7:140
6353 msgid "Synchronously Accepting a Signal"
6357 #: build/C/man7/signal.7:147
6359 "Rather than asynchronously catching a signal via a signal handler, it is "
6360 "possible to synchronously accept the signal, that is, to block execution "
6361 "until the signal is delivered, at which point the kernel returns information "
6362 "about the signal to the caller. There are two general ways to do this:"
6364 "シグナルハンドラ経由でシグナルを非同期 (asynchronously) で捕捉する以外にも、 "
6365 "シグナルを同期 (synchronously) して受け付けることもできる。 同期して受け付け"
6366 "るとは、シグナルが配送されるまで実行を停止 (block) するということである。シ"
6367 "グナルを受け付けた際に、カーネルは そのシグナルに関する情報を呼び出し者に返"
6368 "す。 これを行う一般的な方法が二つある。"
6371 #: build/C/man7/signal.7:155
6373 "B<sigwaitinfo>(2), B<sigtimedwait>(2), and B<sigwait>(3) suspend execution "
6374 "until one of the signals in a specified set is delivered. Each of these "
6375 "calls returns information about the delivered signal."
6377 "B<sigwaitinfo>(2), B<sigtimedwait>(2), B<sigwait>(3) は、指定されたシグナル"
6378 "集合のシグナルの一つが配送されるまで実行を中断する。 どのシステムコールや関数"
6379 "でも、配送されたシグナルに関する情報が返される。"
6382 #: build/C/man7/signal.7:168
6384 "B<signalfd>(2) returns a file descriptor that can be used to read "
6385 "information about signals that are delivered to the caller. Each B<read>"
6386 "(2) from this file descriptor blocks until one of the signals in the set "
6387 "specified in the B<signalfd>(2) call is delivered to the caller. The "
6388 "buffer returned by B<read>(2) contains a structure describing the signal."
6390 "B<signalfd>(2) が返すファイルディスクリプタを使うと、呼び出し元に配送された "
6391 "シグナルに関する情報を読み出すことができる。 このファイルディスクリプタから"
6392 "の B<read>(2) は、 B<signalfd>(2) の呼び出し時に指定されたシグナル集合のシ"
6393 "グナルの一つが呼び出し元に 配送されるまで停止 (block) する。 B<read>(2) が返"
6394 "すバッファにはシグナルに関する情報を格納した構造体が入っている。"
6397 #: build/C/man7/signal.7:168
6399 msgid "Signal Mask and Pending Signals"
6400 msgstr "シグナルマスクと処理待ちシグナル"
6403 #: build/C/man7/signal.7:175
6405 "A signal may be I<blocked>, which means that it will not be delivered until "
6406 "it is later unblocked. Between the time when it is generated and when it is "
6407 "delivered a signal is said to be I<pending>."
6409 "シグナルは I<ブロック (block)> されることがある。ブロックされると、そのシグナ"
6410 "ルは その後ブロックを解除されるまで配送されなくなる。 シグナルが生成されてか"
6411 "ら配送されるまでの間、そのシグナルは I<処理待ち (pending)> であると呼ばれる。"
6414 #: build/C/man7/signal.7:184
6416 "Each thread in a process has an independent I<signal mask>, which indicates "
6417 "the set of signals that the thread is currently blocking. A thread can "
6418 "manipulate its signal mask using B<pthread_sigmask>(3). In a traditional "
6419 "single-threaded application, B<sigprocmask>(2) can be used to manipulate "
6422 "プロセス内の各スレッドは、それぞれ独立な I<シグナルマスク (signal mask)> を持"
6423 "つ。シグナルマスクはそのスレッドが現在ブロックしている シグナル集合を示すもの"
6424 "である。 スレッドは、 B<pthread_sigmask>(3) を使って自分のシグナルマスクを操"
6425 "作できる。 伝統的なシングルスレッドのアプリケーションでは、 B<sigprocmask>"
6426 "(2) を使って、シグナルマスクを操作できる。"
6429 #: build/C/man7/signal.7:190 build/C/man2/sigprocmask.2:121
6431 "A child created via B<fork>(2) inherits a copy of its parent's signal mask; "
6432 "the signal mask is preserved across B<execve>(2)."
6434 "B<fork>(2) 経由で作成された子プロセスは親プロセスのシグナルマスクのコピーを"
6435 "継承する。 B<execve>(2) の前後でシグナルマスクは保持される。"
6438 #: build/C/man7/signal.7:207
6440 "A signal may be generated (and thus pending) for a process as a whole (e."
6441 "g., when sent using B<kill>(2)) or for a specific thread (e.g., certain "
6442 "signals, such as B<SIGSEGV> and B<SIGFPE>, generated as a consequence of "
6443 "executing a specific machine-language instruction are thread directed, as "
6444 "are signals targeted at a specific thread using B<pthread_kill>(3)). A "
6445 "process-directed signal may be delivered to any one of the threads that does "
6446 "not currently have the signal blocked. If more than one of the threads has "
6447 "the signal unblocked, then the kernel chooses an arbitrary thread to which "
6448 "to deliver the signal."
6450 "生成されるシグナル (したがって処理待ちとなるシグナル) には、 プロセス全体宛て"
6451 "と特定のスレッド宛てがある。 例えば、プロセス全体宛てのシグナルは B<kill>"
6452 "(2) を使って送信される。 特定のマシン語の命令の実行の結果として生成される、 "
6453 "B<SIGSEGV> や B<SIGFPE> などのシグナルは、スレッド宛てとなる。 また、 "
6454 "B<pthread_kill>(3) を使って特定のスレッド宛てに生成されたシグナルも スレッド"
6455 "宛てとなる。 プロセス宛てのシグナルは、そのシグナルをブロックしていないスレッ"
6456 "ドのうち いずれかの一つに配送することができる。そのシグナルをブロックしていな"
6457 "い スレッドが複数ある場合、シグナルを配送するスレッドはカーネルが 無作為に選"
6461 #: build/C/man7/signal.7:214
6463 "A thread can obtain the set of signals that it currently has pending using "
6464 "B<sigpending>(2). This set will consist of the union of the set of pending "
6465 "process-directed signals and the set of signals pending for the calling "
6468 "スレッドは、 B<sigpending>(2) を使って、現在処理待ちのシグナル集合を取得する"
6469 "ことができる。 この集合は、プロセス宛ての処理待ちシグナルと 呼び出したスレッ"
6470 "ド宛てのシグナルの両方から構成される。"
6473 #: build/C/man7/signal.7:220 build/C/man2/sigpending.2:76
6475 "A child created via B<fork>(2) initially has an empty pending signal set; "
6476 "the pending signal set is preserved across an B<execve>(2)."
6478 "B<fork>(2) 経由で作成された子プロセスでは、処理待ちのシグナル集合は空の集合"
6479 "で初期化される。 B<execve>(2) の前後で、処理待ちのシグナル集合は保持される。"
6482 #: build/C/man7/signal.7:220
6484 msgid "Standard Signals"
6488 #: build/C/man7/signal.7:232
6490 "Linux supports the standard signals listed below. Several signal numbers "
6491 "are architecture-dependent, as indicated in the \"Value\" column. (Where "
6492 "three values are given, the first one is usually valid for alpha and sparc, "
6493 "the middle one for x86, arm, and most other architectures, and the last one "
6494 "for mips. (Values for parisc are I<not> shown; see the kernel source for "
6495 "signal numbering on that architecture.) A - denotes that a signal is absent "
6496 "on the corresponding architecture.)"
6498 "Linux は以下に示す標準シグナルに対応している。シグナル番号の一部はアー\n"
6499 "キテクチャ依存であり、\"値\" 欄に示す通りである。 (3つの値が書かれている\n"
6500 "ものは、 1つ目が alpha と sparc で通常有効な値、 真ん中が x86, arm や\n"
6501 "他のほとんどのアーキテクチャでの有効な値、最後が mips での値である。\n"
6502 "(parisc での値は記載されてI<いない>。 parisc でのシグナル番号は\n"
6503 "カーネルソースを参照してほしい)。 - はそのアーキテ\n"
6504 "クチャにおいて対応するシグナルがないことを示す。)"
6507 #: build/C/man7/signal.7:234
6508 msgid "First the signals described in the original POSIX.1-1990 standard."
6509 msgstr "最初に、POSIX.1-1990 に定義されているシグナルを示す。"
6512 #: build/C/man7/signal.7:238 build/C/man7/signal.7:274
6513 #: build/C/man7/signal.7:303
6515 msgid "Signal\tValue\tAction\tComment\n"
6516 msgstr "シグナル\t値\t動作\tコメント\n"
6519 #: build/C/man7/signal.7:239
6521 msgid "SIGHUP\t\\01\tTerm\tHangup detected on controlling terminal\n"
6522 msgstr "SIGHUP\t\\01\tTerm\t制御端末(controlling terminal)のハングアップ検出、\n"
6525 #: build/C/man7/signal.7:240
6527 msgid "\t\t\tor death of controlling process\n"
6528 msgstr "\t\t\tまたは制御しているプロセスの死\n"
6531 #: build/C/man7/signal.7:241
6533 msgid "SIGINT\t\\02\tTerm\tInterrupt from keyboard\n"
6534 msgstr "SIGINT\t\\02\tTerm\tキーボードからの割り込み (Interrupt)\n"
6537 #: build/C/man7/signal.7:242
6539 msgid "SIGQUIT\t\\03\tCore\tQuit from keyboard\n"
6540 msgstr "SIGQUIT\t\\03\tCore\tキーボードによる中止 (Quit)\n"
6543 #: build/C/man7/signal.7:243
6545 msgid "SIGILL\t\\04\tCore\tIllegal Instruction\n"
6546 msgstr "SIGILL\t\\04\tCore\t不正な命令\n"
6549 #: build/C/man7/signal.7:244
6551 msgid "SIGABRT\t\\06\tCore\tAbort signal from B<abort>(3)\n"
6552 msgstr "SIGABRT\t\\06\tCore\tB<abort>(3) からの中断 (Abort) シグナル\n"
6555 #: build/C/man7/signal.7:245
6557 msgid "SIGFPE\t\\08\tCore\tFloating point exception\n"
6558 msgstr "SIGFPE\t\\08\tCore\t浮動小数点例外\n"
6561 #: build/C/man7/signal.7:246
6563 msgid "SIGKILL\t\\09\tTerm\tKill signal\n"
6564 msgstr "SIGKILL\t\\09\tTerm\tKill シグナル\n"
6567 #: build/C/man7/signal.7:247
6569 msgid "SIGSEGV\t11\tCore\tInvalid memory reference\n"
6570 msgstr "SIGSEGV\t11\tCore\t不正なメモリ参照\n"
6573 #: build/C/man7/signal.7:248
6575 msgid "SIGPIPE\t13\tTerm\tBroken pipe: write to pipe with no\n"
6576 msgstr "SIGPIPE\t13\tTerm\tパイプ破壊:\n"
6579 #: build/C/man7/signal.7:249
6581 msgid "\t\t\treaders\n"
6582 msgstr "\t\t\t読み手の無いパイプへの書き出し\n"
6585 #: build/C/man7/signal.7:250
6587 msgid "SIGALRM\t14\tTerm\tTimer signal from B<alarm>(2)\n"
6588 msgstr "SIGALRM\t14\tTerm\tB<alarm>(2) からのタイマーシグナル\n"
6591 #: build/C/man7/signal.7:251
6593 msgid "SIGTERM\t15\tTerm\tTermination signal\n"
6594 msgstr "SIGTERM\t15\tTerm\t終了 (termination) シグナル\n"
6597 #: build/C/man7/signal.7:252
6599 msgid "SIGUSR1\t30,10,16\tTerm\tUser-defined signal 1\n"
6600 msgstr "SIGUSR1\t30,10,16\tTerm\tユーザ定義シグナル 1\n"
6603 #: build/C/man7/signal.7:253
6605 msgid "SIGUSR2\t31,12,17\tTerm\tUser-defined signal 2\n"
6606 msgstr "SIGUSR2\t31,12,17\tTerm\tユーザ定義シグナル 2\n"
6609 #: build/C/man7/signal.7:254
6611 msgid "SIGCHLD\t20,17,18\tIgn\tChild stopped or terminated\n"
6612 msgstr "SIGCHLD\t20,17,18\tIgn\t子プロセスの一時停止 (stop) または終了\n"
6615 #: build/C/man7/signal.7:255
6617 msgid "SIGCONT\t19,18,25\tCont\tContinue if stopped\n"
6618 msgstr "SIGCONT\t19,18,25\tCont\t一時停止 (stop) からの再開\n"
6621 #: build/C/man7/signal.7:256
6623 msgid "SIGSTOP\t17,19,23\tStop\tStop process\n"
6624 msgstr "SIGSTOP\t17,19,23\tStop\tプロセスの一時停止 (stop)\n"
6627 #: build/C/man7/signal.7:257
6629 msgid "SIGTSTP\t18,20,24\tStop\tStop typed at tty\n"
6630 msgstr "SIGTSTP\t18,20,24\tStop\t端末 (tty) より入力された一時停止 (stop)\n"
6633 #: build/C/man7/signal.7:258
6635 msgid "SIGTTIN\t21,21,26\tStop\ttty input for background process\n"
6636 msgstr "SIGTTIN\t21,21,26\tStop\tバックグランドプロセスの tty 入力\n"
6639 #: build/C/man7/signal.7:259
6641 msgid "SIGTTOU\t22,22,27\tStop\ttty output for background process\n"
6642 msgstr "SIGTTOU\t22,22,27\tStop\tバックグランドプロセスの tty 出力\n"
6645 #: build/C/man7/signal.7:267
6647 "The signals B<SIGKILL> and B<SIGSTOP> cannot be caught, blocked, or ignored."
6648 msgstr "シグナル B<SIGKILL> と B<SIGSTOP> はキャッチ、ブロック、無視できない。"
6651 #: build/C/man7/signal.7:270
6653 "Next the signals not in the POSIX.1-1990 standard but described in SUSv2 and "
6656 "次に、 POSIX.1-1990 標準にはないが、 SUSv2 と POSIX.1-2001 に記述されているシ"
6660 #: build/C/man7/signal.7:275
6662 msgid "SIGBUS\t10,7,10\tCore\tBus error (bad memory access)\n"
6663 msgstr "SIGBUS\t10,7,10\tCore\tバスエラー (不正なメモリアクセス)\n"
6666 #: build/C/man7/signal.7:276
6668 msgid "SIGPOLL\t\tTerm\tPollable event (Sys V).\n"
6669 msgstr "SIGPOLL\t\tTerm\tポーリング可能なイベント (Sys V)。\n"
6672 #: build/C/man7/signal.7:277
6674 msgid "\t\t\tSynonym for B<SIGIO>\n"
6675 msgstr "\t\t\tB<SIGIO> と同義\n"
6678 #: build/C/man7/signal.7:278
6680 msgid "SIGPROF\t27,27,29\tTerm\tProfiling timer expired\n"
6681 msgstr "SIGPROF\t27,27,29\tTerm\tprofiling タイマの時間切れ\n"
6684 #: build/C/man7/signal.7:279
6686 msgid "SIGSYS\t12,31,12\tCore\tBad argument to routine (SVr4)\n"
6687 msgstr "SIGSYS\t12,31,12\tCore\tルーチンへの引き数が不正 (SVr4)\n"
6690 #: build/C/man7/signal.7:280
6692 msgid "SIGTRAP\t5\tCore\tTrace/breakpoint trap\n"
6693 msgstr "SIGTRAP\t5\tCore\tトレース/ブレークポイント トラップ\n"
6696 #: build/C/man7/signal.7:281
6698 msgid "SIGURG\t16,23,21\tIgn\tUrgent condition on socket (4.2BSD)\n"
6699 msgstr "SIGURG\t16,23,21\tIgn\tソケットの緊急事態 (urgent condition) (4.2BSD)\n"
6702 #: build/C/man7/signal.7:282
6704 msgid "SIGVTALRM\t26,26,28\tTerm\tVirtual alarm clock (4.2BSD)\n"
6705 msgstr "SIGVTALRM\t26,26,28\tTerm\t仮想アラームクロック (4.2BSD)\n"
6708 #: build/C/man7/signal.7:283
6710 msgid "SIGXCPU\t24,24,30\tCore\tCPU time limit exceeded (4.2BSD)\n"
6711 msgstr "SIGXCPU\t24,24,30\tCore\tCPU時間制限超過 (4.2BSD)\n"
6714 #: build/C/man7/signal.7:284
6716 msgid "SIGXFSZ\t25,25,31\tCore\tFile size limit exceeded (4.2BSD)\n"
6717 msgstr "SIGXFSZ\t25,25,31\tCore\tファイルサイズ制限の超過 (4.2BSD)\n"
6720 #: build/C/man7/signal.7:297
6722 "Up to and including Linux 2.2, the default behavior for B<SIGSYS>, "
6723 "B<SIGXCPU>, B<SIGXFSZ>, and (on architectures other than SPARC and MIPS) "
6724 "B<SIGBUS> was to terminate the process (without a core dump). (On some "
6725 "other UNIX systems the default action for B<SIGXCPU> and B<SIGXFSZ> is to "
6726 "terminate the process without a core dump.) Linux 2.4 conforms to the "
6727 "POSIX.1-2001 requirements for these signals, terminating the process with a "
6730 "Linux 2.2 以前では、 B<SIGSYS>, B<SIGXCPU>, B<SIGXFSZ> および SPARC と MIPS "
6731 "以外のアーキテクチャでの B<SIGBUS> のデフォルトの振る舞いは (コアダンプ出力な"
6732 "しの) プロセス終了であった。 (他の UNIX システムにも B<SIGXCPU> と "
6733 "B<SIGXFSZ> のデフォルトの動作がコアダンプなしのプロセス終了のものがある。) "
6734 "Linux 2.4 では、POSIX.1-2001 での要求仕様に準拠して、 これらのシグナルで、プ"
6735 "ロセスを終了させ、コアダンプを出力する ようになっている。"
6738 #: build/C/man7/signal.7:299
6739 msgid "Next various other signals."
6740 msgstr "次にその他の各種シグナルを示す。"
6743 #: build/C/man7/signal.7:304
6745 msgid "SIGIOT\t6\tCore\tIOT trap. A synonym for B<SIGABRT>\n"
6746 msgstr "SIGIOT\t6\tCore\tIOT トラップ。B<SIGABRT> と同義\n"
6749 #: build/C/man7/signal.7:305
6751 msgid "SIGEMT\t7,-,7\tTerm\n"
6752 msgstr "SIGEMT\t7,-,7\tTerm\n"
6755 #: build/C/man7/signal.7:306
6757 msgid "SIGSTKFLT\t-,16,-\tTerm\tStack fault on coprocessor (unused)\n"
6758 msgstr "SIGSTKFLT\t-,16,-\tA\t数値演算プロセッサにおけるスタックフォルト (未使用)\n"
6761 #: build/C/man7/signal.7:307
6763 msgid "SIGIO\t23,29,22\tTerm\tI/O now possible (4.2BSD)\n"
6764 msgstr "SIGIO\t23,29,22\tTerm\t入出力が可能になった (4.2BSD)\n"
6767 #: build/C/man7/signal.7:308
6769 msgid "SIGCLD\t-,-,18\tIgn\tA synonym for B<SIGCHLD>\n"
6770 msgstr "SIGCLD\t-,-,18\tIgn\tB<SIGCHLD> と同義\n"
6773 #: build/C/man7/signal.7:309
6775 msgid "SIGPWR\t29,30,19\tTerm\tPower failure (System V)\n"
6776 msgstr "SIGPWR\t29,30,19\tTerm\t電源喪失 (Power failure) (System V)\n"
6779 #: build/C/man7/signal.7:310
6781 msgid "SIGINFO\t29,-,-\t\tA synonym for B<SIGPWR>\n"
6782 msgstr "SIGINFO\t29,-,-\t \tB<SIGPWR> と同義\n"
6785 #: build/C/man7/signal.7:311
6787 msgid "SIGLOST\t-,-,-\tTerm\tFile lock lost (unused)\n"
6788 msgstr "SIGLOST\t-,-,-\tTerm\tファイルロックが失われた (未使用)\n"
6791 #: build/C/man7/signal.7:312
6793 msgid "SIGWINCH\t28,28,20\tIgn\tWindow resize signal (4.3BSD, Sun)\n"
6794 msgstr "SIGWINCH\t28,28,20\tIgn\tウィンドウ リサイズ シグナル (4.3BSD, Sun)\n"
6797 #: build/C/man7/signal.7:313
6799 msgid "SIGUNUSED\t-,31,-\tCore\tSynonymous with B<SIGSYS>\n"
6800 msgstr "SIGUNUSED\t-,31,-\tCore\tB<SIGSYS> と同義\n"
6803 #: build/C/man7/signal.7:323
6805 "(Signal 29 is B<SIGINFO> / B<SIGPWR> on an alpha but B<SIGLOST> on a sparc.)"
6807 "(シグナル 29 は alpha では B<SIGINFO> / B<SIGPWR> だが、sparc では "
6811 #: build/C/man7/signal.7:329
6813 "B<SIGEMT> is not specified in POSIX.1-2001, but nevertheless appears on most "
6814 "other UNIX systems, where its default action is typically to terminate the "
6815 "process with a core dump."
6817 "B<SIGEMT> は POSIX.1-2001 に規定されていないが、 その他の多くの UNIX システム"
6818 "に存在する。 デフォルトの動作は多くの場合、コアダンプ出力を伴うプロセスの終了"
6822 #: build/C/man7/signal.7:333
6824 "B<SIGPWR> (which is not specified in POSIX.1-2001) is typically ignored by "
6825 "default on those other UNIX systems where it appears."
6827 "B<SIGPWR> は (POSIX.1-2001 に規定されていないが) このシグナルが存在する 他の "
6828 "UNIX システムでは多くの場合、デフォルト動作は無視である。"
6831 #: build/C/man7/signal.7:337
6833 "B<SIGIO> (which is not specified in POSIX.1-2001) is ignored by default on "
6834 "several other UNIX systems."
6836 "B<SIGIO> は (POSIX.1-2001 に規定されていないが) いくつかの他の UNIX システム"
6839 #. parisc is the only exception: SIGSYS is 12, SIGUNUSED is 31
6841 #: build/C/man7/signal.7:344
6843 "Where defined, B<SIGUNUSED> is synonymous with B<SIGSYS> on most "
6846 "B<SIGUNUSED> が定義されている場合には、ほとんどのアーキテクチャで B<SIGSYS> "
6850 #: build/C/man7/signal.7:344
6852 msgid "Real-time Signals"
6856 #: build/C/man7/signal.7:354
6858 "Linux supports real-time signals as originally defined in the POSIX.1b real-"
6859 "time extensions (and now included in POSIX.1-2001). The range of supported "
6860 "real-time signals is defined by the macros B<SIGRTMIN> and B<SIGRTMAX>. "
6861 "POSIX.1-2001 requires that an implementation support at least "
6862 "B<_POSIX_RTSIG_MAX> (8) real-time signals."
6864 "Linux はリアルタイムシグナルをサポートしている。 リアルタイムシグナルは元々 "
6865 "POSIX.1b のリアルタイム拡張で定義されて いるものであり、現在では "
6866 "POSIX.1-2001 に含まれている。 対応しているリアルタイムシグナルの範囲は、マク"
6867 "ロ B<SIGRTMIN> と B<SIGRTMAX> で定義される。 POSIX.1-2001 では、少なくとも "
6868 "B<_POSIX_RTSIG_MAX> (8) 個のリアルタイムシグナルに対応した実装が要求されてい"
6872 #: build/C/man7/signal.7:376
6874 "The Linux kernel supports a range of 32 different real-time signals, "
6875 "numbered 33 to 64. However, the glibc POSIX threads implementation "
6876 "internally uses two (for NPTL) or three (for LinuxThreads) real-time signals "
6877 "(see B<pthreads>(7)), and adjusts the value of B<SIGRTMIN> suitably (to 34 "
6878 "or 35). Because the range of available real-time signals varies according "
6879 "to the glibc threading implementation (and this variation can occur at run "
6880 "time according to the available kernel and glibc), and indeed the range of "
6881 "real-time signals varies across UNIX systems, programs should I<never refer "
6882 "to real-time signals using hard-coded numbers>, but instead should always "
6883 "refer to real-time signals using the notation B<SIGRTMIN>+n, and include "
6884 "suitable (run-time) checks that B<SIGRTMIN>+n does not exceed B<SIGRTMAX>."
6886 "Linux は、32 個の異なるリアルタイムシグナルに対応しており、 その番号は 33 か"
6887 "ら 64 である。 しかしながら、glibc の POSIX スレッド実装は、 内部で 2個 "
6888 "(NPTL の場合) か 3個 (LinuxThreads の場合) の リアルタイムシグナルを使用して"
6889 "おり (B<pthreads>(7) 参照)、 B<SIGRTMIN> の値を適切に (34 か 35 に) 調整す"
6890 "る。 利用可能なリアルタイムシグナルの範囲は glibc のスレッド実装により 異なる"
6891 "し (使用するカーネルと glibc により実行時にも変化する)、 UNIX システムの種類"
6892 "によっても異なる。したがって、 プログラムでは「ハードコーディングした数字を"
6893 "使ってのリアルタイムシグナルの 参照は決してすべきではなく」、代わりに "
6894 "B<SIGRTMIN>+n の形で参照すべきである。また、 B<SIGRTMIN>+n が B<SIGRTMAX> を"
6895 "超えていないかのチェックを (実行時に) 適切に行うべきである。"
6898 #: build/C/man7/signal.7:380
6900 "Unlike standard signals, real-time signals have no predefined meanings: the "
6901 "entire set of real-time signals can be used for application-defined purposes."
6903 "標準シグナルと異なり、リアルタイムシグナルには 事前に定義された意味はない。 "
6904 "リアルタイムシグナルの全部をアプリケーションで定義した用途に使える。"
6907 #: build/C/man7/signal.7:383
6909 "The default action for an unhandled real-time signal is to terminate the "
6910 "receiving process."
6912 "ハンドリングしないリアルタイムシグナルのデフォルトの動作は 受信したプロセスの"
6916 #: build/C/man7/signal.7:385
6917 msgid "Real-time signals are distinguished by the following:"
6918 msgstr "リアルタイムシグナルは以下の特徴がある:"
6921 #: build/C/man7/signal.7:389
6923 "Multiple instances of real-time signals can be queued. By contrast, if "
6924 "multiple instances of a standard signal are delivered while that signal is "
6925 "currently blocked, then only one instance is queued."
6927 "リアルタイムシグナルは複数の実体をキューに入れることができる。 一方、標準シグ"
6928 "ナルの場合、そのシグナルがブロックされている間に 同じシグナルの複数のインスタ"
6929 "ンスが配送されても、 1 つだけがキューに入れられる。"
6932 #: build/C/man7/signal.7:409
6934 "If the signal is sent using B<sigqueue>(3), an accompanying value (either an "
6935 "integer or a pointer) can be sent with the signal. If the receiving process "
6936 "establishes a handler for this signal using the B<SA_SIGINFO> flag to "
6937 "B<sigaction>(2) then it can obtain this data via the I<si_value> field of "
6938 "the I<siginfo_t> structure passed as the second argument to the handler. "
6939 "Furthermore, the I<si_pid> and I<si_uid> fields of this structure can be "
6940 "used to obtain the PID and real user ID of the process sending the signal."
6942 "シグナルが B<sigqueue>(3) を用いて送信された場合、 付属データ (整数かポイン"
6943 "タ) をシグナルと共に送信できる。 受信側プロセスが B<sigaction>(2) に "
6944 "B<SA_SIGINFO> フラグを指定してシグナルハンドラを設定した場合、 このデータは "
6945 "I<siginfo_t> 構造体の I<si_value> フィールド経由でハンドラの第 2 引き数として"
6946 "渡され、 利用することができる。 さらに、この構造体の I<si_pid> と I<si_uid> "
6947 "フィールドでシグナルを送信したプロセスの PID と実ユーザ ID を 得ることができ"
6951 #: build/C/man7/signal.7:418
6953 "Real-time signals are delivered in a guaranteed order. Multiple real-time "
6954 "signals of the same type are delivered in the order they were sent. If "
6955 "different real-time signals are sent to a process, they are delivered "
6956 "starting with the lowest-numbered signal. (I.e., low-numbered signals have "
6957 "highest priority.) By contrast, if multiple standard signals are pending "
6958 "for a process, the order in which they are delivered is unspecified."
6960 "リアルタイムシグナルでは配送される順序が保証される。 同じタイプのリアルタイム"
6961 "シグナルは送信された順番に到着する。 異なるリアルタイムシグナルが一つのプロセ"
6962 "スに送信された場合、 番号の小さいシグナルから先に到着する。 (つまり小さい番号"
6963 "のシグナルが高い優先順位を持つ。) 対照的に、一つのプロセスに対して複数の標準"
6964 "シグナルが処理待ちとなった場合、 これらのシグナルが配送される順序は不定であ"
6968 #: build/C/man7/signal.7:423
6970 "If both standard and real-time signals are pending for a process, POSIX "
6971 "leaves it unspecified which is delivered first. Linux, like many other "
6972 "implementations, gives priority to standard signals in this case."
6974 "一つのプロセスに対して標準シグナルとリアルタイムシグナルの両方が 処理待ちの場"
6975 "合、POSIX はどちらが先に配送されるかを規定していない。 Linux では、他の多くの"
6976 "実装と同様、このような場合には 標準シグナルが優先される。"
6979 #: build/C/man7/signal.7:446
6981 "According to POSIX, an implementation should permit at least "
6982 "B<_POSIX_SIGQUEUE_MAX> (32) real-time signals to be queued to a process. "
6983 "However, Linux does things differently. In kernels up to and including "
6984 "2.6.7, Linux imposes a system-wide limit on the number of queued real-time "
6985 "signals for all processes. This limit can be viewed and (with privilege) "
6986 "changed via the I</proc/sys/kernel/rtsig-max> file. A related file, I</proc/"
6987 "sys/kernel/rtsig-nr>, can be used to find out how many real-time signals are "
6988 "currently queued. In Linux 2.6.8, these I</proc> interfaces were replaced "
6989 "by the B<RLIMIT_SIGPENDING> resource limit, which specifies a per-user limit "
6990 "for queued signals; see B<setrlimit>(2) for further details."
6992 "POSIX によれば、1 プロセス毎に最低 B<_POSIX_SIGQUEUE_MAX> (32) 個のリアルタイ"
6993 "ムシグナルをキューに入れられるべきとしている。 しかし、 Linux では違った実装"
6994 "になっている。カーネル 2.6.7 までは (2.6.7 を含む)、全プロセスでキューに入っ"
6995 "ているリアルタイムシグナル の数の合計についてシステム全体での制限がある。 こ"
6996 "の制限は I</proc/sys/kernel/rtsig-max> ファイルで見ることができ、 (権限があれ"
6997 "ば) 変更もできる。 関係するファイルとして、 I</proc/sys/kernel/rtsig-nr> を見"
6998 "ることで、いくつのリアルタイムシグナルが現在キューに入っているかを 知ることが"
6999 "できる。 Linux 2.6.8 で、これらの I</proc> 経由のインターフェースは、 "
7000 "B<RLIMIT_SIGPENDING> リソース制限に置き換えられた。 これは、キューに入るシグ"
7001 "ナル数に関してユーザ単位に 上限を指定するものである。 詳しくは B<setrlimit>"
7005 #: build/C/man7/signal.7:446
7007 msgid "Async-signal-safe functions"
7008 msgstr "非同期シグナルで安全な関数 (async-signal-safe functions)"
7011 #: build/C/man7/signal.7:455
7013 "A signal handler function must be very careful, since processing elsewhere "
7014 "may be interrupted at some arbitrary point in the execution of the program. "
7015 "POSIX has the concept of \"safe function\". If a signal interrupts the "
7016 "execution of an unsafe function, and I<handler> calls an unsafe function, "
7017 "then the behavior of the program is undefined."
7019 "シグナルハンドラ関数には非常に注意しなければならない。 他の場所の処理はプログ"
7020 "ラム実行の任意の箇所で中断される可能性があるためである。 POSIX には「安全な関"
7021 "数 (safe function)」という概念がある。 シグナルが安全でない関数の実行を中断"
7022 "し、かつ I<handler> が安全でない関数を呼び出した場合、プログラムの挙動は未定"
7026 #: build/C/man7/signal.7:459
7028 "POSIX.1-2004 (also known as POSIX.1-2001 Technical Corrigendum 2) requires "
7029 "an implementation to guarantee that the following functions can be safely "
7030 "called inside a signal handler:"
7032 "POSIX.1-2004 (POSIX.1-2001 Technical Corrigendum (正誤表) 2 とも言う) では、 "
7033 "シグナルハンドラ内での安全な呼び出しを保証することが必須の関数として 以下が規"
7037 #: build/C/man7/signal.7:580
7097 "posix_trace_event()\n"
7147 "timer_getoverrun()\n"
7216 "posix_trace_event()\n"
7266 "timer_getoverrun()\n"
7279 #: build/C/man7/signal.7:585
7281 "POSIX.1-2008 removes fpathconf(), pathconf(), and sysconf() from the above "
7282 "list, and adds the following functions:"
7284 "POSIX.1-2008 では、上記のリストのうち fpathconf(), pathconf(), sysconf() が"
7288 #: build/C/man7/signal.7:608
7334 #: build/C/man7/signal.7:610
7336 msgid "Interruption of System Calls and Library Functions by Signal Handlers"
7337 msgstr "シグナルハンドラによるシステムコールやライブラリ関数への割り込み"
7340 #: build/C/man7/signal.7:613
7342 "If a signal handler is invoked while a system call or library function call "
7343 "is blocked, then either:"
7345 "システムコールやライブラリが停止 (block) している間にシグナルハンドラが 起動"
7349 #: build/C/man7/signal.7:615
7351 "the call is automatically restarted after the signal handler returns; or"
7352 msgstr "シグナルが返った後、呼び出しは自動的に再スタートされる。"
7355 #: build/C/man7/signal.7:618
7356 msgid "the call fails with the error B<EINTR>."
7357 msgstr "呼び出しはエラー B<EINTR> で失敗する。"
7360 #: build/C/man7/signal.7:626
7362 "Which of these two behaviors occurs depends on the interface and whether or "
7363 "not the signal handler was established using the B<SA_RESTART> flag (see "
7364 "B<sigaction>(2)). The details vary across UNIX systems; below, the details "
7367 "これらの二つの挙動のうちどちらが起こるかは、インターフェイスにより依存し、 シ"
7368 "グナルハンドラが B<SA_RESTART> フラグ (B<sigaction>(2) 参照) を使って設定さ"
7369 "れていたかにも依存する。 詳細は UNIX システムによって異なる。 Linux における"
7372 #. The following system calls use ERESTARTSYS,
7373 #. so that they are restartable
7375 #: build/C/man7/signal.7:635
7377 "If a blocked call to one of the following interfaces is interrupted by a "
7378 "signal handler, then the call will be automatically restarted after the "
7379 "signal handler returns if the B<SA_RESTART> flag was used; otherwise the "
7380 "call will fail with the error B<EINTR>:"
7382 "以下のインターフェイスのいずれかの呼び出しが停止している間に シグナルハンドラ"
7383 "により割り込まれた場合、 B<SA_RESTART> フラグが使用されていれば、シグナルハン"
7384 "ドラが返った後に その呼び出しは自動的に再スタートされることになる。 それ以外"
7385 "の場合は、その呼び出しはエラー B<EINTR> で失敗することになる。"
7388 #: build/C/man7/signal.7:651
7390 "B<read>(2), B<readv>(2), B<write>(2), B<writev>(2), and B<ioctl>(2) calls "
7391 "on \"slow\" devices. A \"slow\" device is one where the I/O call may block "
7392 "for an indefinite time, for example, a terminal, pipe, or socket. (A disk "
7393 "is not a slow device according to this definition.) If an I/O call on a "
7394 "slow device has already transferred some data by the time it is interrupted "
7395 "by a signal handler, then the call will return a success status (normally, "
7396 "the number of bytes transferred)."
7398 "B<read>(2), B<readv>(2), B<write>(2), B<writev>(2), B<ioctl>(2) の「遅い "
7399 "(slow)」デバイスに対する呼び出し。 ここでいう「遅い」デバイスとは、I/O 呼び出"
7400 "しが無期限に停止 (block) する 可能性のあるデバイスのことで、例としては端末、"
7401 "パイプ、ソケットがある (この定義では、ディスクは遅いデバイスではない)。 遅い"
7402 "デバイスに対する I/O 呼び出しが、 シグナルハンドラにより割り込まれた時点まで"
7403 "に何らかのデータを すでに転送していれば、呼び出しは成功ステータス (通常は、転"
7404 "送されたバイト数) を返すことだろう。"
7407 #: build/C/man7/signal.7:655
7409 "B<open>(2), if it can block (e.g., when opening a FIFO; see B<fifo>(7))."
7411 "停止 (block) する可能性のある B<open>(2) (例えば、FIFO のオープン時; B<fifo>"
7415 #: build/C/man7/signal.7:662
7416 msgid "B<wait>(2), B<wait3>(2), B<wait4>(2), B<waitid>(2), and B<waitpid>(2)."
7417 msgstr "B<wait>(2), B<wait3>(2), B<wait4>(2), B<waitid>(2), B<waitpid>(2)."
7419 #. If a timeout (setsockopt()) is in effect on the socket, then these
7420 #. system calls switch to using EINTR. Consequently, they and are not
7421 #. automatically restarted, and they show the stop/cont behavior
7422 #. described below. (Verified from 2.6.26 source, and by experiment; mtk)
7424 #: build/C/man7/signal.7:678
7426 "Socket interfaces: B<accept>(2), B<connect>(2), B<recv>(2), B<recvfrom>(2), "
7427 "B<recvmsg>(2), B<send>(2), B<sendto>(2), and B<sendmsg>(2), unless a timeout "
7428 "has been set on the socket (see below)."
7430 "ソケットインターフェイス: B<accept>(2), B<connect>(2), B<recv>(2), "
7431 "B<recvfrom>(2), B<recvmsg>(2), B<send>(2), B<sendto>(2), B<sendmsg>(2). 但"
7432 "し、ソケットにタイムアウトが設定されていない場合 (下記参照)。"
7435 #: build/C/man7/signal.7:684
7436 msgid "File locking interfaces: B<flock>(2) and B<fcntl>(2) B<F_SETLKW>."
7438 "ファイルロック用インターフェイス: B<flock>(2), B<fcntl>(2) B<F_SETLKW>."
7441 #: build/C/man7/signal.7:691
7443 "POSIX message queue interfaces: B<mq_receive>(3), B<mq_timedreceive>(3), "
7444 "B<mq_send>(3), and B<mq_timedsend>(3)."
7446 "POSIX メッセージキューインターフェイス: B<mq_receive>(3), B<mq_timedreceive>"
7447 "(3), B<mq_send>(3), B<mq_timedsend>(3)."
7450 #: build/C/man7/signal.7:696
7452 "B<futex>(2) B<FUTEX_WAIT> (since Linux 2.6.22; beforehand, always failed "
7455 "B<futex>(2) B<FUTEX_WAIT> (Linux 2.6.22 以降; それ以前は常に B<EINTR> で失敗"
7459 #: build/C/man7/signal.7:703
7461 "POSIX semaphore interfaces: B<sem_wait>(3) and B<sem_timedwait>(3) (since "
7462 "Linux 2.6.22; beforehand, always failed with B<EINTR>)."
7464 "POSIX セマフォインターフェイス: B<sem_wait>(3), B<sem_timedwait>(3) (Linux "
7465 "2.6.22 以降; それ以前は常に B<EINTR> で失敗していた)。"
7467 #. These are the system calls that give EINTR or ERESTARTNOHAND
7468 #. on interruption by a signal handler.
7470 #: build/C/man7/signal.7:714
7472 "The following interfaces are never restarted after being interrupted by a "
7473 "signal handler, regardless of the use of B<SA_RESTART>; they always fail "
7474 "with the error B<EINTR> when interrupted by a signal handler:"
7476 "以下のインターフェイスは、 B<SA_RESTART> を使っているどうかに関わらず、シグナ"
7477 "ルハンドラにより割り込まれた後、 再スタートすることは決してない。 これらは、"
7478 "シグナルハンドラにより割り込まれると、常にエラー B<EINTR> で失敗する。"
7481 #: build/C/man7/signal.7:734 build/C/man7/signal.7:808
7483 "Socket interfaces, when a timeout has been set on the socket using "
7484 "B<setsockopt>(2): B<accept>(2), B<recv>(2), B<recvfrom>(2), and B<recvmsg>"
7485 "(2), if a receive timeout (B<SO_RCVTIMEO>) has been set; B<connect>(2), "
7486 "B<send>(2), B<sendto>(2), and B<sendmsg>(2), if a send timeout "
7487 "(B<SO_SNDTIMEO>) has been set."
7489 "B<setsockopt>(2) を使ってタイムアウトが設定されているソケットインターフェー"
7490 "ス: B<accept>(2), B<recv>(2), B<recvfrom>(2), B<recvmsg>(2) で受信タイムアウ"
7491 "ト (B<SO_RCVTIMEO>) が設定されている場合と、 B<connect>(2), B<send>(2), "
7492 "B<sendto>(2), B<sendmsg>(2) で送信タイムアウト (B<SO_SNDTIMEO>) が設定され"
7496 #: build/C/man7/signal.7:741
7498 "Interfaces used to wait for signals: B<pause>(2), B<sigsuspend>(2), "
7499 "B<sigtimedwait>(2), and B<sigwaitinfo>(2)."
7501 "シグナル待ちに使われるインターフェイス: B<pause>(2), B<sigsuspend>(2), "
7502 "B<sigtimedwait>(2), B<sigwaitinfo>(2)."
7505 #: build/C/man7/signal.7:750
7507 "File descriptor multiplexing interfaces: B<epoll_wait>(2), B<epoll_pwait>"
7508 "(2), B<poll>(2), B<ppoll>(2), B<select>(2), and B<pselect>(2)."
7510 "ファイルディスクリプタ多重インターフェイス: B<epoll_wait>(2), B<epoll_pwait>"
7511 "(2), B<poll>(2), B<ppoll>(2), B<select>(2), B<pselect>(2)."
7513 #. On some other systems, SA_RESTART does restart these system calls
7515 #: build/C/man7/signal.7:758
7517 "System V IPC interfaces: B<msgrcv>(2), B<msgsnd>(2), B<semop>(2), and "
7520 "System V IPC インターフェイス: B<msgrcv>(2), B<msgsnd>(2), B<semop>(2), "
7524 #: build/C/man7/signal.7:764
7526 "Sleep interfaces: B<clock_nanosleep>(2), B<nanosleep>(2), and B<usleep>(3)."
7528 "スリープ用のインターフェイス: B<clock_nanosleep>(2), B<nanosleep>(2), "
7532 #: build/C/man7/signal.7:769 build/C/man7/signal.7:822
7533 msgid "B<read>(2) from an B<inotify>(7) file descriptor."
7534 msgstr "B<inotify>(7) ファイルディスクリプタからの B<read>(2)."
7537 #: build/C/man7/signal.7:771
7538 msgid "B<io_getevents>(2)."
7539 msgstr "B<io_getevents>(2)."
7542 #: build/C/man7/signal.7:777
7544 "The B<sleep>(3) function is also never restarted if interrupted by a "
7545 "handler, but gives a success return: the number of seconds remaining to "
7548 "B<sleep>(3) 関数も、ハンドラにより割り込まれた場合、決して再スタートされるこ"
7549 "とはない。 しかし、成功となり、残っている停止時間を返す。"
7552 #: build/C/man7/signal.7:777
7554 msgid "Interruption of System Calls and Library Functions by Stop Signals"
7555 msgstr "一時停止シグナルによるシステムコールやライブラリ関数への割り込み"
7558 #: build/C/man7/signal.7:786
7560 "On Linux, even in the absence of signal handlers, certain blocking "
7561 "interfaces can fail with the error B<EINTR> after the process is stopped by "
7562 "one of the stop signals and then resumed via B<SIGCONT>. This behavior is "
7563 "not sanctioned by POSIX.1, and doesn't occur on other systems."
7565 "Linux では、シグナルハンドラが設定されていない場合でも、 いくつかのブロッキン"
7566 "グ型のインターフェイスは、 プロセスが一時停止 (stop) シグナルの一つにより停止"
7567 "され、 B<SIGCONT> により再開された後に、エラー B<EINTR> で失敗する可能性があ"
7568 "る。 この挙動は POSIX.1 で認められておらず、他のシステムでは起こらない。"
7571 #: build/C/man7/signal.7:788
7572 msgid "The Linux interfaces that display this behavior are:"
7573 msgstr "この挙動を示す Linux のインターフェイスは以下の通りである。"
7576 #: build/C/man7/signal.7:811
7577 msgid "B<epoll_wait>(2), B<epoll_pwait>(2)."
7578 msgstr "B<epoll_wait>(2), B<epoll_pwait>(2)."
7581 #: build/C/man7/signal.7:814
7582 msgid "B<semop>(2), B<semtimedop>(2)."
7583 msgstr "B<semop>(2), B<semtimedop>(2)."
7586 #: build/C/man7/signal.7:817
7587 msgid "B<sigtimedwait>(2), B<sigwaitinfo>(2)."
7588 msgstr "B<sigtimedwait>(2), B<sigwaitinfo>(2)."
7591 #: build/C/man7/signal.7:828
7593 "Linux 2.6.21 and earlier: B<futex>(2) B<FUTEX_WAIT>, B<sem_timedwait>(3), "
7596 "Linux 2.6.21 以前: B<futex>(2) B<FUTEX_WAIT>, B<sem_timedwait>(3), "
7600 #: build/C/man7/signal.7:832
7601 msgid "Linux 2.6.8 and earlier: B<msgrcv>(2), B<msgsnd>(2)."
7602 msgstr "Linux 2.6.8 以前: B<msgrcv>(2), B<msgsnd>(2)."
7605 #: build/C/man7/signal.7:835
7606 msgid "Linux 2.4 and earlier: B<nanosleep>(2)."
7607 msgstr "Linux 2.4 以前: B<nanosleep>(2)."
7609 #. It must be a *very* long time since this was true:
7614 #. have the same value.
7615 #. The latter is commented out in the kernel source, but
7616 #. the build process of some software still thinks that
7620 #: build/C/man7/signal.7:848
7621 msgid "POSIX.1, except as noted."
7622 msgstr "POSIX.1 (注記した内容以外)。"
7625 #: build/C/man7/signal.7:881
7627 "B<kill>(1), B<getrlimit>(2), B<kill>(2), B<killpg>(2), B<rt_sigqueueinfo>"
7628 "(2), B<setitimer>(2), B<setrlimit>(2), B<sgetmask>(2), B<sigaction>(2), "
7629 "B<sigaltstack>(2), B<signal>(2), B<signalfd>(2), B<sigpending>(2), "
7630 "B<sigprocmask>(2), B<sigsuspend>(2), B<sigwaitinfo>(2), B<abort>(3), "
7631 "B<bsd_signal>(3), B<longjmp>(3), B<raise>(3), B<pthread_sigqueue>(3), "
7632 "B<sigqueue>(3), B<sigset>(3), B<sigsetops>(3), B<sigvec>(3), B<sigwait>(3), "
7633 "B<strsignal>(3), B<sysv_signal>(3), B<core>(5), B<proc>(5), B<pthreads>(7), "
7636 "B<kill>(1), B<getrlimit>(2), B<kill>(2), B<killpg>(2), B<rt_sigqueueinfo>"
7637 "(2), B<setitimer>(2), B<setrlimit>(2), B<sgetmask>(2), B<sigaction>(2), "
7638 "B<sigaltstack>(2), B<signal>(2), B<signalfd>(2), B<sigpending>(2), "
7639 "B<sigprocmask>(2), B<sigsuspend>(2), B<sigwaitinfo>(2), B<abort>(3), "
7640 "B<bsd_signal>(3), B<longjmp>(3), B<raise>(3), B<pthread_sigqueue>(3), "
7641 "B<sigqueue>(3), B<sigset>(3), B<sigsetops>(3), B<sigvec>(3), B<sigwait>(3), "
7642 "B<strsignal>(3), B<sysv_signal>(3), B<core>(5), B<proc>(5), B<pthreads>(7), "
7646 #: build/C/man2/signalfd.2:19
7652 #: build/C/man2/signalfd.2:19
7658 #: build/C/man2/signalfd.2:22
7659 msgid "signalfd - create a file descriptor for accepting signals"
7660 msgstr "signalfd - シグナル受け付け用のファイルディスクリプタを生成する"
7663 #: build/C/man2/signalfd.2:24
7664 msgid "B<#include E<lt>sys/signalfd.hE<gt>>"
7665 msgstr "B<#include E<lt>sys/signalfd.hE<gt>>"
7668 #: build/C/man2/signalfd.2:26
7670 "B<int signalfd(int >I<fd>B<, const sigset_t *>I<mask>B<, int >I<flags>B<);>"
7672 "B<int signalfd(int >I<fd>B<, const sigset_t *>I<mask>B<, int >I<flags>B<);>"
7675 #: build/C/man2/signalfd.2:37
7677 "B<signalfd>() creates a file descriptor that can be used to accept signals "
7678 "targeted at the caller. This provides an alternative to the use of a signal "
7679 "handler or B<sigwaitinfo>(2), and has the advantage that the file descriptor "
7680 "may be monitored by B<select>(2), B<poll>(2), and B<epoll>(7)."
7682 "B<signalfd>() は、呼び出し元宛てのシグナルを受け付けるために使用されるファイ"
7683 "ル ディスクリプタを生成する。 この方法はシグナルハンドラや B<sigwaitinfo>"
7684 "(2) を用いる方法の代わりとなるものであり、このファイルディスクリプタを "
7685 "B<select>(2), B<poll>(2), B<epoll>(7) で監視できるという利点がある。"
7688 #: build/C/man2/signalfd.2:57
7690 "The I<mask> argument specifies the set of signals that the caller wishes to "
7691 "accept via the file descriptor. This argument is a signal set whose "
7692 "contents can be initialized using the macros described in B<sigsetops>(3). "
7693 "Normally, the set of signals to be received via the file descriptor should "
7694 "be blocked using B<sigprocmask>(2), to prevent the signals being handled "
7695 "according to their default dispositions. It is not possible to receive "
7696 "B<SIGKILL> or B<SIGSTOP> signals via a signalfd file descriptor; these "
7697 "signals are silently ignored if specified in I<mask>."
7699 "I<mask> 引き数には、呼び出し元がこのファイルディスクリプタ経由で受け付けたい "
7700 "シグナル集合を指定する。この引き数で指定するシグナル集合の内容は、 "
7701 "B<sigsetops>(3) で説明されているマクロを使って初期化することができる。 通"
7702 "常、ファイルディスクリプタ経由で受信するシグナル集合は、 そのシグナルがデフォ"
7703 "ルトの配送方法に基いて処理されるのを防ぐために、 B<sigprocmask>(2) を使って"
7704 "ブロックしておくべきである。 シグナル B<SIGKILL> と B<SIGSTOP> を signalfd "
7705 "ファイルディスクリプタ経由で受信することはできない。 これらのシグナルが "
7706 "I<mask> で指定された場合には黙って無視される。"
7709 #: build/C/man2/signalfd.2:71
7711 "If the I<fd> argument is -1, then the call creates a new file descriptor and "
7712 "associates the signal set specified in I<mask> with that descriptor. If "
7713 "I<fd> is not -1, then it must specify a valid existing signalfd file "
7714 "descriptor, and I<mask> is used to replace the signal set associated with "
7717 "I<fd> 引き数が -1 の場合、 B<signalfd>() は新しいファイルディスクリプタを生"
7718 "成し、 I<mask> で指定されたシグナル集合をそのファイルディスクリプタに関連付け"
7719 "る。 I<fd> 引き数が -1 以外の場合、 I<fd> には有効な既存の signalfd ファイル"
7720 "ディスクリプタを指定しなければならず、 そのディスクリプタに関連付けられている"
7721 "シグナル集合は I<mask> を使って置き換えられる。"
7724 #: build/C/man2/signalfd.2:76
7726 "Starting with Linux 2.6.27, the following values may be bitwise ORed in "
7727 "I<flags> to change the behaviour of B<signalfd>():"
7729 "Linux 2.6.27 以降では、 以下の値のいくつかをビット単位の論理和 (OR) で指定す"
7730 "ることで、 B<signalfd>() の振舞いを変更することができる。"
7733 #: build/C/man2/signalfd.2:76
7735 msgid "B<SFD_NONBLOCK>"
7736 msgstr "B<SFD_NONBLOCK>"
7739 #: build/C/man2/signalfd.2:84
7741 msgid "B<SFD_CLOEXEC>"
7742 msgstr "B<SFD_CLOEXEC>"
7745 #: build/C/man2/signalfd.2:101
7747 "B<signalfd>() returns a file descriptor that supports the following "
7750 "B<signalfd>() が返すファイルディスクリプタは以下の操作をサポートしている。"
7753 #: build/C/man2/signalfd.2:120
7755 "If one or more of the signals specified in I<mask> is pending for the "
7756 "process, then the buffer supplied to B<read>(2) is used to return one or "
7757 "more I<signalfd_siginfo> structures (see below) that describe the signals. "
7758 "The B<read>(2) returns information for as many signals as are pending and "
7759 "will fit in the supplied buffer. The buffer must be at least I<sizeof"
7760 "(struct signalfd_siginfo)> bytes. The return value of the B<read>(2) is "
7761 "the total number of bytes read."
7763 "I<mask> に指定されているシグナルのうち一つ以上がそのプロセスに対して 処理待"
7764 "ち (pending) であれば、それらのシグナルの情報が B<read>(2) に渡されたバッ"
7765 "ファを使って、 I<signalfd_siginfo> 構造体に格納されて返される。 B<read>(2) "
7766 "は、バッファに格納可能な範囲でできるだけ多くの処理待ちのシグナルに ついての情"
7767 "報を返す。 バッファは最低でも I<sizeof(struct signalfd_siginfo)> バイトの大き"
7768 "さがなければならない。 B<read>(2) の返り値は読み出されたトータルのバイト数で"
7772 #: build/C/man2/signalfd.2:128
7774 "As a consequence of the B<read>(2), the signals are consumed, so that they "
7775 "are no longer pending for the process (i.e., will not be caught by signal "
7776 "handlers, and cannot be accepted using B<sigwaitinfo>(2))."
7778 "B<read>(2) が行われた結果、シグナルは消費され、 これらのシグナルはそのプロセ"
7779 "スに対しては処理待ちではなくなる (つまり、シグナルハンドラで捕捉されることも"
7780 "なく、 B<sigwaitinfo>(2) を使って受け取ることもできなくなる)。"
7783 #: build/C/man2/signalfd.2:139
7785 "If none of the signals in I<mask> is pending for the process, then the "
7786 "B<read>(2) either blocks until one of the signals in I<mask> is generated "
7787 "for the process, or fails with the error B<EAGAIN> if the file descriptor "
7788 "has been made nonblocking."
7790 "I<mask> に指定されているシグナルがそのプロセスに対して一つも処理待ちでなけれ"
7791 "ば、 B<read>(2) は、 I<mask> で指定されたシグナルのうちいずれか一つがそのプ"
7792 "ロセスに対して発生するまで 停止 (block) する、もしくはファイルディスクリプタ"
7793 "が非停止 (nonblocking) に設定されている場合はエラー B<EAGAIN> で失敗する。"
7796 #: build/C/man2/signalfd.2:152
7798 "The file descriptor is readable (the B<select>(2) I<readfds> argument; the "
7799 "B<poll>(2) B<POLLIN> flag) if one or more of the signals in I<mask> is "
7800 "pending for the process."
7802 "I<mask> に指定されたシグナルのうち一つ以上がそのプロセスに対して処理待ちであ"
7803 "れば、 ファイルディスクリプタは読み出し可能となる (B<select>(2) の "
7804 "I<readfds> 引き数や B<poll>(2) の B<POLLIN> フラグ)。"
7807 #: build/C/man2/signalfd.2:159
7809 "The signalfd file descriptor also supports the other file-descriptor "
7810 "multiplexing APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
7812 "signalfd ファイルディスクリプタは、これ以外のファイルディスクリプタ 多重 API "
7813 "である B<pselect>(2), B<ppoll>(2), B<epoll>(7) もサポートしている。"
7816 #: build/C/man2/signalfd.2:164
7818 "When the file descriptor is no longer required it should be closed. When "
7819 "all file descriptors associated with the same signalfd object have been "
7820 "closed, the resources for object are freed by the kernel."
7822 "ファイルディスクリプタがそれ以降は必要なくなった際には、クローズすべきであ"
7823 "る。 同じ signalfd オブジェクトに関連付けられたファイルディスクリプタが全て "
7824 "クローズされると、そのオブジェクト用の資源がカーネルにより解放される。"
7827 #: build/C/man2/signalfd.2:164
7829 msgid "The signalfd_siginfo structure"
7830 msgstr "signalfd_siginfo 構造体"
7833 #: build/C/man2/signalfd.2:170
7835 "The format of the I<signalfd_siginfo> structure(s) returned by B<read>(2)s "
7836 "from a signalfd file descriptor is as follows:"
7838 "signalfd ファイルディスクリプタからの B<read>(2) で返される "
7839 "I<signalfd_siginfo> 構造体のフォーマットは以下の通りである。"
7841 #. ssi_trapno is unused on most arches
7843 #: build/C/man2/signalfd.2:195
7846 "struct signalfd_siginfo {\n"
7847 " uint32_t ssi_signo; /* Signal number */\n"
7848 " int32_t ssi_errno; /* Error number (unused) */\n"
7849 " int32_t ssi_code; /* Signal code */\n"
7850 " uint32_t ssi_pid; /* PID of sender */\n"
7851 " uint32_t ssi_uid; /* Real UID of sender */\n"
7852 " int32_t ssi_fd; /* File descriptor (SIGIO) */\n"
7853 " uint32_t ssi_tid; /* Kernel timer ID (POSIX timers)\n"
7854 " uint32_t ssi_band; /* Band event (SIGIO) */\n"
7855 " uint32_t ssi_overrun; /* POSIX timer overrun count */\n"
7856 " uint32_t ssi_trapno; /* Trap number that caused signal */\n"
7857 " int32_t ssi_status; /* Exit status or signal (SIGCHLD) */\n"
7858 " int32_t ssi_int; /* Integer sent by sigqueue(3) */\n"
7859 " uint64_t ssi_ptr; /* Pointer sent by sigqueue(3) */\n"
7860 " uint64_t ssi_utime; /* User CPU time consumed (SIGCHLD) */\n"
7861 " uint64_t ssi_stime; /* System CPU time consumed (SIGCHLD) */\n"
7862 " uint64_t ssi_addr; /* Address that generated signal\n"
7863 " (for hardware-generated signals) */\n"
7864 " uint8_t pad[I<X>]; /* Pad size to 128 bytes (allow for\n"
7865 " additional fields in the future) */\n"
7868 "struct signalfd_siginfo {\n"
7869 "struct signalfd_siginfo {\n"
7870 " uint32_t ssi_signo; /* シグナル番号 */\n"
7871 " int32_t ssi_errno; /* エラー番号 (未使用) */\n"
7872 " int32_t ssi_code; /* シグナルコード */\n"
7873 " uint32_t ssi_pid; /* 送信元の PID */\n"
7874 " uint32_t ssi_uid; /* 送信元の実 UID */\n"
7875 " int32_t ssi_fd; /* ファイルディスクリプタ (SIGIO) */\n"
7876 " uint32_t ssi_tid; /* カーネルタイマ ID (POSIX タイマ)\n"
7877 " uint32_t ssi_band; /* Band イベント (SIGIO) */\n"
7878 " uint32_t ssi_overrun; /* POSIX タイマのオーバーラン回数 */\n"
7879 " uint32_t ssi_trapno; /* シグナルの原因となったトラップ番号 */\n"
7880 " int32_t ssi_status; /* 終了ステータスかシグナル (SIGCHLD) */\n"
7881 " int32_t ssi_int; /* sigqueue(3) から送られた整数 */\n"
7882 " uint64_t ssi_ptr; /* sigqueue(3) から送られたポインタ */\n"
7883 " uint64_t ssi_utime; /* 消費したユーザ CPU 時間 (SIGCHLD) */\n"
7884 " uint64_t ssi_stime; /* 消費したシステム CPU 時間 (SIGCHLD) */\n"
7885 " uint64_t ssi_addr; /* シグナルを生成したアドレス\n"
7886 " (ハードウェアが生成したシグナルの場合) */\n"
7887 " uint8_t pad[I<X>]; /* pad の大きさは 128 バイト\n"
7888 " (将来のフィールド追加用の場所の確保) */\n"
7892 #: build/C/man2/signalfd.2:218
7894 "Each of the fields in this structure is analogous to the similarly named "
7895 "field in the I<siginfo_t> structure. The I<siginfo_t> structure is "
7896 "described in B<sigaction>(2). Not all fields in the returned "
7897 "I<signalfd_siginfo> structure will be valid for a specific signal; the set "
7898 "of valid fields can be determined from the value returned in the I<ssi_code> "
7899 "field. This field is the analog of the I<siginfo_t> I<si_code> field; see "
7900 "B<sigaction>(2) for details."
7902 "I<signalfd_siginfo> 構造体の各フィールドは、 I<siginfo_t> 構造体の同じような"
7903 "名前のフィールドと同様である。 I<siginfo_t> 構造体については B<sigaction>"
7904 "(2) に説明がある。 返された I<signalfd_siginfo> 構造体の全てのフィールドがあ"
7905 "るシグナルに対して有効なわけではない。 どのフィールドが有効かは、 "
7906 "I<ssi_code> フィールドで返される値から判定することができる。 このフィールド"
7907 "は I<siginfo_t> の I<si_code> フィールドと同様である。詳細は B<sigaction>"
7911 #: build/C/man2/signalfd.2:218 build/C/man2/timerfd_create.2:268
7913 msgid "fork(2) semantics"
7914 msgstr "fork(2) での扱い"
7917 #: build/C/man2/signalfd.2:226
7919 "After a B<fork>(2), the child inherits a copy of the signalfd file "
7920 "descriptor. A B<read>(2) from the file descriptor in the child will return "
7921 "information about signals queued to the child."
7923 "B<fork>(2) が行われると、子プロセスは signalfd ファイルディスクリプタのコ"
7924 "ピーを 継承する。 子プロセスでこのファイルディスクリプタから B<read>(2) を行"
7925 "うと、子プロセスに対するキューに入っているシグナルに関する 情報が返される。"
7928 #: build/C/man2/signalfd.2:226 build/C/man2/timerfd_create.2:280
7930 msgid "execve(2) semantics"
7931 msgstr "execve(2) での扱い"
7934 #: build/C/man2/signalfd.2:238
7936 "Just like any other file descriptor, a signalfd file descriptor remains open "
7937 "across an B<execve>(2), unless it has been marked for close-on-exec (see "
7938 "B<fcntl>(2)). Any signals that were available for reading before the "
7939 "B<execve>(2) remain available to the newly loaded program. (This is "
7940 "analogous to traditional signal semantics, where a blocked signal that is "
7941 "pending remains pending across an B<execve>(2).)"
7943 "他のファイルディスクリプタと全く同様に、 signalfd ファイルディスクリプタも "
7944 "B<execve>(2) の前後でオープンされたままとなる。但し、そのファイルディスクリ"
7945 "プタに close-on-exec のマーク (B<fcntl>(2) 参照) が付いている場合はクローズ"
7946 "される。 B<execve>(2) の前に読み出し可能となっていた全てのシグナルは新しく起"
7947 "動されたプログラム でも引き続き読み出し可能である (これは伝統的なシグナルの扱"
7948 "いと同じであり、 処理待ちのブロックされたシグナルは B<execve>(2) の前後で処"
7952 #: build/C/man2/signalfd.2:238
7954 msgid "Thread semantics"
7958 #: build/C/man2/signalfd.2:248
7960 "The semantics of signalfd file descriptors in a multithreaded program mirror "
7961 "the standard semantics for signals. In other words, when a thread reads "
7962 "from a signalfd file descriptor, it will read the signals that are directed "
7963 "to the thread itself and the signals that are directed to the process (i.e., "
7964 "the entire thread group). (A thread will not be able to read signals that "
7965 "are directed to other threads in the process.)"
7967 "マルチスレッドプログラムにおける signalfd ファイルディスクリプタの扱いは シグ"
7968 "ナルの標準的な扱いと全く同じである。 言い換えると、あるスレッドが signalfd "
7969 "ファイルディスクリプタから 読み出しを行うと、そのスレッド自身宛てのシグナルと"
7970 "プロセス (すなわち スレッドグループ全体) 宛てのシグナルが読み出される。 (ス"
7971 "レッドは同じプロセスの他のスレッド宛てのシグナルを読み出すことはできない。)"
7974 #: build/C/man2/signalfd.2:262
7976 "On success, B<signalfd>() returns a signalfd file descriptor; this is "
7977 "either a new file descriptor (if I<fd> was -1), or I<fd> if I<fd> was a "
7978 "valid signalfd file descriptor. On error, -1 is returned and I<errno> is "
7979 "set to indicate the error."
7981 "成功すると、 B<signalfd>() は signalfd ファイルディスクリプタを返す。 返され"
7982 "るファイルディスクリプタは、 I<fd> が -1 の場合は新規のファイルディスクリプタ"
7983 "であり、 I<fd> が有効な signalfd ファイルディスクリプタだった場合は I<fd> 自"
7984 "身である。 エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
7987 #: build/C/man2/signalfd.2:263 build/C/man2/timerfd_create.2:337
7993 #: build/C/man2/signalfd.2:268
7994 msgid "The I<fd> file descriptor is not a valid file descriptor."
7995 msgstr "ファイルディスクリプタ I<fd> が有効なファイルディスクリプタでない。"
7999 #. argument is not equal to
8000 #. .IR sizeof(sigset_t) ;
8002 #: build/C/man2/signalfd.2:276
8003 msgid "I<fd> is not a valid signalfd file descriptor."
8004 msgstr "I<fd> が有効な signalfd ファイルディスクリプタではない。"
8007 #: build/C/man2/signalfd.2:283 build/C/man2/timerfd_create.2:319
8009 "I<flags> is invalid; or, in Linux 2.6.26 or earlier, I<flags> is nonzero."
8011 "I<flags> が無効である。もしくは、Linux 2.6.26 以前の場合には I<flags> が 0 以"
8015 #: build/C/man2/signalfd.2:286 build/C/man2/timerfd_create.2:322
8016 msgid "The per-process limit of open file descriptors has been reached."
8018 "オープン済みのファイルディスクリプタの数がプロセスあたりの上限に 達していた。"
8021 #: build/C/man2/signalfd.2:296
8022 msgid "There was insufficient memory to create a new signalfd file descriptor."
8024 "新しい signalfd ファイルディスクリプタを生成するのに十分なメモリがなかった。"
8026 #. signalfd() is in glibc 2.7, but reportedly does not build
8028 #: build/C/man2/signalfd.2:304
8030 "B<signalfd>() is available on Linux since kernel 2.6.22. Working support "
8031 "is provided in glibc since version 2.8. The B<signalfd4>() system call "
8032 "(see NOTES) is available on Linux since kernel 2.6.27."
8034 "B<signalfd>() はカーネル 2.6.22 以降の Linux で利用可能である。 正しく動作す"
8035 "る glibc 側のサポートはバージョン 2.8 以降で提供されている。 B<signalfd4>() "
8036 "システムコール (「注意」参照) は カーネル 2.6.27 以降の Linux で利用可能であ"
8040 #: build/C/man2/signalfd.2:309
8041 msgid "B<signalfd>() and B<signalfd4>() are Linux-specific."
8042 msgstr "B<signalfd>() と B<signalfd4>() は Linux 固有である。"
8045 #: build/C/man2/signalfd.2:319
8047 "The underlying Linux system call requires an additional argument, I<size_t "
8048 "sizemask>, which specifies the size of the I<mask> argument. The glibc "
8049 "B<signalfd>() wrapper function does not include this argument, since it "
8050 "provides the required value for the underlying system call."
8052 "実際の Linux のシステムコールでは I<size_t sizemask> という引き数が追加で必要"
8053 "である。この引き数で I<mask> のサイズを指定する。 glibc の B<signalfd>() "
8054 "ラッパー関数にはこの引き数は含まれず、 ラッパー関数が必要な値を計算して内部で"
8058 #: build/C/man2/signalfd.2:333
8060 "A process can create multiple signalfd file descriptors. This makes it "
8061 "possible to accept different signals on different file descriptors. (This "
8062 "may be useful if monitoring the file descriptors using B<select>(2), B<poll>"
8063 "(2), or B<epoll>(7): the arrival of different signals will make different "
8064 "descriptors ready.) If a signal appears in the I<mask> of more than one of "
8065 "the file descriptors, then occurrences of that signal can be read (once) "
8066 "from any one of the descriptors."
8068 "一つのプロセスは複数の signalfd ファイルディスクリプタを生成することができ"
8069 "る。 これにより、異なるファイルディスクリプタで異なるシグナルを受け取ること"
8070 "が できる (この機能は B<select>(2), B<poll>(2), B<epoll>(7) を使ってファイル"
8071 "ディスクリプタを監視する場合に有用かもしれない。 異なるシグナルが到着すると、"
8072 "異なるファイルディスクリプタが利用可能に なるからだ)。 一つのシグナルが二つ以"
8073 "上のファイルディスクリプタの I<mask> に含まれている場合、そのシグナルの発生は"
8074 "そのシグナルを I<mask> に含むファイルディスクリプタのうちいずれか一つから読み"
8078 #: build/C/man2/signalfd.2:349
8080 "There are two underlying Linux system calls: B<signalfd>() and the more "
8081 "recent B<signalfd4>(). The former system call does not implement a I<flags> "
8082 "argument. The latter system call implements the I<flags> values described "
8083 "above. Starting with glibc 2.9, the B<signalfd>() wrapper function will "
8084 "use B<signalfd4>() where it is available."
8086 "下層にある Linux システムコールは二種類あり、 B<signalfd>() と、もっと新し"
8087 "い B<signalfd4>() である。 B<signalfd>() は I<flags> 引き数を実装していな"
8088 "い。 B<signalfd4>() では上記の値の I<flags> が実装されている。 glibc 2.9 以"
8089 "降では、 B<signalfd>() のラッパー関数は、 B<signalfd4>() が利用可能であれ"
8092 #. The fix also was put into 2.6.24.5
8094 #: build/C/man2/signalfd.2:357
8096 "In kernels before 2.6.25, the I<ssi_ptr> and I<ssi_int> fields are not "
8097 "filled in with the data accompanying a signal sent by B<sigqueue>(3)."
8099 "カーネル 2.6.25 より前では、 B<sigqueue>(3) により送信されたシグナルと一緒に"
8100 "渡されるデータでは、フィールド I<ssi_ptr> と I<ssi_int> は設定されない。"
8103 #: build/C/man2/signalfd.2:367
8105 "The program below accepts the signals B<SIGINT> and B<SIGQUIT> via a "
8106 "signalfd file descriptor. The program terminates after accepting a "
8107 "B<SIGQUIT> signal. The following shell session demonstrates the use of the "
8110 "下記のプログラムは、シグナル B<SIGINT> と B<SIGQUIT> を signalfd ファイルディ"
8111 "スクリプタ経由で受信する。 シグナル B<SIGQUIT> 受信後にプログラムは終了す"
8112 "る。 以下に示すシェルセッションにこのプログラムの使い方を示す。"
8115 #: build/C/man2/signalfd.2:378
8118 "$B< ./signalfd_demo>\n"
8119 "B<^C> # Control-C generates SIGINT\n"
8123 "B<^\\e> # Control-\\e generates SIGQUIT\n"
8127 "$B< ./signalfd_demo>\n"
8128 "B<^C> # Control-C generates SIGINT\n"
8132 "B<^\\e> # Control-\\e generates SIGQUIT\n"
8137 #: build/C/man2/signalfd.2:388
8140 "#include E<lt>sys/signalfd.hE<gt>\n"
8141 "#include E<lt>signal.hE<gt>\n"
8142 "#include E<lt>unistd.hE<gt>\n"
8143 "#include E<lt>stdlib.hE<gt>\n"
8144 "#include E<lt>stdio.hE<gt>\n"
8146 "#include E<lt>sys/signalfd.hE<gt>\n"
8147 "#include E<lt>signal.hE<gt>\n"
8148 "#include E<lt>unistd.hE<gt>\n"
8149 "#include E<lt>stdlib.hE<gt>\n"
8150 "#include E<lt>stdio.hE<gt>\n"
8153 #: build/C/man2/signalfd.2:399
8157 "main(int argc, char *argv[])\n"
8161 " struct signalfd_siginfo fdsi;\n"
8165 "main(int argc, char *argv[])\n"
8169 " struct signalfd_siginfo fdsi;\n"
8173 #: build/C/man2/signalfd.2:403
8176 " sigemptyset(&mask);\n"
8177 " sigaddset(&mask, SIGINT);\n"
8178 " sigaddset(&mask, SIGQUIT);\n"
8180 " sigemptyset(&mask);\n"
8181 " sigaddset(&mask, SIGINT);\n"
8182 " sigaddset(&mask, SIGQUIT);\n"
8185 #: build/C/man2/signalfd.2:406
8188 " /* Block signals so that they aren\\(aqt handled\n"
8189 " according to their default dispositions */\n"
8191 " /* Block signals so that they aren\\(aqt handled\n"
8192 " according to their default dispositions */\n"
8195 #: build/C/man2/signalfd.2:409
8198 " if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)\n"
8199 " handle_error(\"sigprocmask\");\n"
8201 " if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)\n"
8202 " handle_error(\"sigprocmask\");\n"
8205 #: build/C/man2/signalfd.2:413
8208 " sfd = signalfd(-1, &mask, 0);\n"
8210 " handle_error(\"signalfd\");\n"
8212 " sfd = signalfd(-1, &mask, 0);\n"
8214 " handle_error(\"signalfd\");\n"
8217 #: build/C/man2/signalfd.2:418
8221 " s = read(sfd, &fdsi, sizeof(struct signalfd_siginfo));\n"
8222 " if (s != sizeof(struct signalfd_siginfo))\n"
8223 " handle_error(\"read\");\n"
8226 " s = read(sfd, &fdsi, sizeof(struct signalfd_siginfo));\n"
8227 " if (s != sizeof(struct signalfd_siginfo))\n"
8228 " handle_error(\"read\");\n"
8231 #: build/C/man2/signalfd.2:429
8234 " if (fdsi.ssi_signo == SIGINT) {\n"
8235 " printf(\"Got SIGINT\\en\");\n"
8236 " } else if (fdsi.ssi_signo == SIGQUIT) {\n"
8237 " printf(\"Got SIGQUIT\\en\");\n"
8238 " exit(EXIT_SUCCESS);\n"
8240 " printf(\"Read unexpected signal\\en\");\n"
8245 " if (fdsi.ssi_signo == SIGINT) {\n"
8246 " printf(\"Got SIGINT\\en\");\n"
8247 " } else if (fdsi.ssi_signo == SIGQUIT) {\n"
8248 " printf(\"Got SIGQUIT\\en\");\n"
8249 " exit(EXIT_SUCCESS);\n"
8251 " printf(\"Read unexpected signal\\en\");\n"
8257 #: build/C/man2/signalfd.2:443
8259 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<sigaction>(2), "
8260 "B<sigprocmask>(2), B<sigwaitinfo>(2), B<timerfd_create>(2), B<sigsetops>(3), "
8261 "B<sigwait>(3), B<epoll>(7), B<signal>(7)"
8263 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<sigaction>(2), "
8264 "B<sigprocmask>(2), B<sigwaitinfo>(2), B<timerfd_create>(2), B<sigsetops>(3), "
8265 "B<sigwait>(3), B<epoll>(7), B<signal>(7)"
8268 #: build/C/man3/sigpause.3:23
8274 #: build/C/man3/sigpause.3:23
8280 #: build/C/man3/sigpause.3:26
8281 msgid "sigpause - atomically release blocked signals and wait for interrupt"
8282 msgstr "sigpause - ブロックされたシグナルをアトミックに解放して割り込みを待つ"
8285 #: build/C/man3/sigpause.3:31
8287 msgid "B<int sigpause(int >I<sigmask>B<); /* BSD */>\n"
8288 msgstr "B<int sigpause(int >I<sigmask>B<); /* BSD */>\n"
8291 #: build/C/man3/sigpause.3:33
8293 msgid "B<int sigpause(int >I<sig>B<); /* System V / UNIX 95 */>\n"
8294 msgstr "B<int sigpause(int >I<sig>B<); /* System V / UNIX 95 */>\n"
8297 #: build/C/man3/sigpause.3:39
8298 msgid "Don't use this function. Use B<sigsuspend>(2) instead."
8299 msgstr "この関数を使わないこと。 代わりに B<sigsuspend>(2) を使うこと。"
8302 #: build/C/man3/sigpause.3:46
8304 "The function B<sigpause>() is designed to wait for some signal. It changes "
8305 "the process's signal mask (set of blocked signals), and then waits for a "
8306 "signal to arrive. Upon arrival of a signal, the original signal mask is "
8309 "関数 B<sigpause>() はシグナルを待つように設計されている。 この関数はプロセス"
8310 "のシグナルマスク (ブロックされたシグナルのセット) を変更し、 シグナルが到着す"
8311 "るのを待つ。 シグナルが到着すると、シグナルマスクは元に戻される。"
8314 #: build/C/man3/sigpause.3:54
8316 "If B<sigpause>() returns, it was interrupted by a signal and the return "
8317 "value is -1 with I<errno> set to B<EINTR>."
8319 "B<sigpause>() が返った場合、この関数はシグナルによって割り込まれている。 返"
8320 "り値は -1 で、 I<errno> は B<EINTR> に設定される。"
8323 #: build/C/man3/sigpause.3:58
8324 msgid "The System V version of B<sigpause>() is standardized in POSIX.1-2001."
8325 msgstr "System V 版の B<sigpause>() は POSIX.1-2001 で標準化されている。"
8327 #. __xpg_sigpause: UNIX 95, spec 1170, SVID, SVr4, XPG
8329 #: build/C/man3/sigpause.3:75
8331 "The classical BSD version of this function appeared in 4.2BSD. It sets the "
8332 "process's signal mask to I<sigmask>. UNIX 95 standardized the incompatible "
8333 "System V version of this function, which removes only the specified signal "
8334 "I<sig> from the process's signal mask. The unfortunate situation with two "
8335 "incompatible functions with the same name was solved by the B<\\%sigsuspend>"
8336 "(2) function, that takes a I<sigset_t *> argument (instead of an I<int>)."
8338 "この関数の古典的な BSD 版は 4.2BSD で登場した。 この関数はプロセスのシグナル"
8339 "マスクを I<sigmask> に設定する。 UNIX 95 では BSD 版と互換性のない System V "
8340 "版のこの関数が標準化された。 UNIX 95 版は、指定されたシグナル I<sig> をプロセ"
8341 "スのシグナルマスクから削除するだけである。 同じ名前で互換性のない 2 つの関数"
8342 "があるという不幸な事態は、 B<\\%sigsuspend>(2) 関数によって解消された。 この"
8343 "関数は (I<int> の代わりに) B<sigset_t *> 引き数をとる。"
8346 #: build/C/man3/sigpause.3:78
8348 "On Linux, this routine is a system call only on the Sparc (sparc64) "
8351 "Linux では、このルーチンは Sparc (sparc64) アーキテクチャでのみ システムコー"
8355 #: build/C/man3/sigpause.3:80
8356 msgid "Libc4 and libc5 only know about the BSD version."
8357 msgstr "libc4 と libc5 には BSD 版しかない。"
8359 #. For the BSD version, one usually uses a zero
8361 #. to indicate that no signals are to be blocked.
8363 #: build/C/man3/sigpause.3:96
8365 "Glibc uses the BSD version if the B<_BSD_SOURCE> feature test macro is "
8366 "defined and none of B<_POSIX_SOURCE>, B<_POSIX_C_SOURCE>, B<_XOPEN_SOURCE>, "
8367 "B<_GNU_SOURCE>, or B<_SVID_SOURCE> is defined. Otherwise, the System V "
8370 "機能検査マクロ B<_BSD_SOURCE> が定義され、 B<_POSIX_SOURCE>, "
8371 "B<_POSIX_C_SOURCE>, B<_XOPEN_SOURCE>, B<_GNU_SOURCE>, B<_SVID_SOURCE> のいず"
8372 "れも定義されていない場合、 glibc は BSD 版を使う。 それ以外の場合には、"
8376 #: build/C/man3/sigpause.3:104
8378 "B<kill>(2), B<sigaction>(2), B<sigprocmask>(2), B<sigsuspend>(2), B<sigblock>"
8379 "(3), B<sigvec>(3), B<feature_test_macros>(7)"
8381 "B<kill>(2), B<sigaction>(2), B<sigprocmask>(2), B<sigsuspend>(2), B<sigblock>"
8382 "(3), B<sigvec>(3), B<feature_test_macros>(7)"
8385 #: build/C/man2/sigpending.2:27
8391 #: build/C/man2/sigpending.2:27
8397 #: build/C/man2/sigpending.2:30
8398 msgid "sigpending - examine pending signals"
8399 msgstr "sigpending - 処理待ちのシグナルの検査"
8402 #: build/C/man2/sigpending.2:34
8403 msgid "B<int sigpending(sigset_t *>I<set>B<);>"
8404 msgstr "B<int sigpending(sigset_t *>I<set>B<);>"
8407 #: build/C/man2/sigpending.2:43
8409 "B<sigpending>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
8412 "B<sigpending>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
8416 #: build/C/man2/sigpending.2:51
8418 "B<sigpending>() returns the set of signals that are pending for delivery to "
8419 "the calling thread (i.e., the signals which have been raised while "
8420 "blocked). The mask of pending signals is returned in I<set>."
8422 "B<sigpending>() は、呼び出し元のスレッドへの配送を待っている (pending) シグ"
8423 "ナル集合 (すなわち、禁止中に発生したシグナル) を返す。 処理待ちのシグナルのマ"
8424 "スクが I<set> に格納される。"
8427 #: build/C/man2/sigpending.2:54
8428 msgid "B<sigpending>() returns 0 on success and -1 on error."
8429 msgstr "B<sigpending>() は成功すれば 0 を返し、エラーならば -1 を返す。"
8432 #: build/C/man2/sigpending.2:59
8434 "I<set> points to memory which is not a valid part of the process address "
8437 "I<set> が指しているメモリが、プロセスのアドレス空間の有効な部分ではない。"
8440 #: build/C/man2/sigpending.2:70
8442 "The set of signals that is pending for a thread is the union of the set of "
8443 "signals that is pending for that thread and the set of signals that is "
8444 "pending for the process as a whole; see B<signal>(7)."
8446 "あるスレッドに対する処理待ちのシグナルの集合は、 そのスレッド自体への処理待ち"
8447 "のシグナル集合と、プロセス全体への処理待ちの シグナル集合をあわせたものであ"
8448 "る。 B<signal>(7) 参照。"
8451 #: build/C/man2/sigpending.2:82
8453 "In versions of glibc up to and including 2.2.1, there is a bug in the "
8454 "wrapper function for B<sigpending>() which means that information about "
8455 "pending real-time signals is not correctly returned."
8457 "バージョン 2.2.1 以前の glibc では、 B<sigpending>() のラッパー関数に、処理"
8458 "待ちのリアルタイムシグナルに関する情報が 正しく返されないというバグがある。"
8461 #: build/C/man2/sigpending.2:90
8463 "B<kill>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), B<sigsuspend>"
8464 "(2), B<sigsetops>(3), B<signal>(7)"
8466 "B<kill>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), B<sigsuspend>"
8467 "(2), B<sigsetops>(3), B<signal>(7)"
8470 #: build/C/man2/sigprocmask.2:27
8473 msgstr "SIGPROCMASK"
8476 #: build/C/man2/sigprocmask.2:27
8482 #: build/C/man2/sigprocmask.2:30
8483 msgid "sigprocmask - examine and change blocked signals"
8484 msgstr "sigprocmask - 禁止するシグナルの確認と変更"
8487 #: build/C/man2/sigprocmask.2:35
8489 "B<int sigprocmask(int >I<how>B<, const sigset_t *>I<set>B<,> B<sigset_t "
8492 "B<int sigprocmask(int >I<how>B<, const sigset_t *>I<set>B<,> B<sigset_t "
8496 #: build/C/man2/sigprocmask.2:44
8498 "B<sigprocmask>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
8501 "B<sigprocmask>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
8505 #: build/C/man2/sigprocmask.2:53
8507 "B<sigprocmask>() is used to fetch and/or change the signal mask of the "
8508 "calling thread. The signal mask is the set of signals whose delivery is "
8509 "currently blocked for the caller (see also B<signal>(7) for more details)."
8511 "B<sigprocmask>() を使うと、呼び出したスレッドのシグナルマスクの取得/変更がで"
8512 "きる。 シグナルマスクは、呼び出し元に対して現在配送が禁止されているシグナル"
8513 "の 集合のことである (詳細については B<signal>(7) も参照のこと)。"
8516 #: build/C/man2/sigprocmask.2:57
8518 "The behavior of the call is dependent on the value of I<how>, as follows."
8519 msgstr "このコールの動作は I<how> の値によって決まる:"
8522 #: build/C/man2/sigprocmask.2:57
8524 msgid "B<SIG_BLOCK>"
8525 msgstr "B<SIG_BLOCK>"
8528 #: build/C/man2/sigprocmask.2:62
8530 "The set of blocked signals is the union of the current set and the I<set> "
8533 "禁止されたシグナルの集合は現在の値と I<set> 引き数を結合したものとなる。"
8536 #: build/C/man2/sigprocmask.2:62
8538 msgid "B<SIG_UNBLOCK>"
8539 msgstr "B<SIG_UNBLOCK>"
8542 #: build/C/man2/sigprocmask.2:68
8544 "The signals in I<set> are removed from the current set of blocked signals. "
8545 "It is permissible to attempt to unblock a signal which is not blocked."
8547 "現在禁止されているシグナルの集合から I<set> にあるシグナルを取り除く。禁止さ"
8548 "れていないシグナルを取り除こうと することも認められている。"
8551 #: build/C/man2/sigprocmask.2:68
8553 msgid "B<SIG_SETMASK>"
8554 msgstr "B<SIG_SETMASK>"
8557 #: build/C/man2/sigprocmask.2:72
8558 msgid "The set of blocked signals is set to the argument I<set>."
8559 msgstr "禁止されているシグナルの集合に I<set> 引き数を設定する。"
8562 #: build/C/man2/sigprocmask.2:77
8564 "If I<oldset> is non-NULL, the previous value of the signal mask is stored in "
8567 "I<oldset> が NULL でなければ、シグナルマスクの今までの値を I<oldset> に格納す"
8571 #: build/C/man2/sigprocmask.2:86
8573 "If I<set> is NULL, then the signal mask is unchanged (i.e., I<how> is "
8574 "ignored), but the current value of the signal mask is nevertheless returned "
8575 "in I<oldset> (if it is not NULL)."
8577 "I<set> が NULL であれば、シグナルマスクは変更されない (すなわち、 I<how> は無"
8578 "視される)。 I<set> の値にかかわらず、現在のシグナルマスクの値は I<oldset> に"
8579 "入れて返される (但し、 I<oldset> が NULL でない場合)。"
8582 #: build/C/man2/sigprocmask.2:91
8584 "The use of B<sigprocmask>() is unspecified in a multithreaded process; see "
8585 "B<pthread_sigmask>(3)."
8587 "マルチスレッドのプロセスで B<sigprocmask>() を使用した場合の動作は規定されて"
8588 "いない。 B<pthread_sigmask>(3) を参照のこと。"
8591 #: build/C/man2/sigprocmask.2:94
8592 msgid "B<sigprocmask>() returns 0 on success and -1 on error."
8593 msgstr "B<sigprocmask>() は成功すれば 0 を返し、エラーならば -1 を返す。"
8596 #: build/C/man2/sigprocmask.2:102
8598 "the I<set> or I<oldset> argument points outside the process's allocated "
8601 "引き数 I<set> か I<oldset> がプロセスに割り当てられた\n"
8605 #: build/C/man2/sigprocmask.2:107
8606 msgid "The value specified in I<how> was invalid."
8607 msgstr "I<how> に指定された値が有効ではない。"
8610 #: build/C/man2/sigprocmask.2:113
8612 "It is not possible to block B<SIGKILL> or B<SIGSTOP>. Attempts to do so are "
8615 "B<SIGKILL> や B<SIGSTOP> を禁止することはできない。 禁止しようとしても黙って"
8619 #: build/C/man2/sigprocmask.2:115
8620 msgid "Each of the threads in a process has its own signal mask."
8621 msgstr "プロセス内の各スレッドはそれぞれ専用のシグナルマスクを持つ。"
8624 #: build/C/man2/sigprocmask.2:135
8626 "If B<SIGBUS>, B<SIGFPE>, B<SIGILL>, or B<SIGSEGV> are generated while they "
8627 "are blocked, the result is undefined, unless the signal was generated by "
8628 "B<kill>(2), B<sigqueue>(3), or B<raise>(3)."
8630 "シグナル B<SIGBUS>, B<SIGFPE>, B<SIGILL>, B<SIGSEGV> が禁止されている間に生成"
8631 "された場合で、 そのシグナルが B<kill>(2), B<sigqueue>(3), B<raise>(3) によっ"
8632 "て生成されたものでないときには、 その後の動作は未定義である。"
8635 #: build/C/man2/sigprocmask.2:150
8637 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigpending>(2), "
8638 "B<sigsuspend>(2), B<pthread_sigmask>(3), B<sigqueue>(3), B<sigsetops>(3), "
8641 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigpending>(2), "
8642 "B<sigsuspend>(2), B<pthread_sigmask>(3), B<sigqueue>(3), B<sigsetops>(3), "
8646 #: build/C/man3/sigqueue.3:26
8652 #: build/C/man3/sigqueue.3:26
8658 #: build/C/man3/sigqueue.3:29
8659 msgid "sigqueue - queue a signal and data to a process"
8660 msgstr "sigqueue - シグナルとデータをプロセスに送る"
8663 #: build/C/man3/sigqueue.3:33
8665 "B<int sigqueue(pid_t >I<pid>B<, int >I<sig>B<, const union sigval "
8668 "B<int sigqueue(pid_t >I<pid>B<, int >I<sig>B<, const union sigval "
8672 #: build/C/man3/sigqueue.3:41
8673 msgid "B<sigqueue>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8674 msgstr "B<sigqueue>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8677 #: build/C/man3/sigqueue.3:53
8679 "B<sigqueue>() sends the signal specified in I<sig> to the process whose PID "
8680 "is given in I<pid>. The permissions required to send a signal are the same "
8681 "as for B<kill>(2). As with B<kill>(2), the null signal (0) can be used to "
8682 "check if a process with a given PID exists."
8684 "B<sigqueue>() は I<sig> で指定されたシグナルを、PID が I<pid> であるプロセス"
8685 "に送る。 シグナルを送るのに必要な権限は B<kill>(2) と同じである。 B<kill>"
8686 "(2) と同様に、ヌル・シグナル (0) を使って 指定した PID のプロセスが存在する"
8690 #: build/C/man3/sigqueue.3:58
8692 "The I<value> argument is used to specify an accompanying item of data "
8693 "(either an integer or a pointer value) to be sent with the signal, and has "
8694 "the following type:"
8696 "I<value> 引き数はシグナルと一緒に送るデータの付属アイテムを指定する。 "
8697 "I<value> は (整数またはポインタの値であり) 以下のような型である。"
8700 #: build/C/man3/sigqueue.3:65
8705 " void *sival_ptr;\n"
8710 " void *sival_ptr;\n"
8714 #: build/C/man3/sigqueue.3:81
8716 "If the receiving process has installed a handler for this signal using the "
8717 "B<SA_SIGINFO> flag to B<sigaction>(2), then it can obtain this data via the "
8718 "I<si_value> field of the I<siginfo_t> structure passed as the second "
8719 "argument to the handler. Furthermore, the I<si_code> field of that "
8720 "structure will be set to B<SI_QUEUE>."
8722 "受取先のプロセスに、このシグナルに対するハンドラを (B<sigaction>(2) に "
8723 "B<SA_SIGINFO> を指定して) インストールしておくと、 そのハンドラの第 2 引き数"
8724 "に渡される I<siginfo_t> 構造体の I<si_value> フィールドによって、このデータを"
8725 "取得できる。 さらに、この構造体の I<si_code> フィールドは B<SI_QUEUE> に設定"
8729 #: build/C/man3/sigqueue.3:89
8731 "On success, B<sigqueue>() returns 0, indicating that the signal was "
8732 "successfully queued to the receiving process. Otherwise -1 is returned and "
8733 "I<errno> is set to indicate the error."
8735 "成功した場合、 B<sigqueue>() は 0 を返す。 これは受け取り側プロセスの待ち行"
8736 "列に シグナルが正しく入れられたことを示す。 失敗した場合は -1 が返され、 "
8737 "I<errno> がエラーを表す値に設定される。"
8740 #: build/C/man3/sigqueue.3:100
8741 msgid "I<sig> was invalid."
8742 msgstr "I<sig> が不正である。"
8745 #: build/C/man3/sigqueue.3:106
8747 "The process does not have permission to send the signal to the receiving "
8748 "process. For the required permissions, see B<kill>(2)."
8750 "このプロセスには、受け取り側プロセスにシグナルを送る権限がない。 必要な権限に"
8751 "ついては、 B<kill>(2) を参照すること。"
8754 #: build/C/man3/sigqueue.3:110
8755 msgid "No process has a PID matching I<pid>."
8756 msgstr "I<pid> にマッチする PID のプロセスがない。"
8759 #: build/C/man3/sigqueue.3:112
8760 msgid "This system call first appeared in Linux 2.2."
8761 msgstr "このシステムコールは Linux 2.2 で初めて登場した。"
8764 #: build/C/man3/sigqueue.3:122
8766 "If this function results in the sending of a signal to the process that "
8767 "invoked it, and that signal was not blocked by the calling thread, and no "
8768 "other threads were willing to handle this signal (either by having it "
8769 "unblocked, or by waiting for it using B<sigwait>(3)), then at least some "
8770 "signal must be delivered to this thread before this function returns."
8772 "この関数を呼び出したプロセスにこの関数がシグナルを送ったときに、 シグナルが呼"
8773 "び出し側スレッドにブロックされず、 かつ (シグナルがブロックされなかった、また"
8774 "は B<sigwait>(3) を使用するのを待っていることにより) このシグナルを扱うス"
8775 "レッドが何もない場合は、 この関数がリターンする前に、少なくとも そのスレッド"
8776 "に対してシグナルが配送されていなければならない。"
8779 #: build/C/man3/sigqueue.3:137
8781 "On Linux, this function is implemented using the B<rt_sigqueueinfo>(2) "
8782 "system call. The system call differs in its third argument, which is the "
8783 "I<siginfo_t> structure that will be supplied to the receiving process's "
8784 "signal handler or returned by the receiving process's B<sigtimedwait>(2) "
8785 "call. Inside the glibc B<sigqueue>() wrapper, this argument, I<uinfo>, is "
8786 "initialized as follows:"
8788 "Linux では、この関数は B<rt_sigqueueinfo>(2) システムコールを使って実装され"
8789 "ている。 両者には 3 番目の引き数に違いがあり、 B<rt_sigqueueinfo>(2) では 3 "
8790 "番目の引き数は I<siginfo_t> 構造体である。 I<siginfo_t> 構造体は、シグナルを"
8791 "受信するプロセスのシグナルハンドラに渡されたり、 シグナル受信プロセスの "
8792 "B<sigtimedwait>(2) システムコールから返されたりする。 glibc の B<sigqueue>"
8793 "() ラッパー関数内部では、 この引き数 I<uinfo> は以下のように初期化される。"
8796 #: build/C/man3/sigqueue.3:145
8799 "uinfo.si_signo = sig; /* argument supplied to sigqueue() */\n"
8800 "uinfo.si_code = SI_QUEUE;\n"
8801 "uinfo.si_pid = getpid(); /* Process ID of sender */\n"
8802 "uinfo.si_uid = getuid(); /* Real UID of sender */\n"
8803 "uinfo.si_value = val; /* argument supplied to sigqueue() */\n"
8805 "uinfo.si_signo = sig; /* argument supplied to sigqueue() */\n"
8806 "uinfo.si_code = SI_QUEUE;\n"
8807 "uinfo.si_pid = getpid(); /* Process ID of sender */\n"
8808 "uinfo.si_uid = getuid(); /* Real UID of sender */\n"
8809 "uinfo.si_value = val; /* argument supplied to sigqueue() */\n"
8812 #: build/C/man3/sigqueue.3:155
8814 "B<kill>(2), B<rt_sigqueueinfo>(2), B<sigaction>(2), B<signal>(2), "
8815 "B<pthread_sigqueue>(3), B<sigwait>(3), B<signal>(7)"
8817 "B<kill>(2), B<rt_sigqueueinfo>(2), B<sigaction>(2), B<signal>(2), "
8818 "B<pthread_sigqueue>(3), B<sigwait>(3), B<signal>(7)"
8821 #: build/C/man2/sigreturn.2:27
8827 #: build/C/man2/sigreturn.2:27
8833 #: build/C/man2/sigreturn.2:30
8834 msgid "sigreturn - return from signal handler and cleanup stack frame"
8835 msgstr "sigreturn - シグナル・ハンドラから返り、スタックを掃除する"
8838 #: build/C/man2/sigreturn.2:32
8839 msgid "B<int sigreturn(unsigned long >I<__unused>B<);>"
8840 msgstr "B<int sigreturn(unsigned long >I<__unused>B<);>"
8843 #: build/C/man2/sigreturn.2:40
8845 "When the Linux kernel creates the stack frame for a signal handler, a call "
8846 "to B<sigreturn>() is inserted into the stack frame so that upon return from "
8847 "the signal handler, B<sigreturn>() will be called."
8849 "Linux カーネルは、 シグナル・ハンドラ用にスタック・フレームを作成する際、 "
8850 "B<sigreturn>() をスタック・フレームに挿入し、シグナル・ハンドラが返るときに "
8851 "B<sigreturn>() が呼ばれるようにする。"
8854 #: build/C/man2/sigreturn.2:51
8856 "This B<sigreturn>() call undoes everything that was done\\(emchanging the "
8857 "process's signal mask, switching stacks (see B<sigaltstack>(2))\\(emin order "
8858 "to invoke the signal handler: it restores the process's signal mask, "
8859 "switches stacks, and restores the process's context (registers, processor "
8860 "flags), so that the process directly resumes execution at the point where it "
8861 "was interrupted by the signal."
8863 "B<sigreturn>() は、シグナル・ハンドラを起動するために行ったことの全て \\(em "
8864 "プロセスのシグナルマスクの変更、スタックの切り替え (B<sigaltstack>(2) 参照) "
8865 "\\(em の取り消しを行う。 プロセスのシグナルマスクの復元、スタックの切り替"
8866 "え、 プロセスのコンテキスト (レジスタ、プロセッサ・フラグ) の復元を行い、 プ"
8867 "ロセスがシグナルにより割り込まれた場所からそのまま実行を 再開できるようにす"
8871 #: build/C/man2/sigreturn.2:54
8872 msgid "B<sigreturn>() never returns."
8873 msgstr "B<sigreturn>() が返ることはない。"
8876 #: build/C/man2/sigreturn.2:54
8882 #: build/C/man2/sigreturn.2:56
8883 msgid "/usr/src/linux/arch/i386/kernel/signal.c"
8884 msgstr "/usr/src/linux/arch/i386/kernel/signal.c"
8887 #: build/C/man2/sigreturn.2:58
8888 msgid "/usr/src/linux/arch/alpha/kernel/entry.S"
8889 msgstr "/usr/src/linux/arch/alpha/kernel/entry.S"
8892 #: build/C/man2/sigreturn.2:62
8894 "B<sigreturn>() is specific to Linux and should not be used in programs "
8895 "intended to be portable."
8897 "B<sigreturn>() は Linux 特有であり、移植を意図したプログラムでは使用してはい"
8901 #: build/C/man2/sigreturn.2:72
8903 "The B<sigreturn>() call is used by the kernel to implement signal "
8904 "handlers. It should B<never> be called directly. Better yet, the specific "
8905 "use of the I<__unused> argument varies depending on the architecture."
8907 "B<sigreturn>() コールは、シグナル・ハンドラを実装するためにカーネルにより使"
8908 "用される。 これを直接呼び出しては B<決して> いけない。さらに I<__unused> 引き"
8909 "数がどのように使われるかはそのアーキテクチャに依存して変化する。"
8912 #: build/C/man2/sigreturn.2:77
8913 msgid "B<kill>(2), B<sigaltstack>(2), B<signal>(2), B<signal>(7)"
8914 msgstr "B<kill>(2), B<sigaltstack>(2), B<signal>(2), B<signal>(7)"
8917 #: build/C/man3/sigset.3:24
8923 #: build/C/man3/sigset.3:27
8924 msgid "sigset, sighold, sigrelse, sigignore - System V signal API"
8925 msgstr "sigset, sighold, sigrelse, sigignore - System V 版シグナル API"
8928 #: build/C/man3/sigset.3:33
8929 msgid "B<sighandler_t sigset(int >I<sig>B<, sighandler_t >I<disp>B<);>"
8930 msgstr "B<sighandler_t sigset(int >I<sig>B<, sighandler_t >I<disp>B<);>"
8933 #: build/C/man3/sigset.3:35
8934 msgid "B<int sighold(int >I<sig>B<);>"
8935 msgstr "B<int sighold(int >I<sig>B<);>"
8938 #: build/C/man3/sigset.3:37
8939 msgid "B<int sigrelse(int >I<sig>B<);>"
8940 msgstr "B<int sigrelse(int >I<sig>B<);>"
8943 #: build/C/man3/sigset.3:39
8944 msgid "B<int sigignore(int >I<sig>B<);>"
8945 msgstr "B<int sigignore(int >I<sig>B<);>"
8948 #: build/C/man3/sigset.3:50
8949 msgid "B<sigset>(), B<sighold>(), B<sigrelse>(), B<sigignore>():"
8950 msgstr "B<sigset>(), B<sighold>(), B<sigrelse>(), B<sigignore>():"
8953 #: build/C/man3/sigset.3:54
8955 "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
8957 "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
8960 #: build/C/man3/sigset.3:63
8962 "These functions are provided in glibc as a compatibility interface for "
8963 "programs that make use of the historical System V signal API. This API is "
8964 "obsolete: new applications should use the POSIX signal API (B<sigaction>(2), "
8965 "B<sigprocmask>(2), etc.)"
8967 "これらの関数は、昔ながらの System V 版シグナル API を使用しているプログラム "
8968 "に対して互換性のあるインタフェースを glibc で提供するものである。 この API は"
8969 "過去のものであり、新しいアプリケーションでは POSIX シグナル API (B<sigaction>"
8970 "(2), B<sigprocmask>(2) など) を使用すべきである。"
8973 #: build/C/man3/sigset.3:72
8975 "The B<sigset>() function modifies the disposition of the signal I<sig>. "
8976 "The I<disp> argument can be the address of a signal handler function, or one "
8977 "of the following constants:"
8979 "関数 B<sigset>() はシグナル I<sig> のシグナルハンドラの動作を変更する。 "
8980 "I<disp> 引き数には、シグナルハンドラ関数のアドレスか、 以下の定数のいずれか一"
8984 #: build/C/man3/sigset.3:72
8990 #: build/C/man3/sigset.3:77
8991 msgid "Reset the disposition of I<sig> to the default."
8992 msgstr "I<sig> の動作をデフォルトにリセットする。"
8995 #: build/C/man3/sigset.3:77
9001 #: build/C/man3/sigset.3:81
9002 msgid "Ignore I<sig>."
9003 msgstr "I<sig> を無視する。"
9006 #: build/C/man3/sigset.3:81
9009 msgstr "B<SIG_HOLD>"
9012 #: build/C/man3/sigset.3:88
9014 "Add I<sig> to the process's signal mask, but leave the disposition of I<sig> "
9017 "そのプロセスのシグナルマスクに I<sig> を追加するが、 I<sig> の動作は変更しな"
9021 #: build/C/man3/sigset.3:94
9023 "If I<disp> specifies the address of a signal handler, then I<sig> is added "
9024 "to the process's signal mask during execution of the handler."
9026 "I<disp> にシグナルハンドラのアドレスが指定された場合、 シグナルハンドラの実行"
9027 "中は、そのプロセスのシグナルマスクに I<sig> が追加される。"
9030 #: build/C/man3/sigset.3:102
9032 "If I<disp> was specified as a value other than B<SIG_HOLD>, then I<sig> is "
9033 "removed from the process's signal mask."
9035 "I<disp> に B<SIG_HOLD> 以外の値が指定された場合、 そのプロセスのシグナルマス"
9036 "クから I<sig> が削除される。"
9039 #: build/C/man3/sigset.3:108 build/C/man3/sigvec.3:85
9040 msgid "The dispositions for B<SIGKILL> and B<SIGSTOP> cannot be changed."
9041 msgstr "シグナル B<SIGKILL> と B<SIGSTOP> に対する動作は変更できない。"
9044 #: build/C/man3/sigset.3:114
9046 "The B<sighold>() function adds I<sig> to the calling process's signal mask."
9048 "関数 B<sighold>() は、呼び出し元プロセスのシグナルマスクに I<sig> を追加す"
9052 #: build/C/man3/sigset.3:120
9054 "The B<sigrelse>() function removes I<sig> from the calling process's signal "
9057 "関数 B<sigrelse>() は、呼び出し元プロセスのシグナルマスクから I<sig> を削除"
9061 #: build/C/man3/sigset.3:127
9063 "The B<sigignore>() function sets the disposition of I<sig> to B<SIG_IGN>."
9064 msgstr "関数 B<sigignore>() は、 I<sig> の動作を B<SIG_IGN> に設定する。"
9067 #: build/C/man3/sigset.3:143
9069 "On success, B<sigset>() returns B<SIG_HOLD> if I<sig> was blocked before "
9070 "the call, or the signal's previous disposition if it was not blocked before "
9071 "the call. On error, B<sigset>() returns -1, with I<errno> set to indicate "
9072 "the error. (But see BUGS below.)"
9074 "B<sigset>() は成功すると、 呼び出し前に I<sig> がブロックされていた場合には "
9075 "B<SIG_HOLD> を返し、 ブロックされていなかった場合には 変更前のそのシグナルの"
9076 "動作を返す。 エラーの場合、 B<sigset>() は -1 を返し、 I<errno> にエラーを示"
9077 "す値をセットする。 但し、以下の「バグ」の節も参照のこと。"
9080 #: build/C/man3/sigset.3:152
9082 "The B<sighold>(), B<sigrelse>(), and B<sigignore>() functions return 0 on "
9083 "success; on error, these functions return -1 and set I<errno> to indicate "
9086 "関数 B<sighold>(), B<sigrelse>(), B<sigignore>() は成功すると 0 を返す。エ"
9087 "ラーの場合、-1 を返し、 I<errno> にエラーを示す値をセットする。"
9090 #: build/C/man3/sigset.3:159
9092 "For B<sigset>() see the ERRORS under B<sigaction>(2) and B<sigprocmask>(2)."
9094 "B<sigset>() に関しては、 B<sigaction>(2) と B<sigprocmask>(2) の「エラー」"
9098 #: build/C/man3/sigset.3:166
9100 "For B<sighold>() and B<sigrelse>() see the ERRORS under B<sigprocmask>(2)."
9102 "B<sighold>() と B<sigrelse>() に関しては、 B<sigprocmask>(2) の「エラー」"
9106 #: build/C/man3/sigset.3:171
9107 msgid "For B<sigignore>(), see the errors under B<sigaction>(2)."
9108 msgstr "B<sigignore>() に関しては、 B<sigaction>(2) の「エラー」の節を参照。"
9111 #: build/C/man3/sigset.3:188
9113 "SVr4, POSIX.1-2001. These functions are obsolete: do not use them in new "
9114 "programs. POSIX.1-2008 marks B<sighold>(), B<sigignore>(), B<sigpause>(), "
9115 "B<sigrelse>(), and B<sigset>() as obsolete, recommending the use of "
9116 "B<sigaction>(2), B<sigprocmask>(2), B<pthread_sigmask>(3), and B<sigsuspend>"
9119 "SVr4, POSIX.1-2001. これらの関数は廃止予定である。新しいプログラムでは使用し"
9120 "ないこと。 POSIX.1-2008 は、 B<sighold>(), B<sigignore>(), B<sigpause>(), "
9121 "B<sigrelse>(), B<sigset>() を廃止予定としている。 代わりに、 B<sigaction>"
9122 "(2), B<sigprocmask>(2), B<pthread_sigmask>(3), B<sigsuspend>(2) の使用が推奨"
9126 #: build/C/man3/sigset.3:190
9127 msgid "These functions appeared in glibc version 2.1."
9128 msgstr "これらの関数は glibc 2.1 で登場した。"
9131 #: build/C/man3/sigset.3:196
9133 "The I<sighandler_t> type is a GNU extension; it is only used on this page to "
9134 "make the B<sigset>() prototype more easily readable."
9136 "I<sighandler_t> 型は GNU による拡張であり、この man page で B<sigset>() のプ"
9137 "ロトタイプをより読みやすくするために使われているだけである。"
9140 #: build/C/man3/sigset.3:204
9142 "The B<sigset>() function provides reliable signal handling semantics (as "
9143 "when calling B<sigaction>(2) with I<sa_mask> equal to 0)."
9145 "関数 B<sigset>() は信頼性のあるシグナル処理機構を提供する (I<sa_mask> を 0 "
9146 "で B<sigaction>(2) を呼び出したときと同様)。"
9149 #: build/C/man3/sigset.3:222
9151 "On System V, the B<signal>() function provides unreliable semantics (as "
9152 "when calling B<sigaction>(2) with I<sa_mask> equal to I<SA_RESETHAND | "
9153 "SA_NODEFER>). On BSD, B<signal>() provides reliable semantics. "
9154 "POSIX.1-2001 leaves these aspects of B<signal>() unspecified. See B<signal>"
9155 "(2) for further details."
9157 "System V では、関数 B<signal>() が提供する処理機構は信頼性のないものである "
9158 "(I<sa_mask> を I<SA_RESETHAND | SA_NODEFER> として B<sigaction>(2) を呼び出"
9159 "したときと同様)。 BSD では、 B<signal>() は信頼性のある処理機構を提供する。 "
9160 "POSIX.1-2001 では、 B<signal>() のこの点は規定しないままとなっている。 さら"
9161 "なる詳細については B<signal>(2) を参照。"
9164 #: build/C/man3/sigset.3:230 build/C/man3/sigvec.3:250
9166 "In order to wait for a signal, BSD and System V both provided a function "
9167 "named B<sigpause>(3), but this function has a different argument on the two "
9168 "systems. See B<sigpause>(3) for details."
9170 "BSD と System V のどちらのシステムでも シグナルを待つために、 B<sigpause>"
9171 "(3) という名前の関数が提供されているが、 この関数の引き数は両方のシステムで"
9172 "異なる。 詳細は B<sigpause>(3) を参照。"
9175 #: build/C/man3/sigset.3:239
9177 "In versions of glibc before 2.2, B<sigset>() did not unblock I<sig> if "
9178 "I<disp> was specified as a value other than B<SIG_HOLD>."
9180 "2.2 より前のバージョンの glibc では、 I<disp> に B<SIG_HOLD> 以外の値が指定さ"
9181 "れた場合、 I<sig> のブロック解除を行っていなかった。"
9183 #. See http://sourceware.org/bugzilla/show_bug.cgi?id=1951
9185 #: build/C/man3/sigset.3:264
9187 "In versions of glibc before 2.5, B<sigset>() does not correctly return the "
9188 "previous disposition of the signal in two cases. First, if I<disp> is "
9189 "specified as B<SIG_HOLD>, then a successful B<sigset>() always returns "
9190 "B<SIG_HOLD>. Instead, it should return the previous disposition of the "
9191 "signal (unless the signal was blocked, in which case B<SIG_HOLD> should be "
9192 "returned). Second, if the signal is currently blocked, then the return "
9193 "value of a successful B<sigset>() should be B<SIG_HOLD>. Instead, the "
9194 "previous disposition of the signal is returned. These problems have been "
9195 "fixed since glibc 2.5."
9197 "2.3.5 以前の全てのバージョンの glibc では、 B<sigset>() が変更前のシグナルの"
9198 "動作を正しく返さない場合が 2つある。 一つめは、 I<disp> に B<SIG_HOLD> が指定"
9199 "されると、成功した場合 B<sigset>() は常に B<SIG_HOLD> を返すことである。 正"
9200 "しくは、(シグナルがブロックされていなかった場合には) 変更前のシグナルの動作"
9201 "を返すべきである (シグナルがブロックされていた場合には、 B<SIG_HOLD> が返され"
9202 "る)。 もう一つは、シグナルが現在ブロックされている場合には、 成功した場合の "
9203 "B<sigset>() の返り値は B<SIG_HOLD> になるべきであるが、実際には 変更前のシグ"
9204 "ナルの動作が返されることである。 これらの問題は glibc 2.5 以降で修正されてい"
9208 #: build/C/man3/sigset.3:274
9210 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
9211 "B<raise>(3), B<sigpause>(3), B<sigvec>(3), B<signal>(7)"
9213 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
9214 "B<raise>(3), B<sigpause>(3), B<sigvec>(3), B<signal>(7)"
9217 #: build/C/man3/sigsetops.3:29
9223 #: build/C/man3/sigsetops.3:29
9229 #: build/C/man3/sigsetops.3:33
9231 "sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - POSIX signal "
9234 "sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - POSIX シグナル集"
9238 #: build/C/man3/sigsetops.3:37
9239 msgid "B<int sigemptyset(sigset_t *>I<set>B<);>"
9240 msgstr "B<int sigemptyset(sigset_t *>I<set>B<);>"
9243 #: build/C/man3/sigsetops.3:39
9244 msgid "B<int sigfillset(sigset_t *>I<set>B<);>"
9245 msgstr "B<int sigfillset(sigset_t *>I<set>B<);>"
9248 #: build/C/man3/sigsetops.3:41
9249 msgid "B<int sigaddset(sigset_t *>I<set>B<, int >I<signum>B<);>"
9250 msgstr "B<int sigaddset(sigset_t *>I<set>B<, int >I<signum>B<);>"
9253 #: build/C/man3/sigsetops.3:43
9254 msgid "B<int sigdelset(sigset_t *>I<set>B<, int >I<signum>B<);>"
9255 msgstr "B<int sigdelset(sigset_t *>I<set>B<, int >I<signum>B<);>"
9258 #: build/C/man3/sigsetops.3:45
9259 msgid "B<int sigismember(const sigset_t *>I<set>B<, int >I<signum>B<);>"
9260 msgstr "B<int sigismember(const sigset_t *>I<set>B<, int >I<signum>B<);>"
9263 #: build/C/man3/sigsetops.3:57
9265 "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), B<sigdelset>(), "
9268 "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), B<sigdelset>(), "
9272 #: build/C/man3/sigsetops.3:59
9273 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
9274 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
9277 #: build/C/man3/sigsetops.3:63
9278 msgid "These functions allow the manipulation of POSIX signal sets."
9279 msgstr "これらの関数は POSIX シグナル集合(signal set)を操作するため使用する。"
9282 #: build/C/man3/sigsetops.3:68
9284 "B<sigemptyset>() initializes the signal set given by I<set> to empty, with "
9285 "all signals excluded from the set."
9287 "B<sigemptyset>() は I<set> で与えられたシグナル集合を空に初期化し、シグナル"
9288 "が一つも 含まれていない状態にする。"
9291 #: build/C/man3/sigsetops.3:73
9292 msgid "B<sigfillset>() initializes I<set> to full, including all signals."
9294 "B<sigfillset>() は I<set> で与えられたシグナル集合が全てのシグナルを含むよう"
9298 #: build/C/man3/sigsetops.3:81
9300 "B<sigaddset>() and B<sigdelset>() add and delete respectively signal "
9301 "I<signum> from I<set>."
9303 "B<sigaddset>() と B<sigdelset>() は I<set> に I<signum> シグナルをそれぞれ"
9307 #: build/C/man3/sigsetops.3:87
9308 msgid "B<sigismember>() tests whether I<signum> is a member of I<set>."
9310 "B<sigismember>() は I<signum> が I<set> に含まれているかどうかをテストする。"
9313 #: build/C/man3/sigsetops.3:105
9315 "Objects of type I<sigset_t> must be initialized by a call to either "
9316 "B<sigemptyset>() or B<sigfillset>() before being passed to the functions "
9317 "B<sigaddset>(), B<sigdelset>() and B<sigismember>() or the additional "
9318 "glibc functions described below (B<sigisemptyset>(), B<sigandset>(), and "
9319 "B<sigorset>()). The results are undefined if this is not done."
9321 "I<sigset_t> 型のオブジェクトは、関数 B<sigaddset>(), B<sigdelset>(), "
9322 "B<sigismember>() や後述の glibc の追加関数 (B<sigisemptyset>(), B<sigandset>"
9323 "(), B<sigorset>()) に渡す前に、 B<sigemptyset>() か B<sigfillset>() を呼び"
9324 "出して初期化しなければならない。 初期化しなかった場合の結果は未定義である。"
9327 #: build/C/man3/sigsetops.3:112
9329 "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), and B<sigdelset>() "
9330 "return 0 on success and -1 on error."
9332 "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), B<sigdelset>() は成功すれ"
9333 "ば 0 を、エラーの場合は -1 を返す。"
9336 #: build/C/man3/sigsetops.3:121
9338 "B<sigismember>() returns 1 if I<signum> is a member of I<set>, 0 if "
9339 "I<signum> is not a member, and -1 on error."
9341 "B<sigismember>() は I<signum> が I<set> に含まれていれば 1 を返し、含まれて"
9342 "いなければ 0 を返す。 エラーの場合は -1 を返す。"
9345 #: build/C/man3/sigsetops.3:126
9346 msgid "I<sig> is not a valid signal."
9347 msgstr "I<sig> が有効なシグナルではない。"
9350 #: build/C/man3/sigsetops.3:129
9356 #: build/C/man3/sigsetops.3:135
9358 "If the B<_GNU_SOURCE> feature test macro is defined, then I<E<lt>signal."
9359 "hE<gt>> exposes three other functions for manipulating signal sets."
9361 "B<_GNU_SOURCE> 機能検査マクロが定義されていると、 I<E<lt>signal.hE<gt>> でシ"
9362 "グナル集合を操作する 3つの関数が追加で公開される。"
9365 #: build/C/man3/sigsetops.3:135
9367 msgid "B<int sigisemptyset(sigset_t *>I<set>B<);>"
9368 msgstr "B<int sigisemptyset(sigset_t *>I<set>B<);>"
9371 #: build/C/man3/sigsetops.3:140
9372 msgid "returns 1 if I<set> contains no signals, and 0 otherwise."
9374 "I<set> にシグナルが一つも含まれていなければ 1 を返し、 それ以外は 0 を返す。"
9377 #: build/C/man3/sigsetops.3:140
9379 msgid "B<int sigorset(sigset_t *>I<dest>B<, sigset_t *>I<left>B<, sigset_t *>I<right>B<);>"
9380 msgstr "B<int sigorset(sigset_t *>I<dest>B<, sigset_t *>I<left>B<, sigset_t *>I<right>B<);>"
9383 #: build/C/man3/sigsetops.3:149
9384 msgid "places the union of the sets I<left> and I<right> in I<dest>."
9385 msgstr "シグナル集合 I<left> と I<left> の和集合を I<dest> に書き込む。"
9388 #: build/C/man3/sigsetops.3:149
9390 msgid "B<int sigandset(sigset_t *>I<dest>B<, sigset_t *>I<left>B<, sigset_t *>I<right>B<);>"
9391 msgstr "B<int sigandset(sigset_t *>I<dest>B<, sigset_t *>I<left>B<, sigset_t *>I<right>B<);>"
9394 #: build/C/man3/sigsetops.3:158
9395 msgid "places the intersection of the sets I<left> and I<right> in I<dest>."
9396 msgstr "シグナル集合 I<left> と I<left> の積集合を I<dest> に書き込む。"
9399 #: build/C/man3/sigsetops.3:163
9401 "B<sigorset>() and B<sigandset>() return 0 on success, and -1 on failure."
9403 "B<sigorset>() と B<sigandset>() は成功すると 0 を、失敗すると -1 を返す。"
9406 #: build/C/man3/sigsetops.3:166
9408 "These functions are nonstandard (a few other systems provide similar "
9409 "functions) and their use should be avoided in portable applications."
9411 "これらの関数は非標準であり、(他にも同様の関数を提供しているシステムも いくつ"
9412 "かはあるが) 移植性を考慮したアプリケーションでは使用を避けるべき である。"
9415 #: build/C/man3/sigsetops.3:171
9416 msgid "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<sigsuspend>(2)"
9417 msgstr "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<sigsuspend>(2)"
9420 #: build/C/man2/sigsuspend.2:27
9426 #: build/C/man2/sigsuspend.2:27
9432 #: build/C/man2/sigsuspend.2:30
9433 msgid "sigsuspend - wait for a signal"
9434 msgstr "sigsuspend - シグナルを待つ"
9437 #: build/C/man2/sigsuspend.2:34
9438 msgid "B<int sigsuspend(const sigset_t *>I<mask>B<);>"
9439 msgstr "B<int sigsuspend(const sigset_t *>I<mask>B<);>"
9442 #: build/C/man2/sigsuspend.2:43
9444 "B<sigsuspend>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
9447 "B<sigsuspend>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
9451 #: build/C/man2/sigsuspend.2:51
9453 "B<sigsuspend>() temporarily replaces the signal mask of the calling process "
9454 "with the mask given by I<mask> and then suspends the process until delivery "
9455 "of a signal whose action is to invoke a signal handler or to terminate a "
9458 "B<sigsuspend>() は、呼び出し元プロセスのシグナルマスクを I<mask> で指定され"
9459 "たマスクに一時的に置き換え、 シグナルハンドラの起動もしくはプロセスの終了がア"
9460 "クションとして 設定されたシグナルが配送されるまで、そのプロセスを停止する。"
9463 #: build/C/man2/sigsuspend.2:60
9465 "If the signal terminates the process, then B<sigsuspend>() does not "
9466 "return. If the signal is caught, then B<sigsuspend>() returns after the "
9467 "signal handler returns, and the signal mask is restored to the state before "
9468 "the call to B<sigsuspend>()."
9470 "シグナルがプロセスを終了させるものの場合、 B<sigsuspend>() は返らない。シグ"
9471 "ナルが捕捉された場合、 シグナルハンドラの処理が終わった後に B<sigsuspend>() "
9472 "は返り、シグナルマスクは B<sigsuspend>() が呼び出される前の状態に復元され"
9476 #: build/C/man2/sigsuspend.2:68
9478 "It is not possible to block B<SIGKILL> or B<SIGSTOP>; specifying these "
9479 "signals in I<mask>, has no effect on the process's signal mask."
9481 "B<SIGKILL> と B<SIGSTOP> を禁止 (block) することはできない; これらのシグナル"
9482 "を I<mask> に指定しても、プロセスのシグナルマスクは影響を受けない。"
9485 #: build/C/man2/sigsuspend.2:72
9486 msgid "B<sigsuspend>() always returns -1, normally with the error B<EINTR>."
9487 msgstr "B<sigsuspend>() は常に -1 を返し、通常は B<EINTR> エラーが発生する。"
9490 #: build/C/man2/sigsuspend.2:77
9492 "I<mask> points to memory which is not a valid part of the process address "
9495 "I<mask> が指しているメモリが、プロセスのアドレス空間の有効な部分ではない。"
9498 #: build/C/man2/sigsuspend.2:80
9499 msgid "The call was interrupted by a signal."
9500 msgstr "システムコールはシグナルにより割り込まれた。"
9503 #: build/C/man2/sigsuspend.2:100
9505 "Normally, B<sigsuspend>() is used in conjunction with B<sigprocmask>(2) in "
9506 "order to prevent delivery of a signal during the execution of a critical "
9507 "code section. The caller first blocks the signals with B<sigprocmask>(2). "
9508 "When the critical code has completed, the caller then waits for the signals "
9509 "by calling B<sigsuspend>() with the signal mask that was returned by "
9510 "B<sigprocmask>(2) (in the I<oldset> argument)."
9512 "B<sigsuspend>() は、通常、クリティカル・コード・セクション (critical code "
9513 "section) の 実行中にシグナルが配送されるのを防止するために、 B<sigprocmask>"
9514 "(2) と組み合わせて使用される。 まず最初に、呼び出し元は B<sigprocmask>(2) "
9515 "を使ってシグナルを禁止する。 クリティカル・コードが完了すると、呼び出し元は "
9516 "B<sigprocmask>(2) が (I<oldset> 引き数で) 返すシグナルマスクを指定して "
9517 "B<sigsuspend>() を呼び出すことで、クリティカル・コード実行中に発生した シグ"
9521 #: build/C/man2/sigsuspend.2:114
9523 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
9524 "B<sigwaitinfo>(2), B<sigsetops>(3), B<sigwait>(3), B<signal>(7)"
9526 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
9527 "B<sigwaitinfo>(2), B<sigsetops>(3), B<sigwait>(3), B<signal>(7)"
9530 #: build/C/man3/sigvec.3:24
9536 #: build/C/man3/sigvec.3:27
9537 msgid "sigvec, sigblock, sigsetmask, siggetmask, sigmask - BSD signal API"
9538 msgstr "sigvec, sigblock, sigsetmask, siggetmask, sigmask - BSD 版シグナル API"
9541 #: build/C/man3/sigvec.3:31
9543 "B<int sigvec(int >I<sig>B<, struct sigvec *>I<vec>B<, struct sigvec "
9546 "B<int sigvec(int >I<sig>B<, struct sigvec *>I<vec>B<, struct sigvec "
9550 #: build/C/man3/sigvec.3:33
9551 msgid "B<int sigmask(int >I<signum>B<);>"
9552 msgstr "B<int sigmask(int >I<signum>B<);>"
9555 #: build/C/man3/sigvec.3:35
9556 msgid "B<int sigblock(int >I<mask>B<);>"
9557 msgstr "B<int sigblock(int >I<mask>B<);>"
9560 #: build/C/man3/sigvec.3:37
9561 msgid "B<int sigsetmask(int >I<mask>B<);>"
9562 msgstr "B<int sigsetmask(int >I<mask>B<);>"
9565 #: build/C/man3/sigvec.3:39
9566 msgid "B<int siggetmask(void);>"
9567 msgstr "B<int siggetmask(void);>"
9570 #: build/C/man3/sigvec.3:47
9571 msgid "All functions shown above: _BSD_SOURCE"
9572 msgstr "上記の全ての関数: _BSD_SOURCE"
9575 #: build/C/man3/sigvec.3:54
9577 "These functions are provided in glibc as a compatibility interface for "
9578 "programs that make use of the historical BSD signal API. This API is "
9579 "obsolete: new applications should use the POSIX signal API (B<sigaction>(2), "
9580 "B<sigprocmask>(2), etc.)"
9582 "これらの関数は、昔ながらの BSD 版シグナル API を使用しているプログラム に対し"
9583 "て互換性のあるインタフェースを glibc で提供するものである。 この API は過去の"
9584 "ものであり、新しいアプリケーションでは POSIX シグナル API (B<sigaction>(2), "
9585 "B<sigprocmask>(2) など) を使用すべきである。"
9588 #: build/C/man3/sigvec.3:79
9590 "The B<sigvec>() function sets and/or gets the disposition of the signal "
9591 "I<sig> (like the POSIX B<sigaction>(2)). If I<vec> is not NULL, it points "
9592 "to a I<sigvec> structure that defines the new disposition for I<sig>. If "
9593 "I<ovec> is not NULL, it points to a I<sigvec> structure that is used to "
9594 "return the previous disposition of I<sig>. To obtain the current "
9595 "disposition of I<sig> without changing it, specify NULL for I<vec>, and a "
9596 "non-NULL pointer for I<ovec>."
9598 "関数 B<sigvec>() は、(POSIX の B<sigaction>(2) と同様に) シグナル I<sig> の"
9599 "動作の設定・取得を行う。 I<vec> は、NULL 以外の場合、 I<sig> の新しい動作を定"
9600 "義した I<sigvec> 構造体へのポインタである。 I<ovec> は、NULL 以外の場合、 "
9601 "I<sig> の変更前の動作を返すために使用される I<sigvec> 構造体へのポインタであ"
9602 "る。 I<sig> の動作を変更せずに現在の動作を取得するためには、 I<vec> に NULL "
9603 "を指定し、 I<ovec> に NULL でないポインタを指定すればよい。"
9606 #: build/C/man3/sigvec.3:89
9607 msgid "The I<sigvec> structure has the following form:"
9608 msgstr "I<sigvec> 構造体は以下の通りである:"
9611 #: build/C/man3/sigvec.3:97
9615 " void (*sv_handler)(); /* Signal disposition */\n"
9616 " int sv_mask; /* Signals to be blocked in handler */\n"
9617 " int sv_flags; /* Flags */\n"
9621 " void (*sv_handler)(); /* Signal disposition */\n"
9622 " int sv_mask; /* Signals to be blocked in handler */\n"
9623 " int sv_flags; /* Flags */\n"
9627 #: build/C/man3/sigvec.3:108
9629 "The I<sv_handler> field specifies the disposition of the signal, and is "
9630 "either: the address of a signal handler function; or B<SIG_DFL> meaning the "
9631 "default disposition applies for the signal; or B<SIG_IGN> meaning that the "
9632 "signal is ignored."
9634 "I<sv_handler> フィールドはシグナルの動作を指定するもので、 シグナルハンドラ関"
9635 "数のアドレスか、 B<SIG_DFL> と B<SIG_IGN> のいずれかを指定できる。 "
9636 "B<SIG_DFL> はシグナルに適用されるデフォルトの動作を意味し、 B<SIG_IGN> はシグ"
9640 #: build/C/man3/sigvec.3:122
9642 "If I<sv_handler> specifies the address of a signal handler, then I<sv_mask> "
9643 "specifies a mask of signals that are to be blocked while the handler is "
9644 "executing. In addition, the signal for which the handler is invoked is also "
9645 "blocked by default. Attempts to block B<SIGKILL> or B<SIGSTOP> are silently "
9648 "I<sv_handler> にシグナルハンドラのアドレスを指定した場合、 I<sv_mask> はハン"
9649 "ドラが実行中にブロックされるべきシグナルのマスクを指定する。 また、ハンドラを"
9650 "起動したシグナル自身はデフォルトでブロックされる。 B<SIGKILL> か B<SIGSTOP> "
9651 "をブロックしようとした場合には、黙って無視される。"
9654 #: build/C/man3/sigvec.3:129
9656 "If I<sv_handler> specifies the address of a signal handler, then the "
9657 "I<sv_flags> field specifies flags controlling what happens when the handler "
9658 "is called. This field may contain zero or more of the following flags:"
9660 "I<sv_handler> にシグナルハンドラのアドレスを指定した場合、 I<sv_flags> フィー"
9661 "ルドはハンドラが呼ばれた際の挙動を制御するフラグを指定する。 このフィールドに"
9662 "は、0 か、以下のフラグを 1個以上指定できる:"
9665 #: build/C/man3/sigvec.3:129
9667 msgid "B<SV_INTERRUPT>"
9668 msgstr "B<SV_INTERRUPT>"
9671 #: build/C/man3/sigvec.3:137
9673 "If the signal handler interrupts a blocking system call, then upon return "
9674 "from the handler the system call will not be restarted: instead it will fail "
9675 "with the error B<EINTR>. If this flag is not specified, then system calls "
9676 "are restarted by default."
9678 "シグナルハンドラが停止中のシステムコールを中断した場合、 ハンドラから復帰して"
9679 "も、システムコールは再開されず、 エラー B<EINTR> で失敗する。 このフラグを指"
9680 "定しなかった場合、システムコールは デフォルトで再開される。"
9683 #: build/C/man3/sigvec.3:137
9685 msgid "B<SV_RESETHAND>"
9686 msgstr "B<SV_RESETHAND>"
9689 #: build/C/man3/sigvec.3:146
9691 "Reset the disposition of the signal to the default before calling the signal "
9692 "handler. If this flag is not specified, then the handler remains "
9693 "established until explicitly removed by a later call to B<sigvec>() or "
9694 "until the process performs an B<execve>(2)."
9696 "シグナルハンドラを呼び出す前にシグナルの動作を デフォルトにリセットする。 こ"
9697 "のフラグを指定しなかった場合、もう一度 B<sigvec>() を呼び出して明示的に削除"
9698 "されるか、プロセスが B<execve>(2) を実行するまで、ハンドラは設定されたままと"
9702 #: build/C/man3/sigvec.3:146
9704 msgid "B<SV_ONSTACK>"
9705 msgstr "B<SV_ONSTACK>"
9708 #: build/C/man3/sigvec.3:153
9710 "Handle the signal on the alternate signal stack (historically established "
9711 "under BSD using the obsolete B<sigstack>() function; the POSIX replacement "
9712 "is B<sigaltstack>(2))."
9714 "代替シグナルスタック上でシグナルハンドラを実行する (歴史的に、BSD では代替シ"
9715 "グナルスタックは廃止された関数 B<sigstack>() を使って設定する。POSIX では、"
9716 "代わりに B<sigaltstack>(2) を使用する)。"
9719 #: build/C/man3/sigvec.3:163
9721 "The B<sigmask>() function constructs and returns a \"signal mask\" for "
9722 "I<signum>. For example, we can initialize the I<vec.sv_mask> field given to "
9723 "B<sigvec>() using code such as the following:"
9725 "関数 B<sigmask>() は I<signum> に対する「シグナルマスク」を構成して返す。 例"
9726 "えば、以下のようなコードを使うと、 B<sigvec>() に渡す I<vec.sv_mask> を初期"
9730 #: build/C/man3/sigvec.3:168
9733 " vec.sv_mask = sigmask(SIGQUIT) | sigpause(SIGABRT);\n"
9734 " /* Block SIGQUIT and SIGABRT during\n"
9735 " handler execution */\n"
9737 " vec.sv_mask = sigmask(SIGQUIT) | sigpause(SIGABRT);\n"
9738 " /* Block SIGQUIT and SIGABRT during\n"
9739 " handler execution */\n"
9742 #: build/C/man3/sigvec.3:183
9744 "The B<sigblock>() function adds the signals in I<mask> to the process's "
9745 "signal mask (like POSIX I<sigprocmask(SIG_BLOCK)>), and returns the "
9746 "process's previous signal mask. Attempts to block B<SIGKILL> or B<SIGSTOP> "
9747 "are silently ignored."
9749 "B<sigblock>() 関数は、 I<mask> にあるシグナルをプロセスのシグナルマスクに追"
9750 "加し (POSIX の I<sigprocmask(SIG_BLOCK)> と同様)、変更前のプロセスのシグナル"
9751 "マスクを返す。 B<SIGKILL> や B<SIGSTOP> をブロックしようとした場合には、黙っ"
9755 #: build/C/man3/sigvec.3:191
9757 "The B<sigsetmask>() function sets the process's signal mask to the value "
9758 "given in I<mask> (like POSIX I<sigprocmask(SIG_SETMASK)>), and returns the "
9759 "process's previous signal mask."
9761 "B<sigsetmask>() 関数はプロセスのシグナルマスクを I<mask> で指定された値に設"
9762 "定し (POSIX の I<sigprocmask(SIG_SETMASK)> と同様)、変更前のプロセスのシグナ"
9766 #: build/C/man3/sigvec.3:197
9768 "The B<siggetmask>() function returns the process's current signal mask. "
9769 "This call is equivalent to I<sigblock(0)>."
9771 "B<siggetmask>() 関数はプロセスの現在のシグナルマスクを返す。この関数は "
9772 "I<sigblock(0)> と等価である。"
9775 #: build/C/man3/sigvec.3:203
9777 "The B<sigvec>() function returns 0 on success; on error, it returns -1 and "
9778 "sets I<errno> to indicate the error."
9780 "B<sigvec>() 関数は成功すると 0 を返す。エラーの場合、-1 を返し、 I<errno> に"
9784 #: build/C/man3/sigvec.3:209
9786 "The B<sigblock>() and B<sigsetmask>() functions return the previous signal "
9788 msgstr "B<sigblock>() と B<sigsetmask>() は変更前のシグナルマスクを返す。"
9791 #: build/C/man3/sigvec.3:214
9792 msgid "The B<sigmask>() function returns the signal mask for I<signum>."
9793 msgstr "B<sigmask>() 関数は I<signum> のシグナルマスクを返す。"
9796 #: build/C/man3/sigvec.3:219
9797 msgid "See the ERRORS under B<sigaction>(2) and B<sigprocmask>(2)."
9798 msgstr "B<sigaction>(2) と B<sigprocmask>(2) の「エラー」の節を参照。"
9801 #: build/C/man3/sigvec.3:225
9803 "All of these functions were in 4.3BSD, except B<siggetmask>(), whose origin "
9804 "is unclear. These functions are obsolete: do not use them in new programs."
9806 "これらの関数のうち B<siggetmask>() 以外の全ては 4.3BSD にあった。 "
9807 "B<siggetmask>() の出自ははっきりしない。 これらの関数は廃止予定であり、新し"
9811 #: build/C/man3/sigvec.3:242
9813 "On 4.3BSD, the B<signal>() function provided reliable semantics (as when "
9814 "calling B<sigvec>() with I<vec.sv_mask> equal to 0). On System V, B<signal>"
9815 "() provides unreliable semantics. POSIX.1-2001 leaves these aspects of "
9816 "B<signal>() unspecified. See B<signal>(2) for further details."
9818 "4.3BSD では、信頼性のあるシグナル処理機構を提供する (I<vec.sv_mask> を 0 で "
9819 "B<sigvec>() を呼び出したときと同様)。 System V が提供する処理機構は信頼性の"
9820 "ないものである。 POSIX.1-2001 では、 B<signal>() のこの点は規定しないままと"
9821 "なっている。 さらなる詳細については B<signal>(2) を参照。"
9824 #: build/C/man3/sigvec.3:260
9826 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
9827 "B<raise>(3), B<sigpause>(3), B<sigset>(3), B<signal>(7)"
9829 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
9830 "B<raise>(3), B<sigpause>(3), B<sigset>(3), B<signal>(7)"
9833 #: build/C/man3/sigwait.3:24
9839 #: build/C/man3/sigwait.3:24
9845 #: build/C/man3/sigwait.3:27
9846 msgid "sigwait - wait for a signal"
9847 msgstr "sigwait - シグナルを待つ"
9850 #: build/C/man3/sigwait.3:32
9852 msgid "B< int sigwait(const sigset_t *>I<set>B<, int *>I<sig>B<);>\n"
9853 msgstr "B< int sigwait(const sigset_t *>I<set>B<, int *>I<sig>B<);>\n"
9856 #: build/C/man3/sigwait.3:42
9858 "B<sigwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
9860 "B<sigwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
9863 #: build/C/man3/sigwait.3:53
9865 "The B<sigwait>() function suspends execution of the calling thread until "
9866 "the delivery of one of the signals specified in the signal set I<set>. The "
9867 "function accepts the signal (removes it from the pending list of signals), "
9868 "and returns the signal number in I<sig>."
9870 "B<sigwait>() 関数は、シグナル集合 I<set> で指定されたシグナルの一つが配送さ"
9871 "れるまで、 呼び出したスレッドの実行を中断する。 この関数はそのシグナルを受け"
9872 "取り (つまり、処理待ちのシグナルのリスト からそのシグナルを削除し)、そのシグ"
9873 "ナル番号を I<sig> に格納して返す。"
9876 #: build/C/man3/sigwait.3:59
9878 "The operation of B<sigwait>() is the same as B<sigwaitinfo>(2), except that:"
9880 "B<sigwait>() の動作は B<sigwaitinfo>(2) と同じだが、以下の点が異なる。"
9883 #: build/C/man3/sigwait.3:64
9885 "B<sigwait>() only returns the signal number, rather than a I<siginfo_t> "
9886 "structure describing the signal."
9888 "B<sigwait>() は、シグナルの内容を表す I<siginfo_t> 構造体を返すのではなく、"
9892 #: build/C/man3/sigwait.3:66
9893 msgid "The return values of the two functions are different."
9894 msgstr "返り値が B<sigwaitinfo>(2) とは異なる。"
9897 #: build/C/man3/sigwait.3:71
9899 "On success, B<sigwait>() returns 0. On error, it returns a positive error "
9900 "number (listed in ERRORS)."
9902 "成功すると、 B<sigwait>() は 0 を返す。 エラーの場合、(「エラー」の節のリス"
9905 #. Does not occur for glibc.
9907 #: build/C/man3/sigwait.3:77
9908 msgid "I<set> contains an invalid signal number."
9909 msgstr "I<set> に無効なシグナル番号が入っている。"
9912 #: build/C/man3/sigwait.3:83
9913 msgid "B<sigwait>() is implemented using B<sigtimedwait>(2)."
9914 msgstr "B<sigwait>() は B<sigtimedwait>(2) を使って実装されている。"
9917 #: build/C/man3/sigwait.3:86
9918 msgid "See B<pthread_sigmask>(3)."
9919 msgstr "B<pthread_sigmask>(3) を参照。"
9922 #: build/C/man3/sigwait.3:94
9924 "B<sigaction>(2), B<signalfd>(2), B<sigpending>(2), B<sigsuspend>(2), "
9925 "B<sigwaitinfo>(2), B<sigsetops>(3), B<signal>(7)"
9927 "B<sigaction>(2), B<signalfd>(2), B<sigpending>(2), B<sigsuspend>(2), "
9928 "B<sigwaitinfo>(2), B<sigsetops>(3), B<signal>(7)"
9931 #: build/C/man2/sigwaitinfo.2:23
9934 msgstr "SIGWAITINFO"
9937 #: build/C/man2/sigwaitinfo.2:23
9943 #: build/C/man2/sigwaitinfo.2:26
9944 msgid "sigwaitinfo, sigtimedwait - synchronously wait for queued signals"
9945 msgstr "sigwaitinfo, sigtimedwait - キューに入れられたシグナルを同期して待つ"
9948 #: build/C/man2/sigwaitinfo.2:31
9950 msgid "B<int sigwaitinfo(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<);>\n"
9951 msgstr "B<int sigwaitinfo(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<);>\n"
9954 #: build/C/man2/sigwaitinfo.2:34
9957 "B<int sigtimedwait(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<, >\n"
9958 "B< const struct timespec *>I<timeout>B<);>\n"
9960 "B<int sigtimedwait(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<, >\n"
9961 "B< const struct timespec *>I<timeout>B<);>\n"
9964 #: build/C/man2/sigwaitinfo.2:44
9965 msgid "B<sigwaitinfo>(), B<sigtimedwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
9967 "B<sigwaitinfo>(), B<sigtimedwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
9970 #: build/C/man2/sigwaitinfo.2:54
9972 "B<sigwaitinfo>() suspends execution of the calling thread until one of the "
9973 "signals in I<set> is delivered. (If one of the signals in I<set> is already "
9974 "pending for the calling thread, B<sigwaitinfo>() will return immediately "
9975 "with information about that signal.)"
9977 "B<sigwaitinfo>() は I<set> のうちのどれかのシグナルが配送されるまで、 呼び出"
9978 "しスレッドの実行を一時停止する (呼び出しスレッドに対して I<set> のうちのどれ"
9979 "かのシグナルが既に待機中 (pending) である場合、 B<sigwaitinfo>() はそのシグ"
9983 #: build/C/man2/sigwaitinfo.2:66
9985 "B<sigwaitinfo>() removes the delivered signal from the set of pending "
9986 "signals and returns the signal number as its function result. If the "
9987 "I<info> argument is not NULL, then it returns a structure of type "
9988 "I<siginfo_t> (see B<sigaction>(2)) containing information about the signal."
9990 "B<sigwaitinfo>() は配送されたシグナルを待機中のシグナルの集合から削除し、 関"
9991 "数の結果としてシグナル番号を返す。 I<info> 引き数が NULL でない場合、配送され"
9992 "たシグナルの情報が入った I<siginfo_t> 型 (B<sigaction>(2) を参照) の構造体を"
9996 #: build/C/man2/sigwaitinfo.2:72
9998 "Signals returned via B<sigwaitinfo>() are delivered in the usual order; see "
9999 "B<signal>(7) for further details."
10001 "B<sigwaitinfo>() で返されるシグナルは、通常の順番で配送される。 詳細は "
10002 "B<signal>(7) を参照すること。"
10004 #. type: Plain text
10005 #: build/C/man2/sigwaitinfo.2:84
10007 "B<sigtimedwait>() operates in exactly the same way as B<sigwaitinfo>() "
10008 "except that it has an additional argument, I<timeout>, which specifies a "
10009 "minimum interval for which the thread is suspended waiting for a signal. "
10010 "(This interval will be rounded up to the system clock granularity, and "
10011 "kernel scheduling delays mean that the interval may overrun by a small "
10012 "amount.) This argument is of the following type:"
10014 "B<sigtimedwait>() は、 B<sigwaitinfo>() と次の点を除いて全く同じように\n"
10015 "動作する。この関数にはもう 1 つの引き数 I<timeout> があり、シグナル待ち\n"
10016 "でスレッドが一時停止する最小時間を指定することができる(この時間はシステ\n"
10017 "ムクロックの粒度に切り上げられ、カーネルのスケジューリング遅延により\n"
10018 "少しだけ長くなる可能性がある)。この引き数の型は以下のとおりである:"
10020 #. type: Plain text
10021 #: build/C/man2/sigwaitinfo.2:91
10024 "struct timespec {\n"
10025 " long tv_sec; /* seconds */\n"
10026 " long tv_nsec; /* nanoseconds */\n"
10029 "struct timespec {\n"
10030 " long tv_sec; /* 秒 */\n"
10031 " long tv_nsec; /* ナノ秒 */\n"
10034 #. type: Plain text
10035 #: build/C/man2/sigwaitinfo.2:101
10037 "If both fields of this structure are specified as 0, a poll is performed: "
10038 "B<sigtimedwait>() returns immediately, either with information about a "
10039 "signal that was pending for the caller, or with an error if none of the "
10040 "signals in I<set> was pending."
10042 "この構造体の 2 つのフィールドがともに 0 の場合、ポーリングが行われる: "
10043 "B<sigtimedwait>() は、呼び出し側プロセスに対して 待機しているシグナルの情報"
10044 "を返して戻るか、 I<set> のうちのどのシグナルも待機していない場合はエラーを返"
10047 #. type: Plain text
10048 #: build/C/man2/sigwaitinfo.2:110
10050 "On success, both B<sigwaitinfo>() and B<sigtimedwait>() return a signal "
10051 "number (i.e., a value greater than zero). On failure both calls return -1, "
10052 "with I<errno> set to indicate the error."
10054 "成功した場合、 B<sigwaitinfo>() と B<sigtimedwait>() はシグナル番号 (すなわ"
10055 "ち 0 より大きい数) を返す。 失敗した場合、2 つの関数は -1 を返し、 I<errno> "
10058 #. type: Plain text
10059 #: build/C/man2/sigwaitinfo.2:119
10061 "No signal in I<set> was delivered within the I<timeout> period specified to "
10062 "B<sigtimedwait>()."
10064 "I<set> のうちのどのシグナルも B<sigtimedwait>() に指定された I<timeout> の期"
10067 #. type: Plain text
10068 #: build/C/man2/sigwaitinfo.2:125
10070 "The wait was interrupted by a signal handler; see B<signal>(7). (This "
10071 "handler was for a signal other than one of those in I<set>.)"
10073 "シグナル待ちがシグナルハンドラによって中断 (interrupt) された (このハンドラ"
10074 "は I<set> にあるシグナル以外のものである)。 B<signal>(7) 参照。"
10076 #. type: Plain text
10077 #: build/C/man2/sigwaitinfo.2:129
10078 msgid "I<timeout> was invalid."
10079 msgstr "I<timeout> が不正である。"
10081 #. type: Plain text
10082 #: build/C/man2/sigwaitinfo.2:148
10084 "In normal usage, the calling program blocks the signals in I<set> via a "
10085 "prior call to B<sigprocmask>(2) (so that the default disposition for these "
10086 "signals does not occur if they are delivered between successive calls to "
10087 "B<sigwaitinfo>() or B<sigtimedwait>()) and does not establish handlers for "
10088 "these signals. In a multithreaded program, the signal should be blocked in "
10089 "all threads to prevent the signal being delivered to a thread other than the "
10090 "one calling B<sigwaitinfo>() or B<sigtimedwait>())."
10092 "通常の使用法では、呼び出し側プロセスはこれらの関数より先に B<sigprocmask>"
10093 "(2) の呼び出すことにより I<set> に含まれるシグナルをブロックし (そのためにこ"
10094 "れらのシグナルがこの後に続く B<sigwaitinfo>() や B<sigtimedwait>() の呼び出"
10095 "しの間に配送された場合には、 デフォルトの配置は行われず)、 これらのシグナルに"
10096 "対するハンドラは設定しない。 マルチスレッドプログラムでは、 B<sigwaitinfo>"
10097 "() や B<sigtimedwait>() を呼び出したスレッド以外のスレッドにそのシグナルが"
10098 "配送されないように、 全てのスレッドで該当シグナルをブロックすべきである。"
10100 #. type: Plain text
10101 #: build/C/man2/sigwaitinfo.2:153
10103 "The set of signals that is pending for a given thread is the union of the "
10104 "set of signals that is pending specifically for that thread and the set of "
10105 "signals that is pending for the process as a whole (see B<signal>(7))."
10107 "指定されたスレッドに対する処理待ちのシグナルの集合は、 そのスレッド自体宛ての"
10108 "処理待ちのシグナル集合と、プロセス全体宛ての 処理待ちのシグナル集合をあわせた"
10109 "ものである (B<signal>(7) 参照)。"
10111 #. type: Plain text
10112 #: build/C/man2/sigwaitinfo.2:159
10113 msgid "Attempts to wait for B<SIGKILL> and B<SIGSTOP> are silently ignored."
10114 msgstr "B<SIGKILL> と B<SIGSTOP> を待とうとした場合、黙って無視される。"
10116 #. type: Plain text
10117 #: build/C/man2/sigwaitinfo.2:168
10119 "If multiple threads of a process are blocked waiting for the same signal(s) "
10120 "in B<sigwaitinfo>() or B<sigtimedwait>(), then exactly one of the threads "
10121 "will actually receive the signal if it is delivered to the process as a "
10122 "whole; which of the threads receives the signal is indeterminate."
10124 "一つのプロセス内の複数のスレッドが B<sigwaitinfo>() や B<sigtimedwait>() で"
10125 "同じシグナルを待って停止した場合、 プロセス全体宛てのシグナルが配送されると、"
10126 "複数のスレッドのうち一つだけが 実際にそのシグナルを受信することになる。 どの"
10127 "スレッドがシグナルを受信するかは決まっていない。"
10129 #. type: Plain text
10130 #: build/C/man2/sigwaitinfo.2:177
10132 "POSIX leaves the meaning of a NULL value for the I<timeout> argument of "
10133 "B<sigtimedwait>() unspecified, permitting the possibility that this has the "
10134 "same meaning as a call to B<sigwaitinfo>(), and indeed this is what is done "
10137 "POSIX では B<sigtimedwait>() の引き数 I<timeout> の値を NULL にした場合の意"
10138 "味を未定義としている。 B<sigwaitinfo>() を呼び出したのと同じ意味としてもよい"
10139 "ことになっており、 実際 Linux ではこのように動作する。"
10141 #. type: Plain text
10142 #: build/C/man2/sigwaitinfo.2:182
10144 "On Linux, B<sigwaitinfo>() is a library function implemented on top of "
10145 "B<sigtimedwait>()."
10147 "Linux では、 B<sigwaitinfo>() は B<sigtimedwait>() を用いて実装されたライブ"
10150 #. type: Plain text
10151 #: build/C/man2/sigwaitinfo.2:194
10153 "B<kill>(2), B<sigaction>(2), B<signal>(2), B<signalfd>(2), B<sigpending>(2), "
10154 "B<sigprocmask>(2), B<sigqueue>(3), B<sigsetops>(3), B<sigwait>(3), B<signal>"
10157 "B<kill>(2), B<sigaction>(2), B<signal>(2), B<signalfd>(2), B<sigpending>(2), "
10158 "B<sigprocmask>(2), B<sigqueue>(3), B<sigsetops>(3), B<sigwait>(3), B<signal>"
10162 #: build/C/man3/sysv_signal.3:23
10164 msgid "SYSV_SIGNAL"
10165 msgstr "SYSV_SIGNAL"
10168 #: build/C/man3/sysv_signal.3:23
10171 msgstr "2007-05-04"
10173 #. type: Plain text
10174 #: build/C/man3/sysv_signal.3:26
10175 msgid "sysv_signal - signal handling with System V semantics"
10176 msgstr "sysv_signal - System V 方式のシグナル処理"
10178 #. type: Plain text
10179 #: build/C/man3/sysv_signal.3:28
10180 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
10181 msgstr "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */"
10183 #. type: Plain text
10184 #: build/C/man3/sysv_signal.3:34
10186 "B<sighandler_t sysv_signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
10188 "B<sighandler_t sysv_signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
10190 #. type: Plain text
10191 #: build/C/man3/sysv_signal.3:39
10193 "The B<sysv_signal>() function takes the same arguments, and performs the "
10194 "same task, as B<signal>(2)."
10196 "B<sysv_signal>() 関数は B<signal>(2) と同じ引き数をとり、同じ処理を実行す"
10199 #. type: Plain text
10200 #: build/C/man3/sysv_signal.3:49
10202 "However B<sysv_signal>() provides the System V unreliable signal semantics, "
10203 "that is: a) the disposition of the signal is reset to the default when the "
10204 "handler is invoked; b) delivery of further instances of the signal is not "
10205 "blocked while the signal handler is executing; and c) if the handler "
10206 "interrupts (certain) blocking system calls, then the system call is not "
10207 "automatically restarted."
10209 "しかしながら、 B<sysv_signal>() は System V の信頼性に欠けるシグナル処理方式"
10210 "を提供している。 信頼性に欠けるシグナル処理方式は以下の特徴を持つ。 a) ハンド"
10211 "ラが起動されると、シグナルの処理方法 (disposition) が デフォルトにリセットさ"
10212 "れる、 b) シグナルハンドラの実行中は、それ以降に発生した同じシグナルの配送が "
10213 "ブロックされない、 c) ハンドラが停止中の (blocking している) システムコールを"
10214 "中断した場合、 自動的に再開されないシステムコールがある。"
10216 #. type: Plain text
10217 #: build/C/man3/sysv_signal.3:55
10219 "The B<sysv_signal>() function returns the previous value of the signal "
10220 "handler, or B<SIG_ERR> on error."
10222 "B<sysv_signal>() 関数はシグナルハンドラの直前の値を返す。 エラーの場合、 "
10225 #. type: Plain text
10226 #: build/C/man3/sysv_signal.3:60
10227 msgid "This function is nonstandard."
10228 msgstr "この関数は非標準である。"
10230 #. type: Plain text
10231 #: build/C/man3/sysv_signal.3:66
10233 "Use of B<sysv_signal>() should be avoided; use B<sigaction>(2) instead."
10235 "B<sysv_signal>() の使用は避けるべきである。代わりに B<sigaction>(2) を使う"
10238 #. type: Plain text
10239 #: build/C/man3/sysv_signal.3:77
10241 "On older Linux systems, B<sysv_signal>() and B<signal>(2) were "
10242 "equivalent. But on newer systems, B<signal>(2) provides reliable signal "
10243 "semantics; see B<signal>(2) for details."
10245 "以前の Linux システムでは、 B<sysv_signal>() と B<signal>(2) は等価であっ"
10246 "た。しかし、新しめのシステムでは、 B<signal>(2) は信頼性のあるシグナル処理方"
10247 "式を提供している。 詳細は B<signal>(2) を参照。"
10249 #. type: Plain text
10250 #: build/C/man3/sysv_signal.3:90
10251 msgid "B<sigaction>(2), B<signal>(2), B<bsd_signal>(3), B<signal>(7)"
10252 msgstr "B<sigaction>(2), B<signal>(2), B<bsd_signal>(3), B<signal>(7)"
10255 #: build/C/man2/timer_create.2:29
10257 msgid "TIMER_CREATE"
10258 msgstr "TIMER_CREATE"
10261 #: build/C/man2/timer_create.2:29
10264 msgstr "2010-09-27"
10266 #. type: Plain text
10267 #: build/C/man2/timer_create.2:32
10268 msgid "timer_create - create a POSIX per-process timer"
10271 #. type: Plain text
10272 #: build/C/man2/timer_create.2:36
10275 "B<#include E<lt>signal.hE<gt>>\n"
10276 "B<#include E<lt>time.hE<gt>>\n"
10278 "B<#include E<lt>signal.hE<gt>>\n"
10279 "B<#include E<lt>time.hE<gt>>\n"
10281 #. type: Plain text
10282 #: build/C/man2/timer_create.2:39
10285 "B<int timer_create(clockid_t >I<clockid>B<, struct sigevent *>I<sevp>B<,>\n"
10286 "B< timer_t *>I<timerid>B<);>\n"
10288 "B<int timer_create(clockid_t >I<clockid>B<, struct sigevent *>I<sevp>B<,>\n"
10289 "B< timer_t *>I<timerid>B<);>\n"
10291 #. type: Plain text
10292 #: build/C/man2/timer_create.2:42 build/C/man2/timer_delete.2:34
10293 #: build/C/man2/timer_getoverrun.2:34 build/C/man2/timer_settime.2:38
10294 msgid "Link with I<-lrt>."
10297 #. type: Plain text
10298 #: build/C/man2/timer_create.2:50
10299 msgid "B<timer_create>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
10300 msgstr "B<timer_create>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
10302 #. type: Plain text
10303 #: build/C/man2/timer_create.2:58
10305 "B<timer_create>() creates a new per-process interval timer. The ID of the "
10306 "new timer is returned in the buffer pointed to by I<timerid>, which must be "
10307 "a non-NULL pointer. This ID is unique within the process, until the timer "
10308 "is deleted. The new timer is initially disarmed."
10311 #. type: Plain text
10312 #: build/C/man2/timer_create.2:63
10314 "The I<clockid> argument specifies the clock that the new timer uses to "
10315 "measure time. It can be specified as one of the following values:"
10319 #: build/C/man2/timer_create.2:63
10321 msgid "B<CLOCK_REALTIME>"
10322 msgstr "B<CLOCK_REALTIME>"
10324 #. type: Plain text
10325 #: build/C/man2/timer_create.2:66
10326 msgid "A settable system-wide real-time clock."
10330 #: build/C/man2/timer_create.2:66
10332 msgid "B<CLOCK_MONOTONIC>"
10333 msgstr "B<CLOCK_MONOTONIC>"
10335 #. Note: the CLOCK_MONOTONIC_RAW clock added for clock_gettime()
10336 #. in 2.6.28 is not supported for POSIX timers -- mtk, Feb 2009
10337 #. type: Plain text
10338 #: build/C/man2/timer_create.2:73
10340 "A nonsettable monotonically increasing clock that measures time from some "
10341 "unspecified point in the past that does not change after system startup."
10345 #: build/C/man2/timer_create.2:73
10347 msgid "B<CLOCK_PROCESS_CPUTIME_ID> (since Linux 2.6.12)"
10350 #. type: Plain text
10351 #: build/C/man2/timer_create.2:77
10353 "A clock that measures (user and system) CPU time consumed by (all of the "
10354 "threads in) the calling process."
10358 #: build/C/man2/timer_create.2:77
10360 msgid "B<CLOCK_THREAD_CPUTIME_ID> (since Linux 2.6.12)"
10363 #. The CLOCK_MONOTONIC_RAW that was added in 2.6.28 can't be used
10364 #. to create a timer -- mtk, Feb 2009
10365 #. type: Plain text
10366 #: build/C/man2/timer_create.2:83
10368 "A clock that measures (user and system) CPU time consumed by the calling "
10372 #. type: Plain text
10373 #: build/C/man2/timer_create.2:92
10375 "As well as the above values, I<clockid> can be specified as the I<clockid> "
10376 "returned by a call to B<clock_getcpuclockid>(3) or B<pthread_getcpuclockid>"
10380 #. type: Plain text
10381 #: build/C/man2/timer_create.2:101
10383 "The I<sevp> argument points to a I<sigevent> structure that specifies how "
10384 "the caller should be notified when the timer expires. For the definition "
10385 "and general details of this structure, see B<sigevent>(7)."
10388 #. type: Plain text
10389 #: build/C/man2/timer_create.2:105
10390 msgid "The I<sevp.sigev_notify> field can have the following values:"
10393 #. type: Plain text
10394 #: build/C/man2/timer_create.2:110
10396 "Don't asynchronously notify when the timer expires. Progress of the timer "
10397 "can be monitored using B<timer_gettime>(2)."
10400 #. type: Plain text
10401 #: build/C/man2/timer_create.2:128
10403 "Upon timer expiration, generate the signal I<sigev_signo> for the process. "
10404 "See B<sigevent>(7) for general details. The I<si_code> field of the "
10405 "I<siginfo_t> structure will be set to B<SI_TIMER>. At any point in time, at "
10406 "most one signal is queued to the process for a given timer; see "
10407 "B<timer_getoverrun>(2) for more details."
10410 #. type: Plain text
10411 #: build/C/man2/timer_create.2:136
10413 "Upon timer expiration, invoke I<sigev_notify_function> as if it were the "
10414 "start function of a new thread. See B<sigevent>(7) for details."
10417 #. type: Plain text
10418 #: build/C/man2/timer_create.2:150
10420 "As for B<SIGEV_SIGNAL>, but the signal is targeted at the thread whose ID is "
10421 "given in I<sigev_notify_thread_id>, which must be a thread in the same "
10422 "process as the caller. The I<sigev_notify_thread_id> field specifies a "
10423 "kernel thread ID, that is, the value returned by B<clone>(2) or B<gettid>"
10424 "(2). This flag is only intended for use by threading libraries."
10427 #. type: Plain text
10428 #: build/C/man2/timer_create.2:165
10430 "Specifying I<sevp> as NULL is equivalent to specifying a pointer to a "
10431 "I<sigevent> structure in which I<sigev_notify> is B<SIGEV_SIGNAL>, "
10432 "I<sigev_signo> is B<SIGALRM>, and I<sigev_value.sival_int> is the timer ID."
10435 #. type: Plain text
10436 #: build/C/man2/timer_create.2:173
10438 "On success, B<timer_create>() returns 0, and the ID of the new timer is "
10439 "placed in I<*timerid>. On failure, -1 is returned, and I<errno> is set to "
10440 "indicate the error."
10443 #. type: Plain text
10444 #: build/C/man2/timer_create.2:177
10445 msgid "Temporary error during kernel allocation of timer structures."
10448 #. type: Plain text
10449 #: build/C/man2/timer_create.2:185
10451 "Clock ID, I<sigev_notify>, I<sigev_signo>, or I<sigev_notify_thread_id> is "
10455 #. glibc layer: malloc()
10456 #. type: Plain text
10457 #: build/C/man2/timer_create.2:189
10458 msgid "Could not allocate memory."
10461 #. type: Plain text
10462 #: build/C/man2/timer_create.2:191 build/C/man2/timer_delete.2:64
10463 #: build/C/man2/timer_getoverrun.2:94
10464 msgid "This system call is available since Linux 2.6."
10467 #. type: Plain text
10468 #: build/C/man2/timer_create.2:196
10469 msgid "A program may create multiple interval timers using B<timer_create>()."
10472 #. type: Plain text
10473 #: build/C/man2/timer_create.2:201
10475 "Timers are not inherited by the child of a B<fork>(2), and are disarmed and "
10476 "deleted during an B<execve>(2)."
10479 #. type: Plain text
10480 #: build/C/man2/timer_create.2:209
10482 "The kernel preallocates a \"queued real-time signal\" for each timer created "
10483 "using B<timer_create>(). Consequently, the number of timers is limited by "
10484 "the B<RLIMIT_SIGPENDING> resource limit (see B<setrlimit>(2))."
10487 #. type: Plain text
10488 #: build/C/man2/timer_create.2:214
10490 "The timers created by B<timer_create>() are commonly known as \"POSIX "
10491 "(interval) timers\". The POSIX timers API consists of the following "
10495 #. type: Plain text
10496 #: build/C/man2/timer_create.2:217
10497 msgid "B<timer_create>(): Create a timer."
10500 #. type: Plain text
10501 #: build/C/man2/timer_create.2:220
10502 msgid "B<timer_settime>(2): Arm (start) or disarm (stop) a timer."
10505 #. type: Plain text
10506 #: build/C/man2/timer_create.2:224
10508 "B<timer_gettime>(2): Fetch the time remaining until the next expiration of a "
10509 "timer, along with the interval setting of the timer."
10512 #. type: Plain text
10513 #: build/C/man2/timer_create.2:227
10515 "B<timer_getoverrun>(2): Return the overrun count for the last timer "
10519 #. type: Plain text
10520 #: build/C/man2/timer_create.2:230
10521 msgid "B<timer_delete>(2): Disarm and delete a timer."
10524 #. type: Plain text
10525 #: build/C/man2/timer_create.2:233
10527 "Part of the implementation of the POSIX timers API is provided by glibc. In "
10531 #. type: Plain text
10532 #: build/C/man2/timer_create.2:237
10534 "The functionality for B<SIGEV_THREAD> is implemented within glibc, rather "
10538 #. See the glibc source file kernel-posix-timers.h for the structure
10539 #. that glibc uses to map userspace timer IDs to kernel timer IDs
10540 #. The kernel-level timer ID is exposed via siginfo.si_tid.
10541 #. type: Plain text
10542 #: build/C/man2/timer_create.2:243
10544 "The timer IDs presented at user level are maintained by glibc, which maps "
10545 "these IDs to the timer IDs employed by the kernel."
10548 #. type: Plain text
10549 #: build/C/man2/timer_create.2:251
10551 "The POSIX timers system calls first appeared in Linux 2.6. Prior to this, "
10552 "glibc provided an incomplete userspace implementation (B<CLOCK_REALTIME> "
10553 "timers only) using POSIX threads, and current glibc falls back to this "
10554 "implementation on systems running pre-2.6 Linux kernels."
10557 #. type: Plain text
10558 #: build/C/man2/timer_create.2:263
10560 "The program below takes two arguments: a sleep period in seconds, and a "
10561 "timer frequency in nanoseconds. The program establishes a handler for the "
10562 "signal it uses for the timer, blocks that signal, creates and arms a timer "
10563 "that expires with the given frequency, sleeps for the specified number of "
10564 "seconds, and then unblocks the timer signal. Assuming that the timer "
10565 "expired at least once while the program slept, the signal handler will be "
10566 "invoked, and the handler displays some information about the timer "
10567 "notification. The program terminates after one invocation of the signal "
10571 #. type: Plain text
10572 #: build/C/man2/timer_create.2:268
10574 "In the following example run, the program sleeps for 1 second, after "
10575 "creating a timer that has a frequency of 100 nanoseconds. By the time the "
10576 "signal is unblocked and delivered, there have been around ten million "
10580 #. type: Plain text
10581 #: build/C/man2/timer_create.2:280
10584 "$ B<./a.out 1 100>\n"
10585 "Establishing handler for signal 34\n"
10586 "Blocking signal 34\n"
10587 "timer ID is 0x804c008\n"
10588 "Sleeping for 1 seconds\n"
10589 "Unblocking signal 34\n"
10590 "Caught signal 34\n"
10591 " sival_ptr = 0xbfb174f4; *sival_ptr = 0x804c008\n"
10592 " overrun count = 10004886\n"
10596 #: build/C/man2/timer_create.2:282
10598 msgid "Program Source"
10601 #. type: Plain text
10602 #: build/C/man2/timer_create.2:290
10605 "#include E<lt>stdlib.hE<gt>\n"
10606 "#include E<lt>unistd.hE<gt>\n"
10607 "#include E<lt>stdio.hE<gt>\n"
10608 "#include E<lt>signal.hE<gt>\n"
10609 "#include E<lt>time.hE<gt>\n"
10611 "#include E<lt>stdlib.hE<gt>\n"
10612 "#include E<lt>unistd.hE<gt>\n"
10613 "#include E<lt>stdio.hE<gt>\n"
10614 "#include E<lt>signal.hE<gt>\n"
10615 "#include E<lt>time.hE<gt>\n"
10617 #. type: Plain text
10618 #: build/C/man2/timer_create.2:293
10621 "#define CLOCKID CLOCK_REALTIME\n"
10622 "#define SIG SIGRTMIN\n"
10624 "#define CLOCKID CLOCK_REALTIME\n"
10625 "#define SIG SIGRTMIN\n"
10627 #. type: Plain text
10628 #: build/C/man2/timer_create.2:296
10631 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
10634 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
10637 #. type: Plain text
10638 #: build/C/man2/timer_create.2:302
10642 "print_siginfo(siginfo_t *si)\n"
10644 " timer_t *tidp;\n"
10648 "print_siginfo(siginfo_t *si)\n"
10650 " timer_t *tidp;\n"
10653 #. type: Plain text
10654 #: build/C/man2/timer_create.2:304
10656 msgid " tidp = si-E<gt>si_value.sival_ptr;\n"
10657 msgstr " tidp = si-E<gt>si_value.sival_ptr;\n"
10659 #. type: Plain text
10660 #: build/C/man2/timer_create.2:307
10663 " printf(\" sival_ptr = %p; \", si-E<gt>si_value.sival_ptr);\n"
10664 " printf(\" *sival_ptr = 0x%lx\\en\", (long) *tidp);\n"
10666 " printf(\" sival_ptr = %p; \", si-E<gt>si_value.sival_ptr);\n"
10667 " printf(\" *sival_ptr = 0x%lx\\en\", (long) *tidp);\n"
10669 #. type: Plain text
10670 #: build/C/man2/timer_create.2:314
10673 " or = timer_getoverrun(*tidp);\n"
10675 " errExit(\"timer_getoverrun\");\n"
10677 " printf(\" overrun count = %d\\en\", or);\n"
10680 " or = timer_getoverrun(*tidp);\n"
10682 " errExit(\"timer_getoverrun\");\n"
10684 " printf(\" overrun count = %d\\en\", or);\n"
10687 #. type: Plain text
10688 #: build/C/man2/timer_create.2:321
10692 "handler(int sig, siginfo_t *si, void *uc)\n"
10694 " /* Note: calling printf() from a signal handler is not\n"
10695 " strictly correct, since printf() is not async-signal-safe;\n"
10696 " see signal(7) */\n"
10699 "handler(int sig, siginfo_t *si, void *uc)\n"
10701 " /* Note: calling printf() from a signal handler is not\n"
10702 " strictly correct, since printf() is not async-signal-safe;\n"
10703 " see signal(7) */\n"
10705 #. type: Plain text
10706 #: build/C/man2/timer_create.2:326
10709 " printf(\"Caught signal %d\\en\", sig);\n"
10710 " print_siginfo(si);\n"
10711 " signal(sig, SIG_IGN);\n"
10714 " printf(\"Caught signal %d\\en\", sig);\n"
10715 " print_siginfo(si);\n"
10716 " signal(sig, SIG_IGN);\n"
10719 #. type: Plain text
10720 #: build/C/man2/timer_create.2:336
10724 "main(int argc, char *argv[])\n"
10726 " timer_t timerid;\n"
10727 " struct sigevent sev;\n"
10728 " struct itimerspec its;\n"
10729 " long long freq_nanosecs;\n"
10730 " sigset_t mask;\n"
10731 " struct sigaction sa;\n"
10734 "main(int argc, char *argv[])\n"
10736 " timer_t timerid;\n"
10737 " struct sigevent sev;\n"
10738 " struct itimerspec its;\n"
10739 " long long freq_nanosecs;\n"
10740 " sigset_t mask;\n"
10741 " struct sigaction sa;\n"
10743 #. type: Plain text
10744 #: build/C/man2/timer_create.2:342
10747 " if (argc != 3) {\n"
10748 " fprintf(stderr, \"Usage: %s E<lt>sleep-secsE<gt> E<lt>freq-nanosecsE<gt>\\en\",\n"
10750 " exit(EXIT_FAILURE);\n"
10753 " if (argc != 3) {\n"
10754 " fprintf(stderr, \"Usage: %s E<lt>sleep-secsE<gt> E<lt>freq-nanosecsE<gt>\\en\",\n"
10756 " exit(EXIT_FAILURE);\n"
10759 #. type: Plain text
10760 #: build/C/man2/timer_create.2:344
10762 msgid " /* Establish handler for timer signal */\n"
10763 msgstr " /* Establish handler for timer signal */\n"
10765 #. type: Plain text
10766 #: build/C/man2/timer_create.2:351
10769 " printf(\"Establishing handler for signal %d\\en\", SIG);\n"
10770 " sa.sa_flags = SA_SIGINFO;\n"
10771 " sa.sa_sigaction = handler;\n"
10772 " sigemptyset(&sa.sa_mask);\n"
10773 " if (sigaction(SIG, &sa, NULL) == -1)\n"
10774 " errExit(\"sigaction\");\n"
10776 " printf(\"Establishing handler for signal %d\\en\", SIG);\n"
10777 " sa.sa_flags = SA_SIGINFO;\n"
10778 " sa.sa_sigaction = handler;\n"
10779 " sigemptyset(&sa.sa_mask);\n"
10780 " if (sigaction(SIG, &sa, NULL) == -1)\n"
10781 " errExit(\"sigaction\");\n"
10783 #. type: Plain text
10784 #: build/C/man2/timer_create.2:353
10786 msgid " /* Block timer signal temporarily */\n"
10787 msgstr " /* Block timer signal temporarily */\n"
10789 #. type: Plain text
10790 #: build/C/man2/timer_create.2:359
10793 " printf(\"Blocking signal %d\\en\", SIG);\n"
10794 " sigemptyset(&mask);\n"
10795 " sigaddset(&mask, SIG);\n"
10796 " if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1)\n"
10797 " errExit(\"sigprocmask\");\n"
10799 " printf(\"Blocking signal %d\\en\", SIG);\n"
10800 " sigemptyset(&mask);\n"
10801 " sigaddset(&mask, SIG);\n"
10802 " if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1)\n"
10803 " errExit(\"sigprocmask\");\n"
10805 #. type: Plain text
10806 #: build/C/man2/timer_create.2:361
10808 msgid " /* Create the timer */\n"
10809 msgstr " /* Create the timer */\n"
10811 #. type: Plain text
10812 #: build/C/man2/timer_create.2:367
10815 " sev.sigev_notify = SIGEV_SIGNAL;\n"
10816 " sev.sigev_signo = SIG;\n"
10817 " sev.sigev_value.sival_ptr = &timerid;\n"
10818 " if (timer_create(CLOCKID, &sev, &timerid) == -1)\n"
10819 " errExit(\"timer_create\");\n"
10821 " sev.sigev_notify = SIGEV_SIGNAL;\n"
10822 " sev.sigev_signo = SIG;\n"
10823 " sev.sigev_value.sival_ptr = &timerid;\n"
10824 " if (timer_create(CLOCKID, &sev, &timerid) == -1)\n"
10825 " errExit(\"timer_create\");\n"
10827 #. type: Plain text
10828 #: build/C/man2/timer_create.2:369
10830 msgid " printf(\"timer ID is 0x%lx\\en\", (long) timerid);\n"
10831 msgstr " printf(\"timer ID is 0x%lx\\en\", (long) timerid);\n"
10833 #. type: Plain text
10834 #: build/C/man2/timer_create.2:371
10836 msgid " /* Start the timer */\n"
10837 msgstr " /* Start the timer */\n"
10839 #. type: Plain text
10840 #: build/C/man2/timer_create.2:377
10843 " freq_nanosecs = atoll(argv[2]);\n"
10844 " its.it_value.tv_sec = freq_nanosecs / 1000000000;\n"
10845 " its.it_value.tv_nsec = freq_nanosecs % 1000000000;\n"
10846 " its.it_interval.tv_sec = its.it_value.tv_sec;\n"
10847 " its.it_interval.tv_nsec = its.it_value.tv_nsec;\n"
10849 " freq_nanosecs = atoll(argv[2]);\n"
10850 " its.it_value.tv_sec = freq_nanosecs / 1000000000;\n"
10851 " its.it_value.tv_nsec = freq_nanosecs % 1000000000;\n"
10852 " its.it_interval.tv_sec = its.it_value.tv_sec;\n"
10853 " its.it_interval.tv_nsec = its.it_value.tv_nsec;\n"
10855 #. type: Plain text
10856 #: build/C/man2/timer_create.2:380
10859 " if (timer_settime(timerid, 0, &its, NULL) == -1)\n"
10860 " errExit(\"timer_settime\");\n"
10862 " if (timer_settime(timerid, 0, &its, NULL) == -1)\n"
10863 " errExit(\"timer_settime\");\n"
10865 #. type: Plain text
10866 #: build/C/man2/timer_create.2:383
10869 " /* Sleep for a while; meanwhile, the timer may expire\n"
10870 " multiple times */\n"
10872 " /* Sleep for a while; meanwhile, the timer may expire\n"
10873 " multiple times */\n"
10875 #. type: Plain text
10876 #: build/C/man2/timer_create.2:386
10879 " printf(\"Sleeping for %d seconds\\en\", atoi(argv[1]));\n"
10880 " sleep(atoi(argv[1]));\n"
10882 " printf(\"Sleeping for %d seconds\\en\", atoi(argv[1]));\n"
10883 " sleep(atoi(argv[1]));\n"
10885 #. type: Plain text
10886 #: build/C/man2/timer_create.2:389
10889 " /* Unlock the timer signal, so that timer notification\n"
10890 " can be delivered */\n"
10892 " /* Unlock the timer signal, so that timer notification\n"
10893 " can be delivered */\n"
10895 #. type: Plain text
10896 #: build/C/man2/timer_create.2:393
10899 " printf(\"Unblocking signal %d\\en\", SIG);\n"
10900 " if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1)\n"
10901 " errExit(\"sigprocmask\");\n"
10903 " printf(\"Unblocking signal %d\\en\", SIG);\n"
10904 " if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1)\n"
10905 " errExit(\"sigprocmask\");\n"
10907 #. type: Plain text
10908 #: build/C/man2/timer_create.2:396 build/C/man2/timerfd_create.2:533
10911 " exit(EXIT_SUCCESS);\n"
10914 " exit(EXIT_SUCCESS);\n"
10917 #. type: Plain text
10918 #: build/C/man2/timer_create.2:410
10920 "B<clock_gettime>(2), B<setitimer>(2), B<timer_delete>(2), B<timer_getoverrun>"
10921 "(2), B<timer_settime>(2), B<timerfd_create>(2), B<clock_getcpuclockid>(3), "
10922 "B<pthread_getcpuclockid>(3), B<pthreads>(7), B<sigevent>(7), B<signal>(7), "
10925 "B<clock_gettime>(2), B<setitimer>(2), B<timer_delete>(2), B<timer_getoverrun>"
10926 "(2), B<timer_settime>(2), B<timerfd_create>(2), B<clock_getcpuclockid>(3), "
10927 "B<pthread_getcpuclockid>(3), B<pthreads>(7), B<sigevent>(7), B<signal>(7), "
10931 #: build/C/man2/timer_delete.2:23
10933 msgid "TIMER_DELETE"
10934 msgstr "TIMER_DELETE"
10937 #: build/C/man2/timer_delete.2:23 build/C/man2/timer_getoverrun.2:23
10938 #: build/C/man2/timer_settime.2:23
10941 msgstr "2009-02-20"
10943 #. type: Plain text
10944 #: build/C/man2/timer_delete.2:26
10945 msgid "timer_delete - delete a POSIX per-process timer"
10948 #. type: Plain text
10949 #: build/C/man2/timer_delete.2:29 build/C/man2/timer_getoverrun.2:29
10950 #: build/C/man2/timer_settime.2:30
10952 msgid "B<#include E<lt>time.hE<gt>>\n"
10953 msgstr "B<#include E<lt>time.hE<gt>>\n"
10955 #. type: Plain text
10956 #: build/C/man2/timer_delete.2:31
10958 msgid "B<int timer_delete(timer_t >I<timerid>B<);>\n"
10959 msgstr "B<int timer_delete(timer_t >I<timerid>B<);>\n"
10961 #. type: Plain text
10962 #: build/C/man2/timer_delete.2:42
10963 msgid "B<timer_delete>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
10964 msgstr "B<timer_delete>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
10966 #. type: Plain text
10967 #: build/C/man2/timer_delete.2:50
10969 "B<timer_delete>() deletes the timer whose ID is given in I<timerid>. If "
10970 "the timer was armed at the time of this call, it is disarmed before being "
10971 "deleted. The treatment of any pending signal generated by the deleted timer "
10975 #. type: Plain text
10976 #: build/C/man2/timer_delete.2:57
10978 "On success, B<timer_delete>() returns 0. On failure, -1 is returned, and "
10979 "I<errno> is set to indicate the error."
10982 #. type: Plain text
10983 #: build/C/man2/timer_delete.2:62 build/C/man2/timer_getoverrun.2:92
10984 msgid "I<timerid> is not a valid timer ID."
10987 #. type: Plain text
10988 #: build/C/man2/timer_delete.2:72
10990 "B<clock_gettime>(2), B<timer_create>(2), B<timer_getoverrun>(2), "
10991 "B<timer_settime>(2), B<time>(7)"
10993 "B<clock_gettime>(2), B<timer_create>(2), B<timer_getoverrun>(2), "
10994 "B<timer_settime>(2), B<time>(7)"
10997 #: build/C/man2/timer_getoverrun.2:23
10999 msgid "TIMER_GETOVERRUN"
11000 msgstr "TIMER_GETOVERRUN"
11002 #. type: Plain text
11003 #: build/C/man2/timer_getoverrun.2:26
11004 msgid "timer_getoverrun - get overrun count for a POSIX per-process timer"
11007 #. type: Plain text
11008 #: build/C/man2/timer_getoverrun.2:31
11010 msgid "B<int timer_getoverrun(timer_t >I<timerid>B<);>\n"
11011 msgstr "B<int timer_getoverrun(timer_t >I<timerid>B<);>\n"
11013 #. type: Plain text
11014 #: build/C/man2/timer_getoverrun.2:42
11015 msgid "B<timer_getoverrun>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
11016 msgstr "B<timer_getoverrun>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
11018 #. type: Plain text
11019 #: build/C/man2/timer_getoverrun.2:53
11021 "B<timer_getoverrun>() returns the \"overrun count\" for the timer referred "
11022 "to by I<timerid>. An application can use the overrun count to accurately "
11023 "calculate the number of timer expirations that would have occurred over a "
11024 "given time interval. Timer overruns can occur both when receiving "
11025 "expiration notifications via signals (B<SIGEV_SIGNAL>), and via threads "
11026 "(B<SIGEV_THREAD>)."
11029 #. type: Plain text
11030 #: build/C/man2/timer_getoverrun.2:73
11032 "When expiration notifications are delivered via a signal, overruns can occur "
11033 "as follows. Regardless of whether or not a real-time signal is used for "
11034 "timer notifications, the system queues at most one signal per timer. (This "
11035 "is the behavior specified by POSIX.1-2001. The alternative, queuing one "
11036 "signal for each timer expiration, could easily result in overflowing the "
11037 "allowed limits for queued signals on the system.) Because of system "
11038 "scheduling delays, or because the signal may be temporarily blocked, there "
11039 "can be a delay between the time when the notification signal is generated "
11040 "and the time when it is delivered (e.g., caught by a signal handler) or "
11041 "accepted (e.g., using B<sigwaitinfo>(2)). In this interval, further timer "
11042 "expirations may occur. The timer overrun count is the number of additional "
11043 "timer expirations that occurred between the time when the signal was "
11044 "generated and when it was delivered or accepted."
11047 #. type: Plain text
11048 #: build/C/man2/timer_getoverrun.2:79
11050 "Timer overruns can also occur when expiration notifications are delivered "
11051 "via invocation of a thread, since there may be an arbitrary delay between an "
11052 "expiration of the timer and the invocation of the notification thread, and "
11053 "in that delay interval, additional timer expirations may occur"
11056 #. type: Plain text
11057 #: build/C/man2/timer_getoverrun.2:87
11059 "On success, B<timer_getoverrun>() returns the overrun count of the "
11060 "specified timer; this count may be 0 if no overruns have occurred. On "
11061 "failure, -1 is returned, and I<errno> is set to indicate the error."
11064 #. type: Plain text
11065 #: build/C/man2/timer_getoverrun.2:108
11067 "When timer notifications are delivered via signals (B<SIGEV_SIGNAL>), on "
11068 "Linux it is also possible to obtain the overrun count via the I<si_overrun> "
11069 "field of the I<siginfo_t> structure (see B<sigaction>(2)). This allows an "
11070 "application to avoid the overhead of making a system call to obtain the "
11071 "overrun count, but is a nonportable extension to POSIX.1-2001."
11074 #. FIXME . Austin bug filed, 11 Feb 09
11075 #. type: Plain text
11076 #: build/C/man2/timer_getoverrun.2:112
11078 "POSIX.1-2001 only discusses timer overruns in the context of timer "
11079 "notifications using signals."
11082 #. Bug filed: http://bugzilla.kernel.org/show_bug.cgi?id=12665
11083 #. http://thread.gmane.org/gmane.linux.kernel/113276/
11084 #. type: Plain text
11085 #: build/C/man2/timer_getoverrun.2:125
11087 "POSIX.1-2001 specifies that if the timer overrun count is equal to or "
11088 "greater than an implementation-defined maximum, B<DELAYTIMER_MAX>, then "
11089 "B<timer_getoverrun>() should return B<DELAYTIMER_MAX>. However, Linux does "
11090 "not implement this feature: instead, if the timer overrun value exceeds the "
11091 "maximum representable integer, the counter cycles, starting once more from "
11095 #. type: Plain text
11096 #: build/C/man2/timer_getoverrun.2:128 build/C/man2/timer_settime.2:208
11097 msgid "See B<timer_create>(2)."
11100 #. type: Plain text
11101 #: build/C/man2/timer_getoverrun.2:138
11103 "B<clock_gettime>(2), B<sigaction>(2), B<signalfd>(2), B<sigwaitinfo>(2), "
11104 "B<timer_create>(2), B<timer_delete>(2), B<timer_settime>(2), B<signal>(7), "
11107 "B<clock_gettime>(2), B<sigaction>(2), B<signalfd>(2), B<sigwaitinfo>(2), "
11108 "B<timer_create>(2), B<timer_delete>(2), B<timer_settime>(2), B<signal>(7), "
11112 #: build/C/man2/timer_settime.2:23
11114 msgid "TIMER_SETTIME"
11115 msgstr "TIMER_SETTIME"
11117 #. type: Plain text
11118 #: build/C/man2/timer_settime.2:27
11120 "timer_settime, timer_gettime - arm/disarm and fetch state of POSIX per-"
11124 #. type: Plain text
11125 #: build/C/man2/timer_settime.2:35
11128 "B<int timer_settime(timer_t >I<timerid>B<, int >I<flags>B<,>\n"
11129 "B< const struct itimerspec *>I<new_value>B<,>\n"
11130 "B< struct itimerspec * >I<old_value>B<);>\n"
11131 "B<int timer_gettime(timer_t >I<timerid>B<, struct itimerspec *>I<curr_value>B<);>\n"
11133 "B<int timer_settime(timer_t >I<timerid>B<, int >I<flags>B<,>\n"
11134 "B< const struct itimerspec *>I<new_value>B<,>\n"
11135 "B< struct itimerspec * >I<old_value>B<);>\n"
11136 "B<int timer_gettime(timer_t >I<timerid>B<, struct itimerspec *>I<curr_value>B<);>\n"
11138 #. type: Plain text
11139 #: build/C/man2/timer_settime.2:47
11141 "B<timer_settime>(), B<timer_gettime>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
11143 "B<timer_settime>(), B<timer_gettime>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
11145 #. type: Plain text
11146 #: build/C/man2/timer_settime.2:60
11148 "B<timer_settime>() arms or disarms the timer identified by I<timerid>. The "
11149 "I<new_value> argument is an I<itimerspec> structure that specifies the new "
11150 "initial value and the new interval for the timer. The I<itimerspec> "
11151 "structure is defined as follows:"
11154 #. type: Plain text
11155 #: build/C/man2/timer_settime.2:67 build/C/man2/timerfd_create.2:127
11158 "struct timespec {\n"
11159 " time_t tv_sec; /* Seconds */\n"
11160 " long tv_nsec; /* Nanoseconds */\n"
11163 "struct timespec {\n"
11164 " time_t tv_sec; /* Seconds */\n"
11165 " long tv_nsec; /* Nanoseconds */\n"
11168 #. type: Plain text
11169 #: build/C/man2/timer_settime.2:72
11172 "struct itimerspec {\n"
11173 " struct timespec it_interval; /* Timer interval */\n"
11174 " struct timespec it_value; /* Initial expiration */\n"
11177 "struct itimerspec {\n"
11178 " struct timespec it_interval; /* Timer interval */\n"
11179 " struct timespec it_value; /* Initial expiration */\n"
11182 #. type: Plain text
11183 #: build/C/man2/timer_settime.2:84
11185 "Each of the substructures of the I<itimerspec> structure is a I<timespec> "
11186 "structure that allows a time value to be specified in seconds and "
11187 "nanoseconds. These time values are measured according to the clock that was "
11188 "specified when the timer was created by B<timer_create>(2)"
11191 #. type: Plain text
11192 #: build/C/man2/timer_settime.2:98
11194 "If I<new_value-E<gt>it_value> specifies a nonzero value (i.e., either "
11195 "subfield is nonzero), then B<timer_settime>() arms (starts) the timer, "
11196 "setting it to initially expire at the given time. (If the timer was already "
11197 "armed, then the previous settings are overwritten.) If I<new_value-"
11198 "E<gt>it_value> specifies a zero value (i.e., both subfields are zero), then "
11199 "the timer is disarmed."
11202 #. type: Plain text
11203 #: build/C/man2/timer_settime.2:110
11205 "The I<new_value-E<gt>it_interval> field specifies the period of the timer, "
11206 "in seconds and nanoseconds. If this field is nonzero, then each time that "
11207 "an armed timer expires, the timer is reloaded from the value specified in "
11208 "I<new_value-E<gt>it_interval>. If I<new_value-E<gt>it_interval> specifies a "
11209 "zero value then the timer expires just once, at the time specified by "
11213 #. By experiment: the overrun count is set correctly, for CLOCK_REALTIME.
11214 #. type: Plain text
11215 #: build/C/man2/timer_settime.2:131
11217 "By default, the initial expiration time specified in I<new_value-"
11218 "E<gt>it_value> is interpreted relative to the current time on the timer's "
11219 "clock at the time of the call. This can be modified by specifying "
11220 "B<TIMER_ABSTIME> in I<flags>, in which case I<new_value-E<gt>it_value> is "
11221 "interpreted as an absolute value as measured on the timer's clock; that is, "
11222 "the timer will expire when the clock value reaches the value specified by "
11223 "I<new_value-E<gt>it_value>. If the specified absolute time has already "
11224 "passed, then the timer expires immediately, and the overrun count (see "
11225 "B<timer_getoverrun>(2)) will be set correctly."
11228 #. Similar remarks might apply with respect to process and thread CPU time
11229 #. clocks, but these clocks are not currently (2.6.28) settable on Linux.
11230 #. type: Plain text
11231 #: build/C/man2/timer_settime.2:141
11233 "If the value of the B<CLOCK_REALTIME> clock is adjusted while an absolute "
11234 "timer based on that clock is armed, then the expiration of the timer will be "
11235 "appropriately adjusted. Adjustments to the B<CLOCK_REALTIME> clock have no "
11236 "effect on relative timers based on that clock."
11239 #. type: Plain text
11240 #: build/C/man2/timer_settime.2:149
11242 "If I<old_value> is not NULL, then it returns the previous interval of the "
11243 "timer (in I<old_value-E<gt>it_interval>) and the amount of time until the "
11244 "timer would previously have next expired (in I<old_value-E<gt>it_value>)."
11247 #. type: Plain text
11248 #: build/C/man2/timer_settime.2:169
11250 "B<timer_gettime>() returns the time until next expiration, and the "
11251 "interval, for the timer specified by I<timerid>, in the buffer pointed to by "
11252 "I<curr_value>. The time remaining until the next timer expiration is "
11253 "returned in I<curr_value-E<gt>it_value>; this is always a relative value, "
11254 "regardless of whether the B<TIMER_ABSTIME> flag was used when arming the "
11255 "timer. If the value returned in I<curr_value-E<gt>it_value> is zero, then "
11256 "the timer is currently disarmed. The timer interval is returned in "
11257 "I<curr_value-E<gt>it_interval>. If the value returned in I<curr_value-"
11258 "E<gt>it_interval> is zero, then this is a \"one-shot\" timer."
11261 #. type: Plain text
11262 #: build/C/man2/timer_settime.2:178
11264 "On success, B<timer_settime>() and B<timer_gettime>() return 0. On error, "
11265 "-1 is returned, and I<errno> is set to indicate the error."
11268 #. type: Plain text
11269 #: build/C/man2/timer_settime.2:180
11270 msgid "These functions may fail with the following errors:"
11273 #. type: Plain text
11274 #: build/C/man2/timer_settime.2:187
11275 msgid "I<new_value>, I<old_value>, or I<curr_value> is not a valid pointer."
11278 #. FIXME . eventually: invalid value in flags
11279 #. type: Plain text
11280 #: build/C/man2/timer_settime.2:192
11281 msgid "I<timerid> is invalid."
11284 #. type: Plain text
11285 #: build/C/man2/timer_settime.2:195
11286 msgid "B<timer_settime>() may fail with the following errors:"
11289 #. type: Plain text
11290 #: build/C/man2/timer_settime.2:201
11292 "I<new_value.it_value> is negative; or I<new_value.it_value.tv_nsec> is "
11293 "negative or greater than 999,999,999."
11296 #. type: Plain text
11297 #: build/C/man2/timer_settime.2:203
11298 msgid "These system calls are available since Linux 2.6."
11301 #. type: Plain text
11302 #: build/C/man2/timer_settime.2:212
11303 msgid "B<timer_create>(2), B<timer_getoverrun>(2), B<time>(7)"
11304 msgstr "B<timer_create>(2), B<timer_getoverrun>(2), B<time>(7)"
11307 #: build/C/man2/timerfd_create.2:20
11309 msgid "TIMERFD_CREATE"
11310 msgstr "TIMERFD_CREATE"
11313 #: build/C/man2/timerfd_create.2:20
11316 msgstr "2011-09-14"
11318 #. type: Plain text
11319 #: build/C/man2/timerfd_create.2:24
11321 "timerfd_create, timerfd_settime, timerfd_gettime - timers that notify via "
11324 "timerfd_create, timerfd_settime, timerfd_gettime - ファイルディスクリプタ経由"
11327 #. type: Plain text
11328 #: build/C/man2/timerfd_create.2:27
11330 msgid "B<#include E<lt>sys/timerfd.hE<gt>>\n"
11331 msgstr "B<#include E<lt>sys/timerfd.hE<gt>>\n"
11333 #. type: Plain text
11334 #: build/C/man2/timerfd_create.2:29
11336 msgid "B<int timerfd_create(int >I<clockid>B<, int >I<flags>B<);>\n"
11337 msgstr "B<int timerfd_create(int >I<clockid>B<, int >I<flags>B<);>\n"
11339 #. type: Plain text
11340 #: build/C/man2/timerfd_create.2:33
11343 "B<int timerfd_settime(int >I<fd>B<, int >I<flags>B<,>\n"
11344 "B< const struct itimerspec *>I<new_value>B<,>\n"
11345 "B< struct itimerspec *>I<old_value>B<);>\n"
11347 "B<int timerfd_settime(int >I<fd>B<, int >I<flags>B<,>\n"
11348 "B< const struct itimerspec *>I<new_value>B<,>\n"
11349 "B< struct itimerspec *>I<old_value>B<);>\n"
11351 #. type: Plain text
11352 #: build/C/man2/timerfd_create.2:35
11354 msgid "B<int timerfd_gettime(int >I<fd>B<, struct itimerspec *>I<curr_value>B<);>\n"
11355 msgstr "B<int timerfd_gettime(int >I<fd>B<, struct itimerspec *>I<curr_value>B<);>\n"
11357 #. type: Plain text
11358 #: build/C/man2/timerfd_create.2:48
11360 "These system calls create and operate on a timer that delivers timer "
11361 "expiration notifications via a file descriptor. They provide an alternative "
11362 "to the use of B<setitimer>(2) or B<timer_create>(2), with the advantage "
11363 "that the file descriptor may be monitored by B<select>(2), B<poll>(2), and "
11366 "これらのシステムコールは、満了通知をファイルディスクリプタ経由で配送する タイ"
11367 "マーの生成と操作を行う。 これらは、 B<setitimer>(2) や B<timer_create>(2) "
11368 "を用いる方法の代わりとなるものであり、このファイルディスクリプタを B<select>"
11369 "(2), B<poll>(2), B<epoll>(7) で監視できるという利点がある。"
11371 #. type: Plain text
11372 #: build/C/man2/timerfd_create.2:60
11374 "The use of these three system calls is analogous to the use of "
11375 "B<timer_create>(2), B<timer_settime>(2), and B<timer_gettime>(2). (There is "
11376 "no analog of B<timer_getoverrun>(2), since that functionality is provided by "
11377 "B<read>(2), as described below.)"
11379 "これらのシステムコールを使うのは、それぞれ B<timer_create>(2), "
11380 "B<timer_settime>(2), B<timer_gettime>(2) を使うのと同様である "
11381 "(B<timer_getoverrun>(2) に対応するものはなく、以下で説明するように この機能"
11382 "は B<read>(2) により提供される)。"
11385 #: build/C/man2/timerfd_create.2:60
11387 msgid "timerfd_create()"
11388 msgstr "timerfd_create()"
11390 #. type: Plain text
11391 #: build/C/man2/timerfd_create.2:79
11393 "B<timerfd_create>() creates a new timer object, and returns a file "
11394 "descriptor that refers to that timer. The I<clockid> argument specifies the "
11395 "clock that is used to mark the progress of the timer, and must be either "
11396 "B<CLOCK_REALTIME> or B<CLOCK_MONOTONIC>. B<CLOCK_REALTIME> is a settable "
11397 "system-wide clock. B<CLOCK_MONOTONIC> is a nonsettable clock that is not "
11398 "affected by discontinuous changes in the system clock (e.g., manual changes "
11399 "to system time). The current value of each of these clocks can be retrieved "
11400 "using B<clock_gettime>(2)."
11402 "B<timerfd_create>() は新規のタイマーオブジェクトを生成し、そのタイマーを参照"
11403 "するファイル ディスクリプタを返す。 I<clockid> 引き数は、タイマーの進捗を管理"
11404 "するためのクロックを指定するもので、 B<CLOCK_REALTIME> か B<CLOCK_MONOTONIC> "
11405 "のいずれかでなければならない。 B<CLOCK_REALTIME> はシステム全体で使用されるク"
11406 "ロックで、このクロックは変更可能である。 B<CLOCK_MONOTONIC> は変更されること"
11407 "のないクロックで、(システム時刻の手動での変更などの) システムクロックの不連"
11408 "続な変化の影響を受けない。 これらのクロックの現在の値は B<clock_gettime>(2) "
11411 #. type: Plain text
11412 #: build/C/man2/timerfd_create.2:84
11414 "Starting with Linux 2.6.27, the following values may be bitwise ORed in "
11415 "I<flags> to change the behavior of B<timerfd_create>():"
11417 "Linux 2.6.27 以降では、 以下の値のいくつかをビット単位の論理和 (OR) で指定す"
11418 "ることで、 B<timerfd_create>() の振舞いを変更することができる。"
11421 #: build/C/man2/timerfd_create.2:84
11423 msgid "B<TFD_NONBLOCK>"
11424 msgstr "B<TFD_NONBLOCK>"
11427 #: build/C/man2/timerfd_create.2:92
11429 msgid "B<TFD_CLOEXEC>"
11430 msgstr "B<TFD_CLOEXEC>"
11432 #. type: Plain text
11433 #: build/C/man2/timerfd_create.2:106
11435 "In Linux versions up to and including 2.6.26, I<flags> must be specified as "
11438 "バージョン 2.6.26 以前の Linux では、 I<flags> 引き数は未使用であり、0 を指定"
11442 #: build/C/man2/timerfd_create.2:106
11444 msgid "timerfd_settime()"
11445 msgstr "timerfd_settime()"
11447 #. type: Plain text
11448 #: build/C/man2/timerfd_create.2:111
11450 "B<timerfd_settime>() arms (starts) or disarms (stops) the timer referred "
11451 "to by the file descriptor I<fd>."
11453 "B<timerfd_settime>() は、ファイルディスクリプタ I<fd> により参照されるタイ"
11456 #. type: Plain text
11457 #: build/C/man2/timerfd_create.2:120
11459 "The I<new_value> argument specifies the initial expiration and interval for "
11460 "the timer. The I<itimer> structure used for this argument contains two "
11461 "fields, each of which is in turn a structure of type I<timespec>:"
11463 "I<new_value> 引き数は、タイマーの満了時間 (expiration) の初期値と間隔 "
11464 "(interval) を 指定する。この引き数で使用されている I<itimerspec> 構造体には "
11465 "2 つのフィールドがあり、各フィールドは I<timespec> 型の構造体である。"
11467 #. type: Plain text
11468 #: build/C/man2/timerfd_create.2:132
11471 "struct itimerspec {\n"
11472 " struct timespec it_interval; /* Interval for periodic timer */\n"
11473 " struct timespec it_value; /* Initial expiration */\n"
11476 "struct itimerspec {\n"
11477 " struct timespec it_interval; /* Interval for periodic timer */\n"
11478 " struct timespec it_value; /* Initial expiration */\n"
11481 #. type: Plain text
11482 #: build/C/man2/timerfd_create.2:144
11484 "I<new_value.it_value> specifies the initial expiration of the timer, in "
11485 "seconds and nanoseconds. Setting either field of I<new_value.it_value> to a "
11486 "nonzero value arms the timer. Setting both fields of I<new_value.it_value> "
11487 "to zero disarms the timer."
11489 "I<new_value.it_value> はタイマーの満了時間の初期値を、秒とナノ秒で指定する。 "
11490 "I<new_value.it_value> のフィールドのうち少なくとも一方に 0 以外の値を設定する"
11491 "と、 タイマーが開始される。 両方のフィールドに 0 を設定すると、タイマーが停止"
11494 #. type: Plain text
11495 #: build/C/man2/timerfd_create.2:153
11497 "Setting one or both fields of I<new_value.it_interval> to nonzero values "
11498 "specifies the period, in seconds and nanoseconds, for repeated timer "
11499 "expirations after the initial expiration. If both fields of I<new_value."
11500 "it_interval> are zero, the timer expires just once, at the time specified by "
11501 "I<new_value.it_value>."
11503 "I<new_value.it_interval> はタイマーの一回目の満了後に繰り返しタイマーの満了間"
11504 "隔を、秒とナノ秒で指定する。 I<new_value.it_interval> のフィールドのうち少な"
11505 "くとも一方に 0 以外の値を設定すると、 繰り返しタイマーが有効になる。 両方の"
11506 "フィールドに 0 を設定した場合、タイマーは I<new_value.it_value> で指定された"
11507 "時間後に、一回だけ満了して停止する。"
11509 #. type: Plain text
11510 #: build/C/man2/timerfd_create.2:169
11512 "The I<flags> argument is either 0, to start a relative timer (I<new_value."
11513 "it_value> specifies a time relative to the current value of the clock "
11514 "specified by I<clockid>), or B<TFD_TIMER_ABSTIME>, to start an absolute "
11515 "timer (I<new_value.it_value> specifies an absolute time for the clock "
11516 "specified by I<clockid>; that is, the timer will expire when the value of "
11517 "that clock reaches the value specified in I<new_value.it_value>)."
11519 "I<flags> 引き数には 0 か B<TFD_TIMER_ABSTIME> を指定する。 0 は相対時刻\n"
11520 "タイマーを意味し、 I<new_value.it_value> では I<clockid> で指定された\n"
11521 "クロックの現在の値からの相対的な時刻を指定する。 B<TFD_TIMER_ABSTIME>\n"
11522 "は絶対時刻タイマーを意味し、 I<new_value.it_interval> では I<clockid>\n"
11523 "で指定されたクロックの絶対時刻を指定する。\n"
11524 "つまり、クロックの値が I<new_value.it_interval> で指定された時刻に\n"
11527 #. type: Plain text
11528 #: build/C/man2/timerfd_create.2:180
11530 "If the I<old_value> argument is not NULL, then the I<itimerspec> structure "
11531 "that it points to is used to return the setting of the timer that was "
11532 "current at the time of the call; see the description of B<timerfd_gettime>"
11535 "I<old_value> 引き数が NULL でない場合、 I<old_value> 引き数が指す\n"
11536 "I<itimerspec> 構造体は、 B<timerfd_settime>() を呼び出した時点での\n"
11537 "タイマーの設定を返すのに使用される。\n"
11538 "下記の B<timerfd_gettime>() の説明を参照。"
11541 #: build/C/man2/timerfd_create.2:180
11543 msgid "timerfd_gettime()"
11544 msgstr "timerfd_gettime()"
11546 #. type: Plain text
11547 #: build/C/man2/timerfd_create.2:189
11549 "B<timerfd_gettime>() returns, in I<curr_value>, an I<itimerspec> structure "
11550 "that contains the current setting of the timer referred to by the file "
11551 "descriptor I<fd>."
11553 "B<timerfd_gettime>() は、ファイルディスクリプタ I<fd> で参照されるタイマーの"
11554 "現在の設定が入った I<itimerspec> 構造体を、 I<curr_value> に格納して返す。"
11556 #. type: Plain text
11557 #: build/C/man2/timerfd_create.2:199
11559 "The I<it_value> field returns the amount of time until the timer will next "
11560 "expire. If both fields of this structure are zero, then the timer is "
11561 "currently disarmed. This field always contains a relative value, regardless "
11562 "of whether the B<TFD_TIMER_ABSTIME> flag was specified when setting the "
11565 "I<it_value> フィールドは、タイマーが次に満了するまでの残り時間を返す。 この構"
11566 "造体の両方のフィールドが 0 であれば、タイマーは現在停止している。 タイマー設"
11567 "定時に B<TFD_TIMER_ABSTIME> フラグが指定されたかに関わらず、このフィールドは"
11570 #. type: Plain text
11571 #: build/C/man2/timerfd_create.2:206
11573 "The I<it_interval> field returns the interval of the timer. If both fields "
11574 "of this structure are zero, then the timer is set to expire just once, at "
11575 "the time specified by I<curr_value.it_value>."
11577 "I<it_interval> フィールドは、タイマーの間隔を返す。 この構造体の両方のフィー"
11578 "ルドが 0 であれば、タイマーは I<new_value.it_value> で指定された時間後に一回"
11579 "だけ満了して停止するように設定されている。"
11582 #: build/C/man2/timerfd_create.2:206
11584 msgid "Operating on a timer file descriptor"
11585 msgstr "タイマー・ファイルディスクリプタに対する操作"
11587 #. type: Plain text
11588 #: build/C/man2/timerfd_create.2:210
11590 "The file descriptor returned by B<timerfd_create>() supports the following "
11593 "B<timerfd_create>() が返すファイルディスクリプタは以下の操作をサポートしてい"
11596 #. type: Plain text
11597 #: build/C/man2/timerfd_create.2:224
11599 "If the timer has already expired one or more times since its settings were "
11600 "last modified using B<timerfd_settime>(), or since the last successful "
11601 "B<read>(2), then the buffer given to B<read>(2) returns an unsigned 8-byte "
11602 "integer (I<uint64_t>) containing the number of expirations that have "
11603 "occurred. (The returned value is in host byte order, i.e., the native byte "
11604 "order for integers on the host machine.)"
11606 "B<timerfd_settime>() を使ってタイマーの設定が最後変更されて以降、または "
11607 "B<read>(2) の呼び出しに最後に成功して以降に、タイマーの満了が一回以上発生し"
11608 "ていれば、 B<read>(2) に渡されたバッファに、タイマー満了回数を示す 8 バイト"
11609 "の unsigned 型の整数 (I<uint64_t>) が返される (返される値はホストバイトオー"
11610 "ダ、つまりそのホストマシンにおける 整数の通常のバイトオーダである)。"
11612 #. type: Plain text
11613 #: build/C/man2/timerfd_create.2:237
11615 "If no timer expirations have occurred at the time of the B<read>(2), then "
11616 "the call either blocks until the next timer expiration, or fails with the "
11617 "error B<EAGAIN> if the file descriptor has been made nonblocking (via the "
11618 "use of the B<fcntl>(2) B<F_SETFL> operation to set the B<O_NONBLOCK> flag)."
11620 "B<read>(2) を行った時点でタイマーの満了が発生していなければ、 B<read>(2) は"
11621 "停止 (block) する、もしくはファイルディスクリプタが 非停止 (nonblocking) に設"
11622 "定されている場合はエラー B<EAGAIN> で失敗する (非停止モードにするには、 "
11623 "B<fcntl>(2) の B<F_SETFL> 命令で B<O_NONBLOCK> フラグをセットする)。"
11625 #. type: Plain text
11626 #: build/C/man2/timerfd_create.2:243
11628 "A B<read>(2) will fail with the error B<EINVAL> if the size of the supplied "
11629 "buffer is less than 8 bytes."
11631 "渡されたバッファの大きさが 8 バイト未満の場合、 B<read>(2) はエラー "
11634 #. type: Plain text
11635 #: build/C/man2/timerfd_create.2:254
11637 "The file descriptor is readable (the B<select>(2) I<readfds> argument; the "
11638 "B<poll>(2) B<POLLIN> flag) if one or more timer expirations have occurred."
11640 "一つ以上のタイマー満了が発生していれば、 ファイルディスクリプタは読み出し可能"
11641 "となる (B<select>(2) の I<readfds> 引き数や B<poll>(2) の B<POLLIN> フラ"
11644 #. type: Plain text
11645 #: build/C/man2/timerfd_create.2:261
11647 "The file descriptor also supports the other file-descriptor multiplexing "
11648 "APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
11650 "このファイルディスクリプタは、他のファイルディスクリプタ多重 API である "
11651 "B<pselect>(2), B<ppoll>(2), B<epoll>(7) もサポートしている。"
11653 #. type: Plain text
11654 #: build/C/man2/timerfd_create.2:268
11656 "When the file descriptor is no longer required it should be closed. When "
11657 "all file descriptors associated with the same timer object have been closed, "
11658 "the timer is disarmed and its resources are freed by the kernel."
11660 "ファイルディスクリプタがそれ以降は必要なくなった際には、クローズすべきであ"
11661 "る。 同じ timer オブジェクトに関連付けられたファイルディスクリプタが全て ク"
11662 "ローズされると、そのタイマーは解除され、 そのオブジェクト用の資源がカーネルに"
11665 #. type: Plain text
11666 #: build/C/man2/timerfd_create.2:280
11668 "After a B<fork>(2), the child inherits a copy of the file descriptor created "
11669 "by B<timerfd_create>(). The file descriptor refers to the same underlying "
11670 "timer object as the corresponding file descriptor in the parent, and B<read>"
11671 "(2)s in the child will return information about expirations of the timer."
11673 "B<fork>(2) が行われると、子プロセスは B<timerfd_create>() により生成された"
11674 "ファイルディスクリプタのコピーを 継承する。そのファイルディスクリプタは、親プ"
11675 "ロセスの対応する ファイルディスクリプタと同じタイマーオブジェクトを参照してお"
11676 "り、 子プロセスの B<read>(2) でも同じタイマーの満了に関する情報が返される。"
11678 #. type: Plain text
11679 #: build/C/man2/timerfd_create.2:286
11681 "A file descriptor created by B<timerfd_create>() is preserved across "
11682 "B<execve>(2), and continues to generate timer expirations if the timer was "
11685 "B<execve>(2) の前後で B<timerfd_create>() により生成されたファイルディスク"
11686 "リプタは保持され、 タイマーが開始されていた場合にはタイマーの満了が発生し続け"
11689 #. type: Plain text
11690 #: build/C/man2/timerfd_create.2:293
11692 "On success, B<timerfd_create>() returns a new file descriptor. On error, "
11693 "-1 is returned and I<errno> is set to indicate the error."
11695 "成功すると、 B<timerfd_create>() は新しいファイルディスクリプタを返す。 エ"
11696 "ラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
11698 #. type: Plain text
11699 #: build/C/man2/timerfd_create.2:301
11701 "B<timerfd_settime>() and B<timerfd_gettime>() return 0 on success; on "
11702 "error they return -1, and set I<errno> to indicate the error."
11704 "B<timerfd_settime>() と B<timerfd_gettime>() は成功すると 0 を返す。 エラー"
11705 "の場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
11707 #. type: Plain text
11708 #: build/C/man2/timerfd_create.2:304
11709 msgid "B<timerfd_create>() can fail with the following errors:"
11710 msgstr "B<timerfd_create>() は以下のエラーで失敗する可能性がある。"
11712 #. type: Plain text
11713 #: build/C/man2/timerfd_create.2:312
11715 "The I<clockid> argument is neither B<CLOCK_MONOTONIC> nor B<CLOCK_REALTIME>;"
11717 "I<clockid> 引き数が B<CLOCK_MONOTONIC> でも B<CLOCK_REALTIME> でもない。"
11719 #. type: Plain text
11720 #: build/C/man2/timerfd_create.2:332
11721 msgid "There was insufficient kernel memory to create the timer."
11722 msgstr "タイマーを作成するのに十分なカーネルメモリがなかった。"
11724 #. type: Plain text
11725 #: build/C/man2/timerfd_create.2:337
11727 "B<timerfd_settime>() and B<timerfd_gettime>() can fail with the following "
11730 "B<timerfd_settime>() と B<timerfd_gettime>() は以下のエラーで失敗する可能性"
11733 #. type: Plain text
11734 #: build/C/man2/timerfd_create.2:341
11735 msgid "I<fd> is not a valid file descriptor."
11736 msgstr "I<fd> が有効なファイルディスクリプタでない。"
11738 #. type: Plain text
11739 #: build/C/man2/timerfd_create.2:352
11740 msgid "I<fd> is not a valid timerfd file descriptor."
11741 msgstr "I<fd> が有効な timerfd ファイルディスクリプタでない。"
11743 #. type: Plain text
11744 #: build/C/man2/timerfd_create.2:355
11745 msgid "B<timerfd_settime>() can also fail with the following errors:"
11746 msgstr "B<timerfd_settime>() は以下のエラーで失敗することもある。"
11748 #. type: Plain text
11749 #: build/C/man2/timerfd_create.2:361
11751 "I<new_value> is not properly initialized (one of the I<tv_nsec> falls "
11752 "outside the range zero to 999,999,999)."
11754 "I<new_value> が適切に初期化されていない (I<tv_nsec> の一つが 0 から "
11755 "999,999,999 までの範囲に入っていない)。"
11757 #. This case only checked since 2.6.29, and 2.2.2[78].some-stable-version.
11758 #. In older kernel versions, no check was made for invalid flags.
11759 #. type: Plain text
11760 #: build/C/man2/timerfd_create.2:367
11761 msgid "I<flags> is invalid."
11762 msgstr "I<flags> が無効である。"
11764 #. type: Plain text
11765 #: build/C/man2/timerfd_create.2:370
11767 "These system calls are available on Linux since kernel 2.6.25. Library "
11768 "support is provided by glibc since version 2.8."
11770 "これらのシステムコールはカーネル 2.6.25 以降の Linux で利用可能である。 ライ"
11771 "ブラリ側のサポートはバージョン 2.8 以降の glibc で提供されている。"
11773 #. type: Plain text
11774 #: build/C/man2/timerfd_create.2:381
11776 "The following program creates a timer and then monitors its progress. The "
11777 "program accepts up to three command-line arguments. The first argument "
11778 "specifies the number of seconds for the initial expiration of the timer. "
11779 "The second argument specifies the interval for the timer, in seconds. The "
11780 "third argument specifies the number of times the program should allow the "
11781 "timer to expire before terminating. The second and third command-line "
11782 "arguments are optional."
11784 "以下のプログラムは、タイマーを作成し、その進捗をモニターするものである。 この"
11785 "プログラムは最大で 3 個のコマンドライン引き数を取り、 第一引き数ではタイマー"
11786 "の満了時間の初期値 (秒数単位) を、 第二引き数ではタイマーの間隔 (秒数単位) "
11787 "を、 第三引き数ではタイマーが何回満了したらプログラムが終了するかを指定す"
11788 "る。 第二引き数と第三引き数は省略可能である。"
11790 #. type: Plain text
11791 #: build/C/man2/timerfd_create.2:383 build/C/man2/wait.2:541
11792 msgid "The following shell session demonstrates the use of the program:"
11793 msgstr "以下のシェルのセッションはこのプログラムの使用例を示したものである。"
11795 #. type: Plain text
11796 #: build/C/man2/timerfd_create.2:398
11799 "$B< a.out 3 1 100>\n"
11800 "0.000: timer started\n"
11801 "3.000: read: 1; total=1\n"
11802 "4.000: read: 1; total=2\n"
11803 "B<^Z > # type control-Z to suspend the program\n"
11804 "[1]+ Stopped ./timerfd3_demo 3 1 100\n"
11805 "$ B<fg> # Resume execution after a few seconds\n"
11807 "9.660: read: 5; total=7\n"
11808 "10.000: read: 1; total=8\n"
11809 "11.000: read: 1; total=9\n"
11810 "B<^C > # type control-C to suspend the program\n"
11812 "$B< a.out 3 1 100>\n"
11813 "0.000: timer started\n"
11814 "3.000: read: 1; total=1\n"
11815 "4.000: read: 1; total=2\n"
11816 "B<^Z > # type control-Z to suspend the program\n"
11817 "[1]+ Stopped ./timerfd3_demo 3 1 100\n"
11818 "$ B<fg> # Resume execution after a few seconds\n"
11820 "9.660: read: 5; total=7\n"
11821 "10.000: read: 1; total=8\n"
11822 "11.000: read: 1; total=9\n"
11823 "B<^C > # type control-C to suspend the program\n"
11825 #. The commented out code here is what we currently need until
11826 #. the required stuff is in glibc
11827 #. /* Link with -lrt */
11828 #. #define _GNU_SOURCE
11829 #. #include <sys/syscall.h>
11830 #. #include <unistd.h>
11831 #. #include <time.h>
11832 #. #if defined(__i386__)
11833 #. #define __NR_timerfd_create 322
11834 #. #define __NR_timerfd_settime 325
11835 #. #define __NR_timerfd_gettime 326
11838 #. timerfd_create(int clockid, int flags)
11840 #. return syscall(__NR_timerfd_create, clockid, flags);
11843 #. timerfd_settime(int fd, int flags, struct itimerspec *new_value,
11844 #. struct itimerspec *curr_value)
11846 #. return syscall(__NR_timerfd_settime, fd, flags, new_value,
11850 #. timerfd_gettime(int fd, struct itimerspec *curr_value)
11852 #. return syscall(__NR_timerfd_gettime, fd, curr_value);
11854 #. #define TFD_TIMER_ABSTIME (1 << 0)
11855 #. ////////////////////////////////////////////////////////////
11856 #. type: Plain text
11857 #: build/C/man2/timerfd_create.2:447
11860 "#include E<lt>sys/timerfd.hE<gt>\n"
11861 "#include E<lt>time.hE<gt>\n"
11862 "#include E<lt>unistd.hE<gt>\n"
11863 "#include E<lt>stdlib.hE<gt>\n"
11864 "#include E<lt>stdio.hE<gt>\n"
11865 "#include E<lt>stdint.hE<gt> /* Definition of uint64_t */\n"
11867 "#include E<lt>sys/timerfd.hE<gt>\n"
11868 "#include E<lt>time.hE<gt>\n"
11869 "#include E<lt>unistd.hE<gt>\n"
11870 "#include E<lt>stdlib.hE<gt>\n"
11871 "#include E<lt>stdio.hE<gt>\n"
11872 "#include E<lt>stdint.hE<gt> /* Definition of uint64_t */\n"
11874 #. type: Plain text
11875 #: build/C/man2/timerfd_create.2:450
11878 "#define handle_error(msg) \\e\n"
11879 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
11881 "#define handle_error(msg) \\e\n"
11882 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
11884 #. type: Plain text
11885 #: build/C/man2/timerfd_create.2:458
11889 "print_elapsed_time(void)\n"
11891 " static struct timespec start;\n"
11892 " struct timespec curr;\n"
11893 " static int first_call = 1;\n"
11894 " int secs, nsecs;\n"
11897 "print_elapsed_time(void)\n"
11899 " static struct timespec start;\n"
11900 " struct timespec curr;\n"
11901 " static int first_call = 1;\n"
11902 " int secs, nsecs;\n"
11904 #. type: Plain text
11905 #: build/C/man2/timerfd_create.2:464
11908 " if (first_call) {\n"
11909 " first_call = 0;\n"
11910 " if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
11911 " handle_error(\"clock_gettime\");\n"
11914 " if (first_call) {\n"
11915 " first_call = 0;\n"
11916 " if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
11917 " handle_error(\"clock_gettime\");\n"
11920 #. type: Plain text
11921 #: build/C/man2/timerfd_create.2:467
11924 " if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
11925 " handle_error(\"clock_gettime\");\n"
11927 " if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
11928 " handle_error(\"clock_gettime\");\n"
11930 #. type: Plain text
11931 #: build/C/man2/timerfd_create.2:476
11934 " secs = curr.tv_sec - start.tv_sec;\n"
11935 " nsecs = curr.tv_nsec - start.tv_nsec;\n"
11936 " if (nsecs E<lt> 0) {\n"
11938 " nsecs += 1000000000;\n"
11940 " printf(\"%d.%03d: \", secs, (nsecs + 500000) / 1000000);\n"
11943 " secs = curr.tv_sec - start.tv_sec;\n"
11944 " nsecs = curr.tv_nsec - start.tv_nsec;\n"
11945 " if (nsecs E<lt> 0) {\n"
11947 " nsecs += 1000000000;\n"
11949 " printf(\"%d.%03d: \", secs, (nsecs + 500000) / 1000000);\n"
11952 #. type: Plain text
11953 #: build/C/man2/timerfd_create.2:485
11957 "main(int argc, char *argv[])\n"
11959 " struct itimerspec new_value;\n"
11960 " int max_exp, fd;\n"
11961 " struct timespec now;\n"
11962 " uint64_t exp, tot_exp;\n"
11966 "main(int argc, char *argv[])\n"
11968 " struct itimerspec new_value;\n"
11969 " int max_exp, fd;\n"
11970 " struct timespec now;\n"
11971 " uint64_t exp, tot_exp;\n"
11974 #. type: Plain text
11975 #: build/C/man2/timerfd_create.2:491
11978 " if ((argc != 2) && (argc != 4)) {\n"
11979 " fprintf(stderr, \"%s init-secs [interval-secs max-exp]\\en\",\n"
11981 " exit(EXIT_FAILURE);\n"
11984 " if ((argc != 2) && (argc != 4)) {\n"
11985 " fprintf(stderr, \"%s init-secs [interval-secs max-exp]\\en\",\n"
11987 " exit(EXIT_FAILURE);\n"
11990 #. type: Plain text
11991 #: build/C/man2/timerfd_create.2:494
11994 " if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
11995 " handle_error(\"clock_gettime\");\n"
11997 " if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
11998 " handle_error(\"clock_gettime\");\n"
12000 #. type: Plain text
12001 #: build/C/man2/timerfd_create.2:497
12004 " /* Create a CLOCK_REALTIME absolute timer with initial\n"
12005 " expiration and interval as specified in command line */\n"
12007 " /* Create a CLOCK_REALTIME absolute timer with initial\n"
12008 " expiration and interval as specified in command line */\n"
12010 #. type: Plain text
12011 #: build/C/man2/timerfd_create.2:508
12014 " new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
12015 " new_value.it_value.tv_nsec = now.tv_nsec;\n"
12016 " if (argc == 2) {\n"
12017 " new_value.it_interval.tv_sec = 0;\n"
12020 " new_value.it_interval.tv_sec = atoi(argv[2]);\n"
12021 " max_exp = atoi(argv[3]);\n"
12023 " new_value.it_interval.tv_nsec = 0;\n"
12025 " new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
12026 " new_value.it_value.tv_nsec = now.tv_nsec;\n"
12027 " if (argc == 2) {\n"
12028 " new_value.it_interval.tv_sec = 0;\n"
12031 " new_value.it_interval.tv_sec = atoi(argv[2]);\n"
12032 " max_exp = atoi(argv[3]);\n"
12034 " new_value.it_interval.tv_nsec = 0;\n"
12036 #. type: Plain text
12037 #: build/C/man2/timerfd_create.2:512
12040 " fd = timerfd_create(CLOCK_REALTIME, 0);\n"
12042 " handle_error(\"timerfd_create\");\n"
12044 " fd = timerfd_create(CLOCK_REALTIME, 0);\n"
12046 " handle_error(\"timerfd_create\");\n"
12048 #. type: Plain text
12049 #: build/C/man2/timerfd_create.2:515
12052 " if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
12053 " handle_error(\"timerfd_settime\");\n"
12055 " if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
12056 " handle_error(\"timerfd_settime\");\n"
12058 #. type: Plain text
12059 #: build/C/man2/timerfd_create.2:518
12062 " print_elapsed_time();\n"
12063 " printf(\"timer started\\en\");\n"
12065 " print_elapsed_time();\n"
12066 " printf(\"timer started\\en\");\n"
12068 #. type: Plain text
12069 #: build/C/man2/timerfd_create.2:523
12072 " for (tot_exp = 0; tot_exp E<lt> max_exp;) {\n"
12073 " s = read(fd, &exp, sizeof(uint64_t));\n"
12074 " if (s != sizeof(uint64_t))\n"
12075 " handle_error(\"read\");\n"
12077 " for (tot_exp = 0; tot_exp E<lt> max_exp;) {\n"
12078 " s = read(fd, &exp, sizeof(uint64_t));\n"
12079 " if (s != sizeof(uint64_t))\n"
12080 " handle_error(\"read\");\n"
12082 #. type: Plain text
12083 #: build/C/man2/timerfd_create.2:530
12086 " tot_exp += exp;\n"
12087 " print_elapsed_time();\n"
12088 " printf(\"read: %llu; total=%llu\\en\",\n"
12089 " (unsigned long long) exp,\n"
12090 " (unsigned long long) tot_exp);\n"
12093 " tot_exp += exp;\n"
12094 " print_elapsed_time();\n"
12095 " printf(\"read: %llu; total=%llu\\en\",\n"
12096 " (unsigned long long) exp,\n"
12097 " (unsigned long long) tot_exp);\n"
12101 #. type: Plain text
12102 #: build/C/man2/timerfd_create.2:540
12104 "Currently, B<timerfd_create>() supports fewer types of clock IDs than "
12105 "B<timer_create>(2)."
12107 "現在のところ、 B<timerfd_create>() が対応している clockid の種類は "
12108 "B<timer_create>(2) よりも少ない。"
12110 #. type: Plain text
12111 #: build/C/man2/timerfd_create.2:552
12113 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<setitimer>(2), "
12114 "B<signalfd>(2), B<timer_create>(2), B<timer_gettime>(2), B<timer_settime>"
12115 "(2), B<epoll>(7), B<time>(7)"
12117 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<setitimer>(2), "
12118 "B<signalfd>(2), B<timer_create>(2), B<timer_gettime>(2), B<timer_settime>"
12119 "(2), B<epoll>(7), B<time>(7)"
12122 #: build/C/man2/tkill.2:29
12127 #. type: Plain text
12128 #: build/C/man2/tkill.2:32
12129 msgid "tkill, tgkill - send a signal to a thread"
12130 msgstr "tkill, tgkill - スレッドにシグナルを送る"
12132 #. type: Plain text
12133 #: build/C/man2/tkill.2:35
12135 msgid "B<int tkill(int >I<tid>B<, int >I<sig>B<);>\n"
12136 msgstr "B<int tkill(int >I<tid>B<, int >I<sig>B<);>\n"
12138 #. type: Plain text
12139 #: build/C/man2/tkill.2:37
12141 msgid "B<int tgkill(int >I<tgid>B<, int >I<tid>B<, int >I<sig>B<);>\n"
12142 msgstr "B<int tgkill(int >I<tgid>B<, int >I<tid>B<, int >I<sig>B<);>\n"
12144 #. type: Plain text
12145 #: build/C/man2/tkill.2:51
12147 "B<tgkill>() sends the signal I<sig> to the thread with the thread ID I<tid> "
12148 "in the thread group I<tgid>. (By contrast, B<kill>(2) can only be used to "
12149 "send a signal to a process (i.e., thread group) as a whole, and the signal "
12150 "will be delivered to an arbitrary thread within that process.)"
12152 "B<tgkill>() はスレッド・グループ I<tgid> に属するスレッド ID が I<tid> のス"
12153 "レッドにシグナル I<sig> を送る。 (これに対し、 B<kill>(2) は一つのプロセス "
12154 "(すなわち、スレッド・グループ) にまとめてシグナルを 送るのにだけ利用できる。 "
12155 "B<kill>(2) で送信されたシグナルはプロセス内の任意のスレッドに配送される。)"
12157 #. type: Plain text
12158 #: build/C/man2/tkill.2:59
12160 "B<tkill>() is an obsolete predecessor to B<tgkill>(). It only allows the "
12161 "target thread ID to be specified, which may result in the wrong thread being "
12162 "signaled if a thread terminates and its thread ID is recycled. Avoid using "
12163 "this system call."
12165 "B<tkill>() はもう使われなくなった B<tgkill>() の先祖である。 B<tkill>() で"
12166 "はシグナルの送り先のスレッド ID しか指定できない。 そのため、スレッドが終了し"
12167 "て、そのスレッド ID が再利用される場合に、 意図しないスレッドにシグナルが送ら"
12168 "れる可能性がある。 このシステムコールの使用は避けること。"
12170 #. type: Plain text
12171 #: build/C/man2/tkill.2:66
12173 "If I<tgid> is specified as -1, B<tgkill>() is equivalent to B<tkill>()."
12175 "I<tgid> に -1 が指定された場合、 B<tgkill>() は B<tkill>() と等価である。"
12177 #. type: Plain text
12178 #: build/C/man2/tkill.2:69
12180 "These are the raw system call interfaces, meant for internal thread library "
12183 "これらはシステムコールへの直接のインターフェースであり、 スレッド・ライブラリ"
12184 "内部での使用を意図したものである。"
12186 #. type: Plain text
12187 #: build/C/man2/tkill.2:77
12188 msgid "An invalid thread ID, thread group ID, or signal was specified."
12189 msgstr "指定されたスレッド ID、スレッドグループ ID、シグナルが不正であった。"
12191 #. type: Plain text
12192 #: build/C/man2/tkill.2:82
12193 msgid "Permission denied. For the required permissions, see B<kill>(2)."
12195 "許可がなかった。どのような許可が必要かについては、 B<kill>(2) を参照のこと。"
12197 #. type: Plain text
12198 #: build/C/man2/tkill.2:85
12199 msgid "No process with the specified thread ID (and thread group ID) exists."
12201 "指定されたスレッドID (とスレッド・グループID) を持つプロセスが存在しない。"
12203 #. type: Plain text
12204 #: build/C/man2/tkill.2:90
12206 "B<tkill>() is supported since Linux 2.4.19 / 2.5.4. B<tgkill>() was added "
12209 "B<tkill>() は Linux 2.4.19 / 2.5.4 以降でサポートされ、 B<tgkill>() は "
12210 "Linux 2.5.75 で追加された。"
12212 #. type: Plain text
12213 #: build/C/man2/tkill.2:96
12215 "B<tkill>() and B<tgkill>() are Linux-specific and should not be used in "
12216 "programs that are intended to be portable."
12218 "B<tkill>() と B<tgkill>() は Linux 固有であり、 移植を想定したプログラムで"
12221 #. type: Plain text
12222 #: build/C/man2/tkill.2:102
12224 "See the description of B<CLONE_THREAD> in B<clone>(2) for an explanation of "
12227 "スレッド・グループの説明については B<clone>(2) の B<CLONE_THREAD> の説明を参"
12230 #. type: Plain text
12231 #: build/C/man2/tkill.2:105
12233 "Glibc does not provide wrappers for these system calls; call them using "
12236 "glibc はこれらのシステムコールに対するラッパー関数を提供していない。 "
12237 "B<syscall>(2) を使って呼び出すこと。"
12239 #. type: Plain text
12240 #: build/C/man2/tkill.2:110
12241 msgid "B<clone>(2), B<gettid>(2), B<kill>(2), B<rt_sigqueueinfo>(2)"
12242 msgstr "B<clone>(2), B<gettid>(2), B<kill>(2), B<rt_sigqueueinfo>(2)"
12245 #: build/C/man2/wait.2:50
12250 #. type: Plain text
12251 #: build/C/man2/wait.2:53
12252 msgid "wait, waitpid, waitid - wait for process to change state"
12253 msgstr "wait, waitpid, waitid - プロセスの状態変化を待つ"
12255 #. type: Plain text
12256 #: build/C/man2/wait.2:55
12257 msgid "B<#include E<lt>sys/types.hE<gt>>"
12258 msgstr "B<#include E<lt>sys/types.hE<gt>>"
12260 #. type: Plain text
12261 #: build/C/man2/wait.2:57
12262 msgid "B<#include E<lt>sys/wait.hE<gt>>"
12263 msgstr "B<#include E<lt>sys/wait.hE<gt>>"
12265 #. type: Plain text
12266 #: build/C/man2/wait.2:59
12267 msgid "B<pid_t wait(int *>I<status>B<);>"
12268 msgstr "B<pid_t wait(int *>I<status>B<);>"
12270 #. type: Plain text
12271 #: build/C/man2/wait.2:61
12273 "B<pid_t waitpid(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<);>"
12275 "B<pid_t waitpid(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<);>"
12277 #. type: Plain text
12278 #: build/C/man2/wait.2:64
12280 "B<int waitid(idtype_t >I<idtype>B<, id_t >I<id>B<, siginfo_t *>I<infop>B<, "
12281 "int >I<options>B<);>"
12283 "B<int waitid(idtype_t >I<idtype>B<, id_t >I<id>B<, siginfo_t *>I<infop>B<, "
12284 "int >I<options>B<);>"
12286 #. type: Plain text
12287 #: build/C/man2/wait.2:73
12288 msgid "B<waitid>():"
12289 msgstr "B<waitid>():"
12291 #. type: Plain text
12292 #: build/C/man2/wait.2:77
12294 "_SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
12295 "_XOPEN_SOURCE_EXTENDED"
12297 "_SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
12298 "_XOPEN_SOURCE_EXTENDED"
12300 #. type: Plain text
12301 #: build/C/man2/wait.2:92
12303 "All of these system calls are used to wait for state changes in a child of "
12304 "the calling process, and obtain information about the child whose state has "
12305 "changed. A state change is considered to be: the child terminated; the "
12306 "child was stopped by a signal; or the child was resumed by a signal. In the "
12307 "case of a terminated child, performing a wait allows the system to release "
12308 "the resources associated with the child; if a wait is not performed, then "
12309 "the terminated child remains in a \"zombie\" state (see NOTES below)."
12311 "これらのシステムコールはいずれも、呼び出し元プロセスの子プロセスの 状態変化を"
12312 "待ち、状態が変化したその子プロセスの情報を取得するのに 使用される。 状態変化"
12313 "とは以下のいずれかである: 子プロセスの終了、シグナルによる子プロセスの停止、 "
12314 "シグナルによる子プロセスの再開。 子プロセスが終了した場合は、wait を実行する"
12315 "ことで、 システムがその子プロセスに関連するリソースを解放できるようになる。 "
12316 "wait が実行されなかった場合には、終了した子プロセスは 「ゾンビ」状態で残り続"
12317 "ける (下記の注意の章を参照のこと)。"
12319 #. type: Plain text
12320 #: build/C/man2/wait.2:104
12322 "If a child has already changed state, then these calls return immediately. "
12323 "Otherwise they block until either a child changes state or a signal handler "
12324 "interrupts the call (assuming that system calls are not automatically "
12325 "restarted using the B<SA_RESTART> flag of B<sigaction>(2)). In the "
12326 "remainder of this page, a child whose state has changed and which has not "
12327 "yet been waited upon by one of these system calls is termed I<waitable>."
12329 "子プロセスの状態変化がすでに発生していた場合、これらのコールは すぐに復帰す"
12330 "る。それ以外の場合は、子プロセスの状態変化が起こるか、 シグナルハンドラにより"
12331 "システムコールが中断されるまで、 停止 (block) する (後者は、 B<sigaction>"
12332 "(2) の B<SA_RESTART> フラグによりシステムコールが自動的に再スタートするよう"
12333 "になっていない 場合の動作である)。 以下の説明では、状態変化が起こったがこれら"
12334 "のシステムコールのいずれかに よって待たれていない子プロセスを I<waitable> (待"
12338 #: build/C/man2/wait.2:104
12340 msgid "wait() and waitpid()"
12341 msgstr "wait() と waitpid()"
12343 #. type: Plain text
12344 #: build/C/man2/wait.2:112
12346 "The B<wait>() system call suspends execution of the calling process until "
12347 "one of its children terminates. The call I<wait(&status)> is equivalent to:"
12349 "B<wait>() システムコールは、子プロセスのいずれかが終了するまで 呼び出し元の"
12350 "プロセスの実行を一時停止する。 呼び出し I<wait(&status)> は以下と等価である:"
12352 #. type: Plain text
12353 #: build/C/man2/wait.2:115
12355 msgid " waitpid(-1, &status, 0);\n"
12356 msgstr " waitpid(-1, &status, 0);\n"
12358 #. type: Plain text
12359 #: build/C/man2/wait.2:129
12361 "The B<waitpid>() system call suspends execution of the calling process "
12362 "until a child specified by I<pid> argument has changed state. By default, "
12363 "B<waitpid>() waits only for terminated children, but this behavior is "
12364 "modifiable via the I<options> argument, as described below."
12366 "B<waitpid>() システムコールは、 I<pid> 引き数で指定した子プロセスの状態変化"
12367 "が起こるまで、 呼び出し元のプロセスの実行を一時停止する。デフォルトでは、 "
12368 "B<waitpid>() は子プロセスの終了だけを待つが、この動作は I<options> 引き数に"
12371 #. type: Plain text
12372 #: build/C/man2/wait.2:133
12373 msgid "The value of I<pid> can be:"
12374 msgstr "I<pid> に指定できる値は以下の通り:"
12377 #: build/C/man2/wait.2:133
12382 #. type: Plain text
12383 #: build/C/man2/wait.2:137
12385 "meaning wait for any child process whose process group ID is equal to the "
12386 "absolute value of I<pid>."
12388 "プロセスグループID が I<pid> の絶対値に等しい子プロセスのいずれかが終了するま"
12392 #: build/C/man2/wait.2:137
12397 #. type: Plain text
12398 #: build/C/man2/wait.2:139
12399 msgid "meaning wait for any child process."
12400 msgstr "子プロセスのどれかが終了するまで待つ。"
12403 #: build/C/man2/wait.2:139
12408 #. type: Plain text
12409 #: build/C/man2/wait.2:142
12411 "meaning wait for any child process whose process group ID is equal to that "
12412 "of the calling process."
12414 "プロセスグループID が呼び出したプロセスのものと等しい 子プロセスを待つ。"
12417 #: build/C/man2/wait.2:142
12422 #. type: Plain text
12423 #: build/C/man2/wait.2:146
12425 "meaning wait for the child whose process ID is equal to the value of I<pid>."
12426 msgstr "プロセスID が I<pid> に等しい子プロセスを待つ。"
12428 #. type: Plain text
12429 #: build/C/man2/wait.2:150
12431 "The value of I<options> is an OR of zero or more of the following constants:"
12432 msgstr "I<options> の値は次の定数の 0 個以上の論理和である:"
12435 #: build/C/man2/wait.2:150 build/C/man2/wait.2:279
12438 msgstr "B<WNOHANG>"
12440 #. type: Plain text
12441 #: build/C/man2/wait.2:153
12442 msgid "return immediately if no child has exited."
12443 msgstr "状態変化が起こった子プロセスがない場合にすぐに復帰する。"
12446 #: build/C/man2/wait.2:153
12448 msgid "B<WUNTRACED>"
12449 msgstr "B<WUNTRACED>"
12451 #. type: Plain text
12452 #: build/C/man2/wait.2:162
12454 "also return if a child has stopped (but not traced via B<ptrace>(2)). "
12455 "Status for I<traced> children which have stopped is provided even if this "
12456 "option is not specified."
12458 "子プロセスが停止した場合にも復帰する (子プロセスが B<ptrace>(2) でトレースさ"
12459 "れている場合は除く)。 このオプションが指定されていない場合でも、停止したプロ"
12460 "セスが 「トレース (traced)」されていれば、子プロセスの状態が報告される。"
12463 #: build/C/man2/wait.2:162
12465 msgid "B<WCONTINUED> (since Linux 2.6.10)"
12466 msgstr "B<WCONTINUED> (Linux 2.6.10 以降)"
12468 #. type: Plain text
12469 #: build/C/man2/wait.2:166
12471 "also return if a stopped child has been resumed by delivery of B<SIGCONT>."
12472 msgstr "停止した子プロセスが B<SIGCONT> の配送により再開した場合にも復帰する。"
12474 #. type: Plain text
12475 #: build/C/man2/wait.2:168
12476 msgid "(For Linux-only options, see below.)"
12477 msgstr "(Linux 専用オプションについては後述する)"
12479 #. type: Plain text
12480 #: build/C/man2/wait.2:182
12482 "If I<status> is not NULL, B<wait>() and B<waitpid>() store status "
12483 "information in the I<int> to which it points. This integer can be inspected "
12484 "with the following macros (which take the integer itself as an argument, not "
12485 "a pointer to it, as is done in B<wait>() and B<waitpid>()!):"
12487 "I<status> が NULL でなければ、 B<wait>() や B<waitpid>() は I<status> で指"
12488 "す I<int> に状態情報を格納する。 この整数は以下のマクロを使って検査できる。 "
12489 "(これらのマクロの引き数には、 B<wait>() や B<waitpid>() が書き込んだ整数そ"
12490 "のものを指定する。ポインタではない!)"
12493 #: build/C/man2/wait.2:182
12495 msgid "B<WIFEXITED(>I<status>B<)>"
12496 msgstr "B<WIFEXITED(>I<status>B<)>"
12498 #. type: Plain text
12499 #: build/C/man2/wait.2:190
12501 "returns true if the child terminated normally, that is, by calling B<exit>"
12502 "(3) or B<_exit>(2), or by returning from main()."
12504 "子プロセスが正常に終了した場合に真を返す。 「正常に」とは、 B<exit>(3) か "
12505 "B<_exit>(2) が呼び出された場合、もしくは main() から復帰した場合である。"
12508 #: build/C/man2/wait.2:190
12510 msgid "B<WEXITSTATUS(>I<status>B<)>"
12511 msgstr "B<WEXITSTATUS(>I<status>B<)>"
12513 #. type: Plain text
12514 #: build/C/man2/wait.2:203
12516 "returns the exit status of the child. This consists of the least "
12517 "significant 8 bits of the I<status> argument that the child specified in a "
12518 "call to B<exit>(3) or B<_exit>(2) or as the argument for a return "
12519 "statement in main(). This macro should only be employed if B<WIFEXITED> "
12522 "子プロセスの終了ステータスを返す。 終了ステータスは I<status> 引き数の下位 8"
12523 "ビットで構成されており、 B<exit>(3) や B<_exit>(2) の呼び出し時に渡された"
12524 "値、もしくは main() の return 文の 引き数として指定された値である。 このマク"
12525 "ロを使用するのは B<WIFEXITED> が真を返した場合だけにすべきである。"
12528 #: build/C/man2/wait.2:203
12530 msgid "B<WIFSIGNALED(>I<status>B<)>"
12531 msgstr "B<WIFSIGNALED(>I<status>B<)>"
12533 #. type: Plain text
12534 #: build/C/man2/wait.2:206
12535 msgid "returns true if the child process was terminated by a signal."
12536 msgstr "子プロセスがシグナルにより終了した場合に真を返す。"
12539 #: build/C/man2/wait.2:206
12541 msgid "B<WTERMSIG(>I<status>B<)>"
12542 msgstr "B<WTERMSIG(>I<status>B<)>"
12544 #. type: Plain text
12545 #: build/C/man2/wait.2:213
12547 "returns the number of the signal that caused the child process to "
12548 "terminate. This macro should only be employed if B<WIFSIGNALED> returned "
12551 "子プロセス終了の原因となったシグナルの番号を返す。 このマクロを使用するのは "
12552 "B<WIFSIGNALED> が真を返した場合だけにすべきである。"
12555 #: build/C/man2/wait.2:213
12557 msgid "B<WCOREDUMP(>I<status>B<)>"
12558 msgstr "B<WCOREDUMP(>I<status>B<)>"
12560 #. type: Plain text
12561 #: build/C/man2/wait.2:222
12563 "returns true if the child produced a core dump. This macro should only be "
12564 "employed if B<WIFSIGNALED> returned true. This macro is not specified in "
12565 "POSIX.1-2001 and is not available on some UNIX implementations (e.g., AIX, "
12566 "SunOS). Only use this enclosed in #ifdef WCOREDUMP ... #endif."
12568 "子プロセスがコアダンプを生成した場合に真を返す。 このマクロを使用するのは "
12569 "B<WIFSIGNALED> が真を返した場合だけにすべきである。 このマクロは "
12570 "POSIX.1-2001 では規定されておらず、 (AIX, SunOS などの) いくつかの UNIX の実"
12571 "装では利用できない。 必ず #ifdef WCOREDUMP ... #endif で括って使用すること。"
12574 #: build/C/man2/wait.2:222
12576 msgid "B<WIFSTOPPED(>I<status>B<)>"
12577 msgstr "B<WIFSTOPPED(>I<status>B<)>"
12579 #. type: Plain text
12580 #: build/C/man2/wait.2:229
12582 "returns true if the child process was stopped by delivery of a signal; this "
12583 "is only possible if the call was done using B<WUNTRACED> or when the child "
12584 "is being traced (see B<ptrace>(2))."
12586 "子プロセスがシグナルの配送により停止した場合に真を返す。 これが真になるのは、"
12587 "システムコールが B<WUNTRACED> を指定して呼び出された場合か、子プロセスがト"
12588 "レースされている場合 (B<ptrace>(2) 参照) だけである。"
12591 #: build/C/man2/wait.2:229
12593 msgid "B<WSTOPSIG(>I<status>B<)>"
12594 msgstr "B<WSTOPSIG(>I<status>B<)>"
12596 #. type: Plain text
12597 #: build/C/man2/wait.2:235
12599 "returns the number of the signal which caused the child to stop. This macro "
12600 "should only be employed if B<WIFSTOPPED> returned true."
12602 "子プロセスを停止させたシグナルの番号を返す。 このマクロを使用するのは "
12603 "B<WIFSTOPPED> が 0 以外を返した場合だけにすべきである。"
12606 #: build/C/man2/wait.2:235
12608 msgid "B<WIFCONTINUED(>I<status>B<)>"
12609 msgstr "B<WIFCONTINUED(>I<status>B<)>"
12611 #. type: Plain text
12612 #: build/C/man2/wait.2:240
12614 "(since Linux 2.6.10) returns true if the child process was resumed by "
12615 "delivery of B<SIGCONT>."
12617 "(Linux 2.6.10 以降) 子プロセスが B<SIGCONT> の配送により再開した場合に真を返"
12621 #: build/C/man2/wait.2:240
12626 #. type: Plain text
12627 #: build/C/man2/wait.2:245
12629 "The B<waitid>() system call (available since Linux 2.6.9) provides more "
12630 "precise control over which child state changes to wait for."
12632 "B<waitid>() システムコール (Linux 2.6.9 以降で利用可能) を使うと、 子プロセ"
12633 "スのどの状態変化を待つかについてより細かな制御ができる。"
12635 #. type: Plain text
12636 #: build/C/man2/wait.2:251
12638 "The I<idtype> and I<id> arguments select the child(ren) to wait for, as "
12640 msgstr "引き数 I<idtype> と I<id> でどの子プロセスを待つかを選択する:"
12643 #: build/C/man2/wait.2:251
12645 msgid "I<idtype> == B<P_PID>"
12646 msgstr "I<idtype> == B<P_PID>"
12648 #. type: Plain text
12649 #: build/C/man2/wait.2:254
12650 msgid "Wait for the child whose process ID matches I<id>."
12651 msgstr "プロセスID が I<id> と一致する子プロセスを待つ。"
12654 #: build/C/man2/wait.2:254
12656 msgid "I<idtype> == B<P_PGID>"
12657 msgstr "I<idtype> == B<P_PGID>"
12659 #. type: Plain text
12660 #: build/C/man2/wait.2:257
12661 msgid "Wait for any child whose process group ID matches I<id>."
12662 msgstr "プロセスグループID が I<id> と一致する子プロセスを待つ。"
12665 #: build/C/man2/wait.2:257
12667 msgid "I<idtype> == B<P_ALL>"
12668 msgstr "I<idtype> == B<P_ALL>"
12670 #. type: Plain text
12671 #: build/C/man2/wait.2:261
12672 msgid "Wait for any child; I<id> is ignored."
12673 msgstr "子プロセス全部を対象に待つ。 I<id> は無視される。"
12675 #. type: Plain text
12676 #: build/C/man2/wait.2:265
12678 "The child state changes to wait for are specified by ORing one or more of "
12679 "the following flags in I<options>:"
12681 "子プロセスのどの状態変化を待つかは以下のフラグで指定する (I<options> には 1個"
12682 "以上のフラグの論理和をとって指定する):"
12685 #: build/C/man2/wait.2:265
12688 msgstr "B<WEXITED>"
12690 #. type: Plain text
12691 #: build/C/man2/wait.2:268
12692 msgid "Wait for children that have terminated."
12693 msgstr "子プロセスの終了を待つ。"
12696 #: build/C/man2/wait.2:268
12698 msgid "B<WSTOPPED>"
12699 msgstr "B<WSTOPPED>"
12701 #. type: Plain text
12702 #: build/C/man2/wait.2:271
12703 msgid "Wait for children that have been stopped by delivery of a signal."
12704 msgstr "子プロセスがシグナルの配送により停止するのを待つ。"
12707 #: build/C/man2/wait.2:271
12709 msgid "B<WCONTINUED>"
12710 msgstr "B<WCONTINUED>"
12712 #. type: Plain text
12713 #: build/C/man2/wait.2:276
12715 "Wait for (previously stopped) children that have been resumed by delivery of "
12717 msgstr "(停止していた) 子プロセスが B<SIGCONT> が配送されて再開するのを待つ。"
12719 #. type: Plain text
12720 #: build/C/man2/wait.2:279
12721 msgid "The following flags may additionally be ORed in I<options>:"
12722 msgstr "さらに以下のフラグを論理和の形で I<options> に指定できる:"
12724 #. type: Plain text
12725 #: build/C/man2/wait.2:283
12726 msgid "As for B<waitpid>()."
12727 msgstr "B<waitpid>() と同様。"
12730 #: build/C/man2/wait.2:283
12733 msgstr "B<WNOWAIT>"
12735 #. type: Plain text
12736 #: build/C/man2/wait.2:287
12738 "Leave the child in a waitable state; a later wait call can be used to again "
12739 "retrieve the child status information."
12741 "waitable 状態のプロセスをそのままにする。この後で wait コールを 使って、同じ"
12742 "子プロセスの状態情報をもう一度取得することができる。"
12744 #. type: Plain text
12745 #: build/C/man2/wait.2:294
12747 "Upon successful return, B<waitid>() fills in the following fields of the "
12748 "I<siginfo_t> structure pointed to by I<infop>:"
12750 "成功した場合には、 B<waitid>() は I<infop> が指す I<siginfo_t> 構造体の以下"
12753 #. type: Plain text
12754 #: build/C/man2/wait.2:297
12755 msgid "The process ID of the child."
12756 msgstr "子プロセスのプロセスID。"
12758 #. type: Plain text
12759 #: build/C/man2/wait.2:301
12761 "The real user ID of the child. (This field is not set on most other "
12762 "implementations.)"
12764 "子プロセスの実ユーザID (このフィールドは他のほとんどの実装では設定されない)。"
12766 #. type: Plain text
12767 #: build/C/man2/wait.2:305
12768 msgid "Always set to B<SIGCHLD>."
12769 msgstr "常に B<SIGCHLD> が設定される。"
12772 #: build/C/man2/wait.2:305
12774 msgid "I<si_status>"
12775 msgstr "I<si_status>"
12777 #. type: Plain text
12778 #: build/C/man2/wait.2:315
12780 "Either the exit status of the child, as given to B<_exit>(2) (or B<exit>"
12781 "(3)), or the signal that caused the child to terminate, stop, or continue. "
12782 "The I<si_code> field can be used to determine how to interpret this field."
12784 "B<_exit>(2) (か B<exit>(3)) に指定された子プロセスの終了ステータス、もしく"
12785 "は 子プロセスの終了、停止、再開の原因となったシグナルが設定される。 この"
12786 "フィールドをどう解釈するかは、 I<si_code> フィールドを参照して決めることがで"
12789 #. type: Plain text
12790 #: build/C/man2/wait.2:332
12792 "Set to one of: B<CLD_EXITED> (child called B<_exit>(2)); B<CLD_KILLED> "
12793 "(child killed by signal); B<CLD_DUMPED> (child killed by signal, and dumped "
12794 "core); B<CLD_STOPPED> (child stopped by signal); B<CLD_TRAPPED> (traced "
12795 "child has trapped); or B<CLD_CONTINUED> (child continued by B<SIGCONT>)."
12797 "以下のいずれかが設定される: B<CLD_EXITED> (子プロセスが B<_exit>(2) を呼び出"
12798 "した); B<CLD_KILLED> (シグナルにより子プロセスが kill された); B<CLD_DUMPED> "
12799 "(シグナルにより子プロセスが kill され、コア・ダンプが行われた); "
12800 "B<CLD_STOPPED> (シグナルにより子プロセスが停止した); B<CLD_TRAPPED> (トレース"
12801 "されていた子プロセスがトラップを受信した); B<CLD_CONTINUED> (B<SIGCONT> によ"
12804 #. POSIX.1-2001 leaves this possibility unspecified; most
12805 #. implementations (including Linux) zero out the structure
12806 #. in this case, but at least one implementation (AIX 5.1)
12807 #. does not -- MTK Nov 04
12808 #. type: Plain text
12809 #: build/C/man2/wait.2:354
12811 "If B<WNOHANG> was specified in I<options> and there were no children in a "
12812 "waitable state, then B<waitid>() returns 0 immediately and the state of the "
12813 "I<siginfo_t> structure pointed to by I<infop> is unspecified. To "
12814 "distinguish this case from that where a child was in a waitable state, zero "
12815 "out the I<si_pid> field before the call and check for a nonzero value in "
12816 "this field after the call returns."
12818 "B<WNOHANG> が I<options> に指定されていて、 waitable 状態の子プロセスがなかっ"
12819 "た場合には、 B<waitid>() はすぐに 0 を返す。このとき、 I<infop> が指す "
12820 "I<siginfo_t> 構造体の内容は不定である。 この場合を waitable 状態の子プロセス"
12821 "があった場合と区別するには、 B<waitid>() を呼び出す前に I<si_pid> を 0 にし"
12822 "ておき、コールが復帰した後でこのフィールドが 0 以外の値かどうか をチェックす"
12825 #. type: Plain text
12826 #: build/C/man2/wait.2:358
12828 "B<wait>(): on success, returns the process ID of the terminated child; on "
12829 "error, -1 is returned."
12831 "B<wait>(): 成功すると、終了した子プロセスのプロセスID を返す。 エラーの場合 "
12834 #. type: Plain text
12835 #: build/C/man2/wait.2:367
12837 "B<waitpid>(): on success, returns the process ID of the child whose state "
12838 "has changed; if B<WNOHANG> was specified and one or more child(ren) "
12839 "specified by I<pid> exist, but have not yet changed state, then 0 is "
12840 "returned. On error, -1 is returned."
12842 "B<waitpid>(): 成功すると、状態が変化した子プロセスのプロセスID を返す。 "
12843 "B<WNOHANG> が指定されていて、 I<pid> で指示された子プロセスが一つ以上存在する"
12844 "が、どの子プロセスでも 状態変化が起こっていなかった場合は、 0 を返す。 エラー"
12847 #. FIXME: As reported by Vegard Nossum, if infop is NULL, then waitid()
12848 #. returns the PID of the child. Either this is a bug, or it is intended
12849 #. behavior that needs to be documented. See my Jan 2009 LKML mail
12850 #. "waitid() return value strangeness when infop is NULL".
12851 #. type: Plain text
12852 #: build/C/man2/wait.2:383
12854 "B<waitid>(): returns 0 on success or if B<WNOHANG> was specified and no child"
12855 "(ren) specified by I<id> has yet changed state; on error, -1 is returned. "
12856 "Each of these calls sets I<errno> to an appropriate value in the case of an "
12859 "B<waitid>(): 成功すると 0 を返す。 B<WNOHANG> が指定されていて、 I<pid> で指"
12860 "示された子プロセスで状態変化が起こっていなかった場合にも 0 を返す。 エラーの"
12861 "場合 -1 を返す。 エラーの場合、これらのシステムコールはいずれも I<errno> に適"
12865 #: build/C/man2/wait.2:384 build/C/man2/wait.2:389
12870 #. type: Plain text
12871 #: build/C/man2/wait.2:389
12873 "(for B<wait>()) The calling process does not have any unwaited-for children."
12875 "(B<wait>() の場合) 呼び出し元プロセスには、wait を行っていない子プロセスは"
12878 #. type: Plain text
12879 #: build/C/man2/wait.2:409
12881 "(for B<waitpid>() or B<waitid>()) The process specified by I<pid> "
12882 "(B<waitpid>()) or I<idtype> and I<id> (B<waitid>()) does not exist or is "
12883 "not a child of the calling process. (This can happen for one's own child if "
12884 "the action for B<SIGCHLD> is set to B<SIG_IGN>. See also the I<Linux Notes> "
12885 "section about threads.)"
12887 "(B<waitpid>() か B<waitid>() の場合) I<pid> (B<waitpid>()) か I<idtype> "
12888 "と I<id> (B<waitid>()) で指定したプロセスが存在しないか、呼び出し元プロセス"
12889 "の子プロセスでない (B<SIGCHLD> の動作に B<SIG_IGN> を設定した場合には、自分自"
12890 "身の子プロセスでも起こりうる。 スレッドに関しては「Linux での注意」の節も参照"
12893 #. type: Plain text
12894 #: build/C/man2/wait.2:416
12896 "B<WNOHANG> was not set and an unblocked signal or a B<SIGCHLD> was caught; "
12897 "see B<signal>(7)."
12899 "B<WNOHANG> が設定されておらず、禁止 (block) されていないシグナルや "
12900 "B<SIGCHLD> を受信した。 B<signal>(7) 参照。"
12902 #. type: Plain text
12903 #: build/C/man2/wait.2:421
12904 msgid "The I<options> argument was invalid."
12905 msgstr "I<options> 引き数が不正である。"
12907 #. type: Plain text
12908 #: build/C/man2/wait.2:436
12910 "A child that terminates, but has not been waited for becomes a \"zombie\". "
12911 "The kernel maintains a minimal set of information about the zombie process "
12912 "(PID, termination status, resource usage information) in order to allow the "
12913 "parent to later perform a wait to obtain information about the child. As "
12914 "long as a zombie is not removed from the system via a wait, it will consume "
12915 "a slot in the kernel process table, and if this table fills, it will not be "
12916 "possible to create further processes. If a parent process terminates, then "
12917 "its \"zombie\" children (if any) are adopted by B<init>(8), which "
12918 "automatically performs a wait to remove the zombies."
12920 "終了したが、wait されていない子プロセスは「ゾンビ」になる。 後で親プロセスが "
12921 "wait を実行して子プロセスについての情報を取得できるように、 カーネルはゾンビ"
12922 "プロセスについて最小限の情報 (PID、終了ステータス、 リソース使用状況) を保持"
12923 "する。 ゾンビプロセスは、 wait によってシステムから削除されない限り、 カーネ"
12924 "ルのプロセステーブルの 1 エントリを消費する。このプロセステーブルが 一杯にな"
12925 "ると、新たにプロセスを作ることができなくなる。 親プロセスが終了すると、その親"
12926 "プロセスの「ゾンビ」の 子プロセスは (もしあれば) B<init>(8) の養子となる。 "
12927 "B<init>(8) は wait を自動的に実行し、ゾンビを削除する。"
12929 #. type: Plain text
12930 #: build/C/man2/wait.2:477
12932 "POSIX.1-2001 specifies that if the disposition of B<SIGCHLD> is set to "
12933 "B<SIG_IGN> or the B<SA_NOCLDWAIT> flag is set for B<SIGCHLD> (see "
12934 "B<sigaction>(2)), then children that terminate do not become zombies and a "
12935 "call to B<wait>() or B<waitpid>() will block until all children have "
12936 "terminated, and then fail with I<errno> set to B<ECHILD>. (The original "
12937 "POSIX standard left the behavior of setting B<SIGCHLD> to B<SIG_IGN> "
12938 "unspecified. Note that even though the default disposition of B<SIGCHLD> is "
12939 "\"ignore\", explicitly setting the disposition to B<SIG_IGN> results in "
12940 "different treatment of zombie process children.) Linux 2.6 conforms to this "
12941 "specification. However, Linux 2.4 (and earlier) does not: if a B<wait>() "
12942 "or B<waitpid>() call is made while B<SIGCHLD> is being ignored, the call "
12943 "behaves just as though B<SIGCHLD> were not being ignored, that is, the call "
12944 "blocks until the next child terminates and then returns the process ID and "
12945 "status of that child."
12947 "POSIX.1-2001 では以下のように規定されている。 B<SIGCHLD> の動作が B<SIG_IGN> "
12948 "に設定されたか、 B<SIGCHLD> に対して B<SA_NOCLDWAIT> フラグが設定された場合 "
12949 "(B<sigaction>(2) 参照)、終了した子プロセスはゾンビにはならず、 B<wait>() "
12950 "や B<waitpid>() の呼び出しは全ての子プロセスが終了するまで停止し、 子プロセ"
12951 "スが全部終了した後 I<errno> に B<ECHILD> を設定して失敗する。 (もともとの "
12952 "POSIX 標準は B<SIGCHLD> に B<SIG_IGN> を設定した場合の振る舞いを未規定のまま"
12953 "にしている。 B<SIGCHLD> のデフォルトの動作が「無視」であるにもかかわらず、 "
12954 "B<SIGCHLD> の動作として B<SIG_IGN> を明示的に設定した場合にはゾンビプロセスの"
12955 "子プロセスの扱いが 異なる点に注意すること。) Linux 2.6 はこの仕様に準拠して"
12956 "いる。 しかし、Linux 2.4 (とそれ以前のバージョン) はそうではない: B<SIGCHLD> "
12957 "が無視される状態で B<wait>() または B<waitpid>() が呼び出された場合、 "
12958 "B<SIGCHLD> が無視されていないかのように振る舞う。 つまり、呼び出しによって次"
12959 "の子プロセスの終了までブロックされ、 終了した子プロセスの PID と状態が返され"
12962 #. type: Plain text
12963 #: build/C/man2/wait.2:493
12965 "In the Linux kernel, a kernel-scheduled thread is not a distinct construct "
12966 "from a process. Instead, a thread is simply a process that is created using "
12967 "the Linux-unique B<clone>(2) system call; other routines such as the "
12968 "portable B<pthread_create>(3) call are implemented using B<clone>(2). "
12969 "Before Linux 2.4, a thread was just a special case of a process, and as a "
12970 "consequence one thread could not wait on the children of another thread, "
12971 "even when the latter belongs to the same thread group. However, POSIX "
12972 "prescribes such functionality, and since Linux 2.4 a thread can, and by "
12973 "default will, wait on children of other threads in the same thread group."
12975 "Linux カーネルでは、カーネルによってスケジュールされるスレッドは プロセスと明"
12976 "確に区別できる構成要素ではない。スレッドは Linux 固有の B<clone>(2) システム"
12977 "コールを使用して生成されるプロセスに過ぎない。 移植性のある B<pthread_create>"
12978 "(3) コールのような他のルーチンは B<clone>(2) を使用して実装されている; これ"
12979 "らでは B<waitid>() を使うことはできない。 Linux 2.4 より前では、スレッドは単"
12980 "に特殊なプロセスであったので、 例え同じスレッドグループであっても、 あるス"
12981 "レッドが別のスレッドの子プロセスが終了するのを待つことは出来なかった。 しか"
12982 "し、POSIX ではこのような機能を規定しており、 Linux 2.4 以降では、あるスレッド"
12983 "が同じスレッドグループの他のスレッドの 子プロセスが終了するのを待つことができ"
12984 "るようになった。 そして将来はこれがデフォルトの動作になるであろう。"
12986 #. type: Plain text
12987 #: build/C/man2/wait.2:500
12989 "The following Linux-specific I<options> are for use with children created "
12990 "using B<clone>(2); they cannot be used with B<waitid>():"
12992 "B<clone>(2) を用いて作られた子プロセスには、以下の Linux 固有の I<options> "
12996 #: build/C/man2/wait.2:500
12998 msgid "B<__WCLONE>"
12999 msgstr "B<__WCLONE>"
13002 #. type: Plain text
13003 #: build/C/man2/wait.2:511
13005 "Wait for \"clone\" children only. If omitted then wait for \"non-clone\" "
13006 "children only. (A \"clone\" child is one which delivers no signal, or a "
13007 "signal other than B<SIGCHLD> to its parent upon termination.) This option "
13008 "is ignored if B<__WALL> is also specified."
13010 "\"clone\" な子プロセスだけを待つ。 指定されなかった場合は非 \"clone\" な子プ"
13011 "ロセスだけを待つ (\"clone\" な子プロセスは、終了時に親プロセスへ全くシグナル"
13012 "を送らないか、 B<SIGCHLD> 以外のシグナルを送る)。 このオプションは B<__WALL> "
13016 #: build/C/man2/wait.2:511
13018 msgid "B<__WALL> (since Linux 2.4)"
13019 msgstr "B<__WALL> (Linux 2.4 以降)"
13021 #. since patch-2.3.48
13022 #. type: Plain text
13023 #: build/C/man2/wait.2:516
13024 msgid "Wait for all children, regardless of type (\"clone\" or \"non-clone\")."
13025 msgstr "\"clone\" であるかないかに関わらず、 全ての子プロセスを待つ。"
13028 #: build/C/man2/wait.2:516
13030 msgid "B<__WNOTHREAD> (since Linux 2.4)"
13031 msgstr "B<__WNOTHREAD> (Linux 2.4 以降)"
13033 #. since patch-2.4.0-test8
13034 #. type: Plain text
13035 #: build/C/man2/wait.2:522
13037 "Do not wait for children of other threads in the same thread group. This "
13038 "was the default before Linux 2.4."
13040 "同じスレッドグループの他のスレッドの子プロセスは待たない。 Linux 2.4 より前で"
13043 #. fork.2 refers to this example program.
13044 #. type: Plain text
13045 #: build/C/man2/wait.2:539
13047 "The following program demonstrates the use of B<fork>(2) and B<waitpid>(). "
13048 "The program creates a child process. If no command-line argument is "
13049 "supplied to the program, then the child suspends its execution using B<pause>"
13050 "(2), to allow the user to send signals to the child. Otherwise, if a "
13051 "command-line argument is supplied, then the child exits immediately, using "
13052 "the integer supplied on the command line as the exit status. The parent "
13053 "process executes a loop that monitors the child using B<waitpid>(), and uses "
13054 "the W*() macros described above to analyze the wait status value."
13056 "以下のプログラムは、 B<fork>(2) と B<waitpid>() の使用方法の例を示してい"
13057 "る。 このプログラムでは子プロセスを生成する。 コマンドライン引き数が指定され"
13058 "なかったときは、 子プロセスは B<pause>(2) を使ってその実行を一時停止し、ユー"
13059 "ザがその子プロセスに シグナルを送信できるようにする。 コマンドライン引き数が"
13060 "指定された場合は、 子プロセスは直ちに終了し、 コマンドラインで指定された整数"
13061 "を終了ステータスとして使用する。 親プロセスは、 B<waitpid>() を使って子プロ"
13062 "セスを監視し、 wait のステータス値を上記の W*() マクロを使って解析するという "
13065 #. type: Plain text
13066 #: build/C/man2/wait.2:555
13070 "Child PID is 32360\n"
13072 "$B< kill -STOP 32360>\n"
13073 "stopped by signal 19\n"
13074 "$B< kill -CONT 32360>\n"
13076 "$B< kill -TERM 32360>\n"
13077 "killed by signal 15\n"
13078 "[1]+ Done ./a.out\n"
13082 "Child PID is 32360\n"
13084 "$B< kill -STOP 32360>\n"
13085 "stopped by signal 19\n"
13086 "$B< kill -CONT 32360>\n"
13088 "$B< kill -TERM 32360>\n"
13089 "killed by signal 15\n"
13090 "[1]+ Done ./a.out\n"
13093 #. type: Plain text
13094 #: build/C/man2/wait.2:564
13097 "#include E<lt>sys/wait.hE<gt>\n"
13098 "#include E<lt>stdlib.hE<gt>\n"
13099 "#include E<lt>unistd.hE<gt>\n"
13100 "#include E<lt>stdio.hE<gt>\n"
13102 "#include E<lt>sys/wait.hE<gt>\n"
13103 "#include E<lt>stdlib.hE<gt>\n"
13104 "#include E<lt>unistd.hE<gt>\n"
13105 "#include E<lt>stdio.hE<gt>\n"
13107 #. type: Plain text
13108 #: build/C/man2/wait.2:570
13112 "main(int argc, char *argv[])\n"
13114 " pid_t cpid, w;\n"
13118 "main(int argc, char *argv[])\n"
13120 " pid_t cpid, w;\n"
13123 #. type: Plain text
13124 #: build/C/man2/wait.2:576
13127 " cpid = fork();\n"
13128 " if (cpid == -1) {\n"
13129 " perror(\"fork\");\n"
13130 " exit(EXIT_FAILURE);\n"
13133 " cpid = fork();\n"
13134 " if (cpid == -1) {\n"
13135 " perror(\"fork\");\n"
13136 " exit(EXIT_FAILURE);\n"
13139 #. type: Plain text
13140 #: build/C/man2/wait.2:582
13143 " if (cpid == 0) { /* Code executed by child */\n"
13144 " printf(\"Child PID is %ld\\en\", (long) getpid());\n"
13145 " if (argc == 1)\n"
13146 " pause(); /* Wait for signals */\n"
13147 " _exit(atoi(argv[1]));\n"
13149 " if (cpid == 0) { /* Code executed by child */\n"
13150 " printf(\"Child PID is %ld\\en\", (long) getpid());\n"
13151 " if (argc == 1)\n"
13152 " pause(); /* Wait for signals */\n"
13153 " _exit(atoi(argv[1]));\n"
13155 #. type: Plain text
13156 #: build/C/man2/wait.2:590
13159 " } else { /* Code executed by parent */\n"
13161 " w = waitpid(cpid, &status, WUNTRACED | WCONTINUED);\n"
13162 " if (w == -1) {\n"
13163 " perror(\"waitpid\");\n"
13164 " exit(EXIT_FAILURE);\n"
13167 " } else { /* Code executed by parent */\n"
13169 " w = waitpid(cpid, &status, WUNTRACED | WCONTINUED);\n"
13170 " if (w == -1) {\n"
13171 " perror(\"waitpid\");\n"
13172 " exit(EXIT_FAILURE);\n"
13175 #. type: Plain text
13176 #: build/C/man2/wait.2:604
13179 " if (WIFEXITED(status)) {\n"
13180 " printf(\"exited, status=%d\\en\", WEXITSTATUS(status));\n"
13181 " } else if (WIFSIGNALED(status)) {\n"
13182 " printf(\"killed by signal %d\\en\", WTERMSIG(status));\n"
13183 " } else if (WIFSTOPPED(status)) {\n"
13184 " printf(\"stopped by signal %d\\en\", WSTOPSIG(status));\n"
13185 " } else if (WIFCONTINUED(status)) {\n"
13186 " printf(\"continued\\en\");\n"
13188 " } while (!WIFEXITED(status) && !WIFSIGNALED(status));\n"
13189 " exit(EXIT_SUCCESS);\n"
13193 " if (WIFEXITED(status)) {\n"
13194 " printf(\"exited, status=%d\\en\", WEXITSTATUS(status));\n"
13195 " } else if (WIFSIGNALED(status)) {\n"
13196 " printf(\"killed by signal %d\\en\", WTERMSIG(status));\n"
13197 " } else if (WIFSTOPPED(status)) {\n"
13198 " printf(\"stopped by signal %d\\en\", WSTOPSIG(status));\n"
13199 " } else if (WIFCONTINUED(status)) {\n"
13200 " printf(\"continued\\en\");\n"
13202 " } while (!WIFEXITED(status) && !WIFSIGNALED(status));\n"
13203 " exit(EXIT_SUCCESS);\n"
13207 #. type: Plain text
13208 #: build/C/man2/wait.2:617
13210 "B<_exit>(2), B<clone>(2), B<fork>(2), B<kill>(2), B<ptrace>(2), B<sigaction>"
13211 "(2), B<signal>(2), B<wait4>(2), B<pthread_create>(3), B<credentials>(7), "
13214 "B<_exit>(2), B<clone>(2), B<fork>(2), B<kill>(2), B<ptrace>(2), B<sigaction>"
13215 "(2), B<signal>(2), B<wait4>(2), B<pthread_create>(3), B<credentials>(7), "
13219 #: build/C/man2/wait4.2:34
13224 #. type: Plain text
13225 #: build/C/man2/wait4.2:37
13226 msgid "wait3, wait4 - wait for process to change state, BSD style"
13227 msgstr "wait3, wait4 - BSD スタイルでプロセスの状態変化を待つ"
13229 #. type: Plain text
13230 #: build/C/man2/wait4.2:43
13233 "B<#include E<lt>sys/types.hE<gt>>\n"
13234 "B<#include E<lt>sys/time.hE<gt>>\n"
13235 "B<#include E<lt>sys/resource.hE<gt>>\n"
13236 "B<#include E<lt>sys/wait.hE<gt>>\n"
13238 "B<#include E<lt>sys/types.hE<gt>>\n"
13239 "B<#include E<lt>sys/time.hE<gt>>\n"
13240 "B<#include E<lt>sys/resource.hE<gt>>\n"
13241 "B<#include E<lt>sys/wait.hE<gt>>\n"
13243 #. type: Plain text
13244 #: build/C/man2/wait4.2:46
13247 "B<pid_t wait3(int *>I<status>B<, int >I<options>B<,>\n"
13248 "B< struct rusage *>I<rusage>B<);>\n"
13250 "B<pid_t wait3(int *>I<status>B<, int >I<options>B<,>\n"
13251 "B< struct rusage *>I<rusage>B<);>\n"
13253 #. type: Plain text
13254 #: build/C/man2/wait4.2:49
13257 "B<pid_t wait4(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<,>\n"
13258 "B< struct rusage *>I<rusage>B<);>\n"
13260 "B<pid_t wait4(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<,>\n"
13261 "B< struct rusage *>I<rusage>B<);>\n"
13263 #. type: Plain text
13264 #: build/C/man2/wait4.2:58
13265 msgid "B<wait3>():"
13266 msgstr "B<wait3>():"
13268 #. type: Plain text
13269 #: build/C/man2/wait4.2:64
13270 msgid "B<wait4>():"
13271 msgstr "B<wait4>():"
13273 #. type: Plain text
13274 #: build/C/man2/wait4.2:66
13275 msgid "_BSD_SOURCE"
13276 msgstr "_BSD_SOURCE"
13278 #. type: Plain text
13279 #: build/C/man2/wait4.2:78
13281 "The B<wait3>() and B<wait4>() system calls are similar to B<waitpid>(2), "
13282 "but additionally return resource usage information about the child in the "
13283 "structure pointed to by I<rusage>."
13285 "システムコール B<wait3>() と B<wait4>() は B<waitpid>(2) と同様の動作をす"
13286 "る。それに加え、子プロセスのリソース使用状況の情報を I<rusage> が指す構造体に"
13289 #. type: Plain text
13290 #: build/C/man2/wait4.2:84
13292 "Other than the use of the I<rusage> argument, the following B<wait3>() call:"
13293 msgstr "I<rusage> を使用する点を除けば、次の B<wait3>() の呼び出し"
13295 #. type: Plain text
13296 #: build/C/man2/wait4.2:87
13298 msgid " wait3(status, options, rusage);\n"
13299 msgstr " wait3(status, options, rusage);\n"
13301 #. type: Plain text
13302 #: build/C/man2/wait4.2:90 build/C/man2/wait4.2:104
13303 msgid "is equivalent to:"
13304 msgstr "は以下と等価である。"
13306 #. type: Plain text
13307 #: build/C/man2/wait4.2:93
13309 msgid " waitpid(-1, status, options);\n"
13310 msgstr " waitpid(-1, status, options);\n"
13312 #. type: Plain text
13313 #: build/C/man2/wait4.2:98
13314 msgid "Similarly, the following B<wait4>() call:"
13315 msgstr "同様に、次の B<wait4>() の呼び出し"
13317 #. type: Plain text
13318 #: build/C/man2/wait4.2:101
13320 msgid " wait4(pid, status, options, rusage);\n"
13321 msgstr " wait4(pid, status, options, rusage);\n"
13323 #. type: Plain text
13324 #: build/C/man2/wait4.2:107
13326 msgid " waitpid(pid, status, options);\n"
13327 msgstr " waitpid(pid, status, options);\n"
13329 #. type: Plain text
13330 #: build/C/man2/wait4.2:117
13332 "In other words, B<wait3>() waits of any child, while B<wait4>() can be "
13333 "used to select a specific child, or children, on which to wait. See B<wait>"
13334 "(2) for further details."
13336 "言い換えると、 B<wait3>() は全ての子プロセスを対象に待つが、 B<wait4>() で"
13337 "は特定の子プロセス (複数可) を選んで待つことができる。"
13339 #. type: Plain text
13340 #: build/C/man2/wait4.2:127
13342 "If I<rusage> is not NULL, the I<struct rusage> to which it points will be "
13343 "filled with accounting information about the child. See B<getrusage>(2) "
13346 "I<rusage> が NULL でない場合、 I<rusage> が指す I<rusage 構造体> には子プロセ"
13347 "スのアカウント情報が格納される。 詳しくは B<getrusage>(2) を参照のこと。"
13349 #. type: Plain text
13350 #: build/C/man2/wait4.2:130 build/C/man2/wait4.2:133
13351 msgid "As for B<waitpid>(2)."
13352 msgstr "B<waitpid>(2) と同様。"
13354 #. type: Plain text
13355 #: build/C/man2/wait4.2:135
13359 #. type: Plain text
13360 #: build/C/man2/wait4.2:147
13362 "Including I<E<lt>sys/time.hE<gt>> is not required these days, but increases "
13363 "portability. (Indeed, I<E<lt>sys/resource.hE<gt>> defines the I<rusage> "
13364 "structure with fields of type I<struct timeval> defined in I<E<lt>sys/time."
13367 "現在では I<E<lt>sys/time.hE<gt>> をインクルードする必要はないが、インクルード"
13368 "しておくと 移植性を高めることができる (実際には I<E<lt>sys/resource.hE<gt>> "
13369 "で I<rusage> 構造体が定義されているが、そのフィールドで使用されている "
13370 "I<struct timeval> 型は I<E<lt>sys/time.hE<gt>> で定義されている)。"
13372 #. type: Plain text
13373 #: build/C/man2/wait4.2:153
13375 "On Linux, B<wait3>() is a library function implemented on top of the "
13376 "B<wait4>() system call."
13378 "Linux では、 B<wait3>() はライブラリ関数であり、 B<wait4>() システムコール"
13381 #. type: Plain text
13382 #: build/C/man2/wait4.2:160
13384 "B<fork>(2), B<getrusage>(2), B<sigaction>(2), B<signal>(2), B<wait>(2), "
13387 "B<fork>(2), B<getrusage>(2), B<sigaction>(2), B<signal>(2), B<wait>(2), "
13390 #~ msgid "2008-07-11"
13391 #~ msgstr "2008-07-11"
13394 #~ "B<SIGIO> and B<SIGLOST> have the same value. The latter is commented out "
13395 #~ "in the kernel source, but the build process of some software still thinks "
13396 #~ "that signal 29 is B<SIGLOST>."
13398 #~ "B<SIGIO> と B<SIGLOST> は同じ値を持っている。 B<SIGLOST> はカーネルのソー"
13399 #~ "スではコメントアウトされている。 しかし、ソフトウェアによってはビルドの過"
13400 #~ "程でシグナル 29 を B<SIGLOST> とみなしてしまうものがある。"
13402 #~ msgid "2011-10-03"
13403 #~ msgstr "2011-10-03"
13405 #~ msgid "B<kill>(2) or B<raise>(3)"
13406 #~ msgstr "B<kill>(2) または B<raise>(3)"
13408 #~ msgid "queued SIGIO"
13409 #~ msgstr "キューイングされた SIGIO"
13411 #~ msgid "EXAMPLES"
13414 #~ msgid "POSIX.1b signals and B<SIGCHLD> fill in I<si_pid> and I<si_uid>."
13416 #~ "POSIX.1b シグナルと B<SIGCHLD> は I<si_pid> と I<si_uid> を設定する。"
13419 #~ "I<si_int> and I<si_ptr> are specified by the sender of the POSIX.1b "
13420 #~ "signal. See B<sigqueue>(2) for more details."
13422 #~ "I<si_int> と I<si_ptr> は POSIX.1b シグナルの送信者によって指定される。 詳"
13423 #~ "細は B<sigqueue>(2) を参照のこと。"
13426 #~ "B<SIGILL>, B<SIGFPE>, B<SIGSEGV>, and B<SIGBUS> fill in I<si_addr> with "
13427 #~ "the address of the fault. B<SIGPOLL> fills in I<si_band> and I<si_fd>."
13429 #~ "B<SIGILL>, B<SIGFPE>, B<SIGSEGV>, B<SIGBUS> は I<si_addr> にエラーが発生し"
13430 #~ "たアドレスを設定する。 SIGPOLL は I<si_band> と I<si_fd> を設定する。"