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: 2013-03-22 01:05+0900\n"
10 "PO-Revision-Date: 2013-03-24 20:58+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/man2/arch_prctl.2:25
25 #: build/C/man2/arch_prctl.2:25
31 #: build/C/man2/arch_prctl.2:25 build/C/man2/futex.2:53
32 #: build/C/man2/get_robust_list.2:29 build/C/man2/getunwind.2:27
33 #: build/C/man2/kexec_load.2:26 build/C/man2/lookup_dcookie.2:27
34 #: build/C/man2/modify_ldt.2:24 build/C/man2/nfsservctl.2:8
35 #: build/C/man2/outb.2:26 build/C/man2/pciconfig_read.2:8
36 #: build/C/man2/perf_event_open.2:27 build/C/man2/perfmonctl.2:27
37 #: build/C/man2/personality.2:32 build/C/man2/pivot_root.2:10
38 #: build/C/man2/process_vm_readv.2:29 build/C/man2/ptrace.2:44
39 #: build/C/man2/quotactl.2:27 build/C/man2/sendfile.2:19
40 #: build/C/man2/set_tid_address.2:25 build/C/man2/splice.2:26
41 #: build/C/man2/tee.2:26 build/C/man2/vm86.2:26 build/C/man2/vmsplice.2:26
47 #: build/C/man2/arch_prctl.2:25 build/C/man2/futex.2:53
48 #: build/C/man2/getunwind.2:27 build/C/man2/kexec_load.2:26
49 #: build/C/man2/lookup_dcookie.2:27 build/C/man2/modify_ldt.2:24
50 #: build/C/man2/nfsservctl.2:8 build/C/man2/outb.2:26
51 #: build/C/man2/pciconfig_read.2:8 build/C/man2/perf_event_open.2:27
52 #: build/C/man2/perfmonctl.2:27 build/C/man2/personality.2:32
53 #: build/C/man2/pivot_root.2:10 build/C/man2/process_vm_readv.2:29
54 #: build/C/man2/ptrace.2:44 build/C/man2/quotactl.2:27
55 #: build/C/man2/sendfile.2:19 build/C/man2/set_tid_address.2:25
56 #: build/C/man2/splice.2:26 build/C/man2/tee.2:26 build/C/man2/vm86.2:26
57 #: build/C/man2/vmsplice.2:26
59 msgid "Linux Programmer's Manual"
60 msgstr "Linux Programmer's Manual"
63 #: build/C/man2/arch_prctl.2:26 build/C/man2/futex.2:54
64 #: build/C/man2/get_robust_list.2:30 build/C/man2/getunwind.2:28
65 #: build/C/man2/kexec_load.2:27 build/C/man2/lookup_dcookie.2:28
66 #: build/C/man2/modify_ldt.2:25 build/C/man2/nfsservctl.2:9
67 #: build/C/man2/outb.2:27 build/C/man2/pciconfig_read.2:9
68 #: build/C/man2/perf_event_open.2:28 build/C/man2/perfmonctl.2:28
69 #: build/C/man2/personality.2:33 build/C/man2/pivot_root.2:11
70 #: build/C/man2/process_vm_readv.2:30 build/C/man2/ptrace.2:45
71 #: build/C/man2/quotactl.2:28 build/C/man2/sendfile.2:20
72 #: build/C/man2/set_tid_address.2:26 build/C/man2/splice.2:27
73 #: build/C/man2/tee.2:27 build/C/man2/vm86.2:27 build/C/man2/vmsplice.2:27
79 #: build/C/man2/arch_prctl.2:28
80 msgid "arch_prctl - set architecture-specific thread state"
81 msgstr "arch_prctl - アーキテクチャ固有のスレッド状態を設定する"
84 #: build/C/man2/arch_prctl.2:28 build/C/man2/futex.2:56
85 #: build/C/man2/get_robust_list.2:32 build/C/man2/getunwind.2:30
86 #: build/C/man2/kexec_load.2:29 build/C/man2/lookup_dcookie.2:30
87 #: build/C/man2/modify_ldt.2:27 build/C/man2/nfsservctl.2:11
88 #: build/C/man2/outb.2:31 build/C/man2/pciconfig_read.2:11
89 #: build/C/man2/perf_event_open.2:30 build/C/man2/perfmonctl.2:30
90 #: build/C/man2/personality.2:35 build/C/man2/pivot_root.2:13
91 #: build/C/man2/process_vm_readv.2:32 build/C/man2/ptrace.2:47
92 #: build/C/man2/quotactl.2:30 build/C/man2/sendfile.2:22
93 #: build/C/man2/set_tid_address.2:28 build/C/man2/splice.2:29
94 #: build/C/man2/tee.2:29 build/C/man2/vm86.2:29 build/C/man2/vmsplice.2:29
100 #: build/C/man2/arch_prctl.2:31
102 msgid "B<#include E<lt>asm/prctl.hE<gt>>\n"
103 msgstr "B<#include E<lt>asm/prctl.hE<gt>>\n"
106 #: build/C/man2/arch_prctl.2:33
108 msgid "B<#include E<lt>sys/prctl.hE<gt>>\n"
109 msgstr "B<#include E<lt>sys/prctl.hE<gt>>\n"
112 #: build/C/man2/arch_prctl.2:36
115 "B<int arch_prctl(int >I<code>B<, unsigned long >I<addr>B<);>\n"
116 "B<int arch_prctl(int >I<code>B<, unsigned long *>I<addr>B<);>\n"
117 msgstr "B<int arch_prctl(int >I<code>B<, unsigned long *>I<addr>B<);>\n"
119 #. Return type was long before glibc 2.7
121 #: build/C/man2/arch_prctl.2:37 build/C/man2/futex.2:68
122 #: build/C/man2/get_robust_list.2:44 build/C/man2/getunwind.2:40
123 #: build/C/man2/kexec_load.2:39 build/C/man2/lookup_dcookie.2:32
124 #: build/C/man2/modify_ldt.2:36 build/C/man2/nfsservctl.2:18
125 #: build/C/man2/outb.2:62 build/C/man2/pciconfig_read.2:22
126 #: build/C/man2/perf_event_open.2:42 build/C/man2/perfmonctl.2:39
127 #: build/C/man2/personality.2:39 build/C/man2/pivot_root.2:18
128 #: build/C/man2/process_vm_readv.2:50 build/C/man2/ptrace.2:54
129 #: build/C/man2/quotactl.2:38 build/C/man2/sendfile.2:47
130 #: build/C/man2/set_tid_address.2:34 build/C/man2/splice.2:39
131 #: build/C/man2/tee.2:38 build/C/man2/vm86.2:35 build/C/man2/vmsplice.2:39
137 #: build/C/man2/arch_prctl.2:52
139 "The B<arch_prctl>() function sets architecture-specific process or thread "
140 "state. I<code> selects a subfunction and passes argument I<addr> to it; "
141 "I<addr> is interpreted as either an I<unsigned long> for the \"set\" "
142 "operations, or as an I<unsigned long *>, for the \"get\" operations."
144 "B<arch_prctl>() 関数はアーキテクチャ固有のプロセス状態またはスレッド状態を設"
145 "定する。 I<code> は副機能を選択し、引き数 I<addr> を副機能に渡す。 I<addr> "
146 "は、\"set\" 操作では I<unsigned long> として、\"get\" 操作では I<unsigned "
150 #: build/C/man2/arch_prctl.2:54
151 msgid "Sub functions for x86-64 are:"
152 msgstr "x86-64 の副機能は以下の通り:"
155 #: build/C/man2/arch_prctl.2:54
157 msgid "B<ARCH_SET_FS>"
158 msgstr "B<ARCH_SET_FS>"
161 #: build/C/man2/arch_prctl.2:60
162 msgid "Set the 64-bit base for the I<FS> register to I<addr>."
163 msgstr "I<FS> レジスタの 64 ビットベースを I<addr> に設定する。"
166 #: build/C/man2/arch_prctl.2:60
168 msgid "B<ARCH_GET_FS>"
169 msgstr "B<ARCH_GET_FS>"
172 #: build/C/man2/arch_prctl.2:68
174 "Return the 64-bit base value for the I<FS> register of the current thread in "
175 "the I<unsigned long> pointed to by I<addr>."
177 "現在のスレッドの I<FS> レジスタの 64 ビットベース値を、 I<addr> が指す "
178 "I<unsigned long> の領域に格納する。"
181 #: build/C/man2/arch_prctl.2:68
183 msgid "B<ARCH_SET_GS>"
184 msgstr "B<ARCH_SET_GS>"
187 #: build/C/man2/arch_prctl.2:74
188 msgid "Set the 64-bit base for the I<GS> register to I<addr>."
189 msgstr "I<GS> レジスタの 64 ビットベースを I<addr> に設定する。"
192 #: build/C/man2/arch_prctl.2:74
194 msgid "B<ARCH_GET_GS>"
195 msgstr "B<ARCH_GET_GS>"
198 #: build/C/man2/arch_prctl.2:82
200 "Return the 64-bit base value for the I<GS> register of the current thread in "
201 "the I<unsigned long> pointed to by I<addr>."
203 "現在のスレッドの I<GS> レジスタの 64 ビットベース値を、 I<addr> が指す "
204 "I<unsigned long> の領域に格納する。"
207 #: build/C/man2/arch_prctl.2:82 build/C/man2/futex.2:209
208 #: build/C/man2/get_robust_list.2:77 build/C/man2/getunwind.2:81
209 #: build/C/man2/kexec_load.2:114 build/C/man2/lookup_dcookie.2:43
210 #: build/C/man2/modify_ldt.2:98 build/C/man2/nfsservctl.2:51
211 #: build/C/man2/pciconfig_read.2:50 build/C/man2/perf_event_open.2:1804
212 #: build/C/man2/perfmonctl.2:190 build/C/man2/personality.2:57
213 #: build/C/man2/pivot_root.2:101 build/C/man2/process_vm_readv.2:209
214 #: build/C/man2/ptrace.2:1713 build/C/man2/sendfile.2:108
215 #: build/C/man2/set_tid_address.2:88 build/C/man2/splice.2:127
216 #: build/C/man2/tee.2:85 build/C/man2/vm86.2:52 build/C/man2/vmsplice.2:113
222 #: build/C/man2/arch_prctl.2:88
224 "On success, B<arch_prctl>() returns 0; on error, -1 is returned, and "
225 "I<errno> is set to indicate the error."
227 "成功すると、 B<arch_prctl>() は 0 を返す。エラーの場合、-1 を返し、 "
228 "I<errno> をエラーを示す値に設定する。"
231 #: build/C/man2/arch_prctl.2:88 build/C/man2/futex.2:234
232 #: build/C/man2/get_robust_list.2:84 build/C/man2/getunwind.2:88
233 #: build/C/man2/kexec_load.2:121 build/C/man2/lookup_dcookie.2:50
234 #: build/C/man2/modify_ldt.2:108 build/C/man2/pciconfig_read.2:77
235 #: build/C/man2/perf_event_open.2:1810 build/C/man2/personality.2:64
236 #: build/C/man2/pivot_root.2:105 build/C/man2/process_vm_readv.2:229
237 #: build/C/man2/ptrace.2:1727 build/C/man2/quotactl.2:427
238 #: build/C/man2/sendfile.2:115 build/C/man2/set_tid_address.2:91
239 #: build/C/man2/splice.2:142 build/C/man2/tee.2:100 build/C/man2/vm86.2:57
240 #: build/C/man2/vmsplice.2:122
246 #: build/C/man2/arch_prctl.2:89 build/C/man2/futex.2:249
247 #: build/C/man2/get_robust_list.2:111 build/C/man2/lookup_dcookie.2:51
248 #: build/C/man2/modify_ldt.2:109 build/C/man2/process_vm_readv.2:251
249 #: build/C/man2/process_vm_readv.2:256 build/C/man2/ptrace.2:1731
250 #: build/C/man2/quotactl.2:428 build/C/man2/sendfile.2:125
251 #: build/C/man2/vm86.2:58
257 #: build/C/man2/arch_prctl.2:93
259 "I<addr> points to an unmapped address or is outside the process address "
262 "I<addr> がアンマップされたアドレスを指しているか、プロセスのアドレス空間の外"
266 #: build/C/man2/arch_prctl.2:93 build/C/man2/futex.2:261
267 #: build/C/man2/get_robust_list.2:88 build/C/man2/kexec_load.2:126
268 #: build/C/man2/lookup_dcookie.2:54 build/C/man2/modify_ldt.2:113
269 #: build/C/man2/pciconfig_read.2:78 build/C/man2/perf_event_open.2:1811
270 #: build/C/man2/personality.2:65 build/C/man2/pivot_root.2:114
271 #: build/C/man2/process_vm_readv.2:230 build/C/man2/process_vm_readv.2:241
272 #: build/C/man2/process_vm_readv.2:245 build/C/man2/ptrace.2:1742
273 #: build/C/man2/quotactl.2:434 build/C/man2/quotactl.2:501
274 #: build/C/man2/sendfile.2:128 build/C/man2/splice.2:147
275 #: build/C/man2/tee.2:101 build/C/man2/vmsplice.2:127
281 #: build/C/man2/arch_prctl.2:97
282 msgid "I<code> is not a valid subcommand."
283 msgstr "I<code> が有効なサブコマンドでない。"
286 #: build/C/man2/arch_prctl.2:97 build/C/man2/get_robust_list.2:98
287 #: build/C/man2/kexec_load.2:133 build/C/man2/lookup_dcookie.2:65
288 #: build/C/man2/pciconfig_read.2:105 build/C/man2/pivot_root.2:120
289 #: build/C/man2/process_vm_readv.2:267 build/C/man2/ptrace.2:1752
290 #: build/C/man2/quotactl.2:456 build/C/man2/vm86.2:66
296 #. Man page written by Andi Kleen.
298 #: build/C/man2/arch_prctl.2:103
299 msgid "I<addr> is outside the process address space."
300 msgstr "I<addr> がプロセスのアドレス空間の外にある。"
303 #: build/C/man2/arch_prctl.2:103 build/C/man2/futex.2:296
304 #: build/C/man2/getunwind.2:96 build/C/man2/kexec_load.2:142
305 #: build/C/man2/lookup_dcookie.2:78 build/C/man2/modify_ldt.2:130
306 #: build/C/man2/nfsservctl.2:56 build/C/man2/outb.2:87
307 #: build/C/man2/pciconfig_read.2:110 build/C/man2/perf_event_open.2:1829
308 #: build/C/man2/perfmonctl.2:199 build/C/man2/personality.2:68
309 #: build/C/man2/pivot_root.2:128 build/C/man2/process_vm_readv.2:279
310 #: build/C/man2/ptrace.2:1770 build/C/man2/sendfile.2:148
311 #: build/C/man2/set_tid_address.2:97 build/C/man2/splice.2:170
312 #: build/C/man2/tee.2:119 build/C/man2/vm86.2:71 build/C/man2/vmsplice.2:143
314 msgid "CONFORMING TO"
318 #: build/C/man2/arch_prctl.2:107
320 "B<arch_prctl>() is a Linux/x86-64 extension and should not be used in "
321 "programs intended to be portable."
323 "B<arch_prctl>() は Linux/x86-64 拡張であり、移植性を意図したプログラムでは使"
327 #: build/C/man2/arch_prctl.2:107 build/C/man2/futex.2:298
328 #: build/C/man2/get_robust_list.2:119 build/C/man2/getunwind.2:99
329 #: build/C/man2/kexec_load.2:144 build/C/man2/lookup_dcookie.2:81
330 #: build/C/man2/modify_ldt.2:133 build/C/man2/perf_event_open.2:1834
331 #: build/C/man2/perfmonctl.2:202 build/C/man2/pivot_root.2:131
332 #: build/C/man2/process_vm_readv.2:281 build/C/man2/ptrace.2:1772
333 #: build/C/man2/sendfile.2:155 build/C/man2/splice.2:172
334 #: build/C/man2/tee.2:121 build/C/man2/vmsplice.2:145
340 #: build/C/man2/arch_prctl.2:110
342 "B<arch_prctl>() is only supported on Linux/x86-64 for 64-bit programs "
345 "B<arch_prctl>() は現在のところ Linux/x86-64 上の 64 ビットプログラムでのみサ"
349 #: build/C/man2/arch_prctl.2:112
350 msgid "The 64-bit base changes when a new 32-bit segment selector is loaded."
352 "新しい 32 ビットセグメントセレクタがロードされた場合、 64 ビットベースは変更"
356 #: build/C/man2/arch_prctl.2:115
357 msgid "B<ARCH_SET_GS> is disabled in some kernels."
358 msgstr "B<ARCH_SET_GS> が無効にされているカーネルもある。"
361 #: build/C/man2/arch_prctl.2:130
363 "Context switches for 64-bit segment bases are rather expensive. It may be a "
364 "faster alternative to set a 32-bit base using a segment selector by setting "
365 "up an LDT with B<modify_ldt>(2) or using the B<set_thread_area>(2) system "
366 "call in kernel 2.5 or later. B<arch_prctl>() is only needed when you want "
367 "to set bases that are larger than 4GB. Memory in the first 2GB of address "
368 "space can be allocated by using B<mmap>(2) with the B<MAP_32BIT> flag."
370 "64 ビットセグメントベースのコンテキストスイッチは、やや高価である。 LDT を "
371 "B<modify_ldt>(2) で設定してセグメントセレクタを使うか、 (カーネル 2.5 以降"
372 "の) B<set_thread_area>(2) システムコールを使うことにより、 32 ビットベース"
373 "を設定するという高速な代替手段もある。 4GB より大きなベースを設定したい場合に"
374 "のみ、 B<arch_prctl>() が必要である。 アドレス空間の最初の 2GB にあるメモリ"
375 "は、 B<mmap>(2) に B<MAP_32BIT> フラグを指定して割り当てることができる。"
378 #: build/C/man2/arch_prctl.2:135
380 "As of version 2.7, glibc provides no prototype for B<arch_prctl>(). You "
381 "have to declare it yourself for now. This may be fixed in future glibc "
384 "バージョン 2.7 時点では、glibc には B<arch_prctl>() のプロトタイプがない。 "
385 "今のところユーザは自分自身で宣言する必要がある。 これは将来の glibc のバー"
389 #: build/C/man2/arch_prctl.2:138
390 msgid "I<FS> may be already used by the threading library."
391 msgstr "I<FS> はスレッドライブラリで既に使われているかもしれない。"
394 #: build/C/man2/arch_prctl.2:138 build/C/man2/futex.2:312
395 #: build/C/man2/get_robust_list.2:128 build/C/man2/getunwind.2:111
396 #: build/C/man2/kexec_load.2:159 build/C/man2/modify_ldt.2:136
397 #: build/C/man2/outb.2:96 build/C/man2/pciconfig_read.2:112
398 #: build/C/man2/perf_event_open.2:1948 build/C/man2/perfmonctl.2:205
399 #: build/C/man2/pivot_root.2:143 build/C/man2/process_vm_readv.2:331
400 #: build/C/man2/ptrace.2:1926 build/C/man2/quotactl.2:507
401 #: build/C/man2/sendfile.2:197 build/C/man2/set_tid_address.2:99
402 #: build/C/man2/splice.2:226 build/C/man2/tee.2:197
403 #: build/C/man2/vmsplice.2:154
409 #: build/C/man2/arch_prctl.2:143
410 msgid "B<mmap>(2), B<modify_ldt>(2), B<prctl>(2), B<set_thread_area>(2)"
411 msgstr "B<mmap>(2), B<modify_ldt>(2), B<prctl>(2), B<set_thread_area>(2)"
414 #: build/C/man2/arch_prctl.2:145
415 msgid "AMD X86-64 Programmer's manual"
416 msgstr "AMD X86-64 Programmer's manual"
419 #: build/C/man2/arch_prctl.2:145 build/C/man2/futex.2:325
420 #: build/C/man2/get_robust_list.2:137 build/C/man2/getunwind.2:113
421 #: build/C/man2/kexec_load.2:162 build/C/man2/lookup_dcookie.2:88
422 #: build/C/man2/modify_ldt.2:138 build/C/man2/nfsservctl.2:58
423 #: build/C/man2/outb.2:99 build/C/man2/pciconfig_read.2:114
424 #: build/C/man2/perf_event_open.2:1954 build/C/man2/perfmonctl.2:209
425 #: build/C/man2/personality.2:72 build/C/man2/pivot_root.2:149
426 #: build/C/man2/process_vm_readv.2:334 build/C/man2/ptrace.2:1940
427 #: build/C/man2/quotactl.2:512 build/C/man2/sendfile.2:203
428 #: build/C/man2/set_tid_address.2:102 build/C/man2/splice.2:230
429 #: build/C/man2/tee.2:200 build/C/man2/vm86.2:74 build/C/man2/vmsplice.2:157
435 #: build/C/man2/arch_prctl.2:152 build/C/man2/futex.2:332
436 #: build/C/man2/get_robust_list.2:144 build/C/man2/getunwind.2:120
437 #: build/C/man2/kexec_load.2:169 build/C/man2/lookup_dcookie.2:95
438 #: build/C/man2/modify_ldt.2:145 build/C/man2/nfsservctl.2:65
439 #: build/C/man2/outb.2:106 build/C/man2/pciconfig_read.2:121
440 #: build/C/man2/perf_event_open.2:1961 build/C/man2/perfmonctl.2:216
441 #: build/C/man2/personality.2:79 build/C/man2/pivot_root.2:156
442 #: build/C/man2/process_vm_readv.2:341 build/C/man2/ptrace.2:1947
443 #: build/C/man2/quotactl.2:519 build/C/man2/sendfile.2:210
444 #: build/C/man2/set_tid_address.2:109 build/C/man2/splice.2:237
445 #: build/C/man2/tee.2:207 build/C/man2/vm86.2:81 build/C/man2/vmsplice.2:164
447 "This page is part of release 3.50 of the Linux I<man-pages> project. A "
448 "description of the project, and information about reporting bugs, can be "
449 "found at http://www.kernel.org/doc/man-pages/."
451 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.50 の一部\n"
452 "である。プロジェクトの説明とバグ報告に関する情報は\n"
453 "http://www.kernel.org/doc/man-pages/ に書かれている。"
456 #: build/C/man2/futex.2:53
462 #: build/C/man2/futex.2:53
468 #: build/C/man2/futex.2:56
469 msgid "futex - fast user-space locking"
470 msgstr "futex - 高速ユーザ空間ロック"
473 #: build/C/man2/futex.2:61
476 "B<#include E<lt>linux/futex.hE<gt>>\n"
477 "B<#include E<lt>sys/time.hE<gt>>\n"
479 "B<#include E<lt>linux/futex.hE<gt>>\n"
480 "B<#include E<lt>sys/time.hE<gt>>\n"
483 #: build/C/man2/futex.2:64
485 msgid "B<int futex(int *>I<uaddr>B<, int >I<op>B<, int >I<val>B<, const struct timespec *>I<timeout>B<,>\n"
486 msgstr "B<int futex(int *>I<uaddr>B<, int >I<op>B<, int >I<val>B<, const struct timespec *>I<timeout>B<,>\n"
488 #. int *? void *? u32 *?
490 #: build/C/man2/futex.2:67
492 msgid "B< int *>I<uaddr2>B<, int >I<val3>B<);>\n"
493 msgstr "B< int *>I<uaddr2>B<, int >I<val3>B<);>\n"
496 #: build/C/man2/futex.2:84
498 "The B<futex>() system call provides a method for a program to wait for a "
499 "value at a given address to change, and a method to wake up anyone waiting "
500 "on a particular address (while the addresses for the same memory in separate "
501 "processes may not be equal, the kernel maps them internally so the same "
502 "memory mapped in different locations will correspond for B<futex>() "
503 "calls). This system call is typically used to implement the contended case "
504 "of a lock in shared memory, as described in B<futex>(7)."
506 "B<futex>() システムコールは、 指定したアドレスの値が変更されるのをプログラム"
507 "が待つ手段や 特定のアドレスに対して待機中のプロセスを wake (起床) させる手段"
508 "を提供する (プロセスが異なれば同じメモリに対するアドレスも同じではないかもし"
509 "れないが、 カーネルは異なる位置にマップされた同じメモリを B<futex>() で使え"
510 "るよう内部でマップする)。 通常は、このシステムコールは B<futex>(7) に書かれ"
511 "ているように、 共有メモリ中のロックが競合する場合の処理を実装するのに用いられ"
515 #: build/C/man2/futex.2:91
517 "When a B<futex>(7) operation did not finish uncontended in user space, a "
518 "call needs to be made to the kernel to arbitrate. Arbitration can either "
519 "mean putting the calling process to sleep or, conversely, waking a waiting "
522 "B<futex>(7) の操作がユーザ空間で競合なく完了しなかった場合、 カーネルに仲裁"
523 "させるためにシステムコールを呼ぶ必要がある。 仲裁というのは、呼び出しプロセス"
524 "を sleep (起床待ち) させたり、反対に 待ちプロセスを wake させたりすることを意"
528 #: build/C/man2/futex.2:98
530 "Callers of this function are expected to adhere to the semantics as set out "
531 "in B<futex>(7). As these semantics involve writing nonportable assembly "
532 "instructions, this in turn probably means that most users will in fact be "
533 "library authors and not general application developers."
535 "この関数を呼び出すプロセスは B<futex>(7) に記述されているセマンティクスに忠"
536 "実であることが要求される。 このセマンティクスには移植不可能なアセンブリ命令を"
537 "書くことが含まれる。 このことは言い換えると futex のユーザのほとんどは実際は"
538 "ライブラリの作者であり、 一般アプリケーションの開発者ではないということであ"
542 #: build/C/man2/futex.2:106
544 "The I<uaddr> argument needs to point to an aligned integer which stores the "
545 "counter. The operation to execute is passed via the I<op> argument, along "
546 "with a value I<val>."
548 "I<uaddr> 引き数は、カウンタを格納する、 アラインメントの揃った int 型変数を指"
549 "している必要がある。 実行する操作は I<op> 引き数を介して、値 I<val> とともに"
553 #: build/C/man2/futex.2:108
554 msgid "Five operations are currently defined:"
555 msgstr "現在のところ 5 つの操作が定義されている:"
558 #: build/C/man2/futex.2:108 build/C/man2/futex.2:216
560 msgid "B<FUTEX_WAIT>"
561 msgstr "B<FUTEX_WAIT>"
564 #: build/C/man2/futex.2:126
566 "This operation atomically verifies that the futex address I<uaddr> still "
567 "contains the value I<val>, and sleeps awaiting B<FUTEX_WAKE> on this futex "
568 "address. If the I<timeout> argument is non-NULL, its contents describe the "
569 "minimum duration of the wait, which is infinite otherwise. The arguments "
570 "I<uaddr2> and I<val3> are ignored."
572 "この操作は futex アドレス I<uaddr> に指定された値 I<val> がまだ格納されている"
573 "かどうかを不可分操作で検証し、 sleep 状態で この futex アドレスに対して "
574 "B<FUTEX_WAKE> が実行されるのを待つ。 I<timeout> 引き数が NULL でない場合、そ"
575 "の内容は 待ち時間の最大値を表す。NULL の場合は無限大を表す。 引き数 "
576 "I<uaddr2> と I<val3> は無視される。"
579 #: build/C/man2/futex.2:134
581 "For B<futex>(7), this call is executed if decrementing the count gave a "
582 "negative value (indicating contention), and will sleep until another process "
583 "releases the futex and executes the B<FUTEX_WAKE> operation."
585 "B<futex>(7) に照らし合わせると、この呼び出しは カウントのデクリメントで負の"
586 "値 (競合を表す) になった場合に実行され、 別のプロセスがその futex を解放し "
587 "B<FUTEX_WAKE> の操作を実行するまで sleep する。"
590 #: build/C/man2/futex.2:134 build/C/man2/futex.2:222
592 msgid "B<FUTEX_WAKE>"
593 msgstr "B<FUTEX_WAKE>"
596 #: build/C/man2/futex.2:145
598 "This operation wakes at most I<val> processes waiting on this futex address "
599 "(i.e., inside B<FUTEX_WAIT>). The arguments I<timeout>, I<uaddr2> and "
600 "I<val3> are ignored."
602 "この操作では指定した futex アドレスに対して待ち状態の (すなわち "
603 "B<FUTEX_WAIT> 中の) 最大 I<val> 個のプロセスを wake させる。 引き数 "
604 "I<timeout>, I<uaddr2>, I<val3> は無視される。"
607 #: build/C/man2/futex.2:151
609 "For B<futex>(7), this is executed if incrementing the count showed that "
610 "there were waiters, once the futex value has been set to 1 (indicating that "
613 "B<futex>(4) に照らし合わせると、 この操作は カウントのインクリメントで待ちプ"
614 "ロセスがあると判明し、 futex 値が 1 に設定された (利用可能であることを表す) "
618 #: build/C/man2/futex.2:151
620 msgid "B<FUTEX_FD> (present up to and including Linux 2.6.25)"
621 msgstr "B<FUTEX_FD> (Linux 2.6.25 以前)"
623 #. , suitable for .BR poll (2).
625 #: build/C/man2/futex.2:167
627 "To support asynchronous wakeups, this operation associates a file descriptor "
628 "with a futex. If another process executes a B<FUTEX_WAKE>, the process will "
629 "receive the signal number that was passed in I<val>. The calling process "
630 "must close the returned file descriptor after use. The arguments "
631 "I<timeout>, I<uaddr2> and I<val3> are ignored."
633 "非同期の wake に対応するため、この操作はファイルディスクリプタを futex に 関"
634 "連づける。 別のプロセスが B<FUTEX_WAKE> を実行すると、プロセスは I<val> で渡"
635 "されたシグナル番号のシグナルを受信する。 呼び出しプロセスは使用後、返された"
636 "ファイルディスクリプタを クローズしなければならない。 引き数 I<timeout>, "
637 "I<uaddr2>, I<val3> は無視される。"
640 #: build/C/man2/futex.2:172
642 "To prevent race conditions, the caller should test if the futex has been "
643 "upped after B<FUTEX_FD> returns."
645 "競合状態を防止するため、呼び出しプロセスは B<FUTEX_FD> が返ったあと futex が "
646 "up されたかどうかを確認しなければならない。"
649 #: build/C/man2/futex.2:176
651 "Because it was inherently racy, B<FUTEX_FD> has been removed from Linux "
654 "B<FUTEX_FD> はもともと競合が起きやすかったため、 Linux 2.6.26 以降で削除され"
658 #: build/C/man2/futex.2:176
660 msgid "B<FUTEX_REQUEUE> (since Linux 2.5.70)"
661 msgstr "B<FUTEX_REQUEUE> (Linux 2.5.70 以降)"
664 #: build/C/man2/futex.2:191
666 "This operation was introduced in order to avoid a \"thundering herd\" effect "
667 "when B<FUTEX_WAKE> is used and all processes woken up need to acquire "
668 "another futex. This call wakes up I<val> processes, and requeues all other "
669 "waiters on the futex at address I<uaddr2>. The arguments I<timeout> and "
670 "I<val3> are ignored."
672 "この操作は、 B<FUTEX_WAKE> が使われていて、かつ wake されている全てのプロセス"
673 "が 他の futex を取得する必要がある場合に、 「獣の群れの暴走 (thundering "
674 "herd)」効果を避けるために導入された。 この呼び出しは I<val> 個のプロセスを "
675 "wake し、アドレス I<uaddr2> で futex を待っている他の全てのプロセスを再度"
676 "キューにいれる。 引き数 I<timeout> と I<val3> は無視される。"
679 #: build/C/man2/futex.2:191
681 msgid "B<FUTEX_CMP_REQUEUE> (since Linux 2.6.7)"
682 msgstr "B<FUTEX_CMP_REQUEUE> (Linux 2.6.7 以降)"
685 #: build/C/man2/futex.2:209
687 "There was a race in the intended use of B<FUTEX_REQUEUE>, so "
688 "B<FUTEX_CMP_REQUEUE> was introduced. This is similar to B<FUTEX_REQUEUE>, "
689 "but first checks whether the location I<uaddr> still contains the value "
690 "I<val3>. If not, the operation fails with the error B<EAGAIN>. The "
691 "argument I<timeout> is ignored."
693 "故意に B<FUTEX_REQUEUE> を使う場合に競合が起こるため、 B<FUTEX_CMP_REQUEUE> "
694 "が導入された。これは B<FUTEX_REQUEUE> と似ているが、場所 I<uaddr> に値 "
695 "I<val3> がまだ保持されているかを最初にチェックする。 保持されていない場合、操"
696 "作はエラー B<EAGAIN> で失敗する。引き数 I<timeout> は無視される。"
699 #: build/C/man2/futex.2:216
702 #| "In the event of an error, all operations return -1, and set I<errno> to "
703 #| "indicate the error."
705 "In the event of an error, all operations return -1, and set I<errno> to "
706 "indicate the error. The return value on success depends on the operation, "
707 "as described in the following list:"
709 "エラーの場合、全ての操作で -1 が返り、 I<errno> がエラーの内容を示す値に設定"
713 #: build/C/man2/futex.2:222
715 "Returns 0 if the process was woken by a B<FUTEX_WAKE> call. See ERRORS for "
716 "the various possible error returns."
720 #: build/C/man2/futex.2:225 build/C/man2/futex.2:231 build/C/man2/futex.2:234
721 msgid "Returns the number of processes woken up."
722 msgstr "wake したプロセスの数を返す。"
725 #: build/C/man2/futex.2:225
731 #: build/C/man2/futex.2:228
732 msgid "Returns the new file descriptor associated with the futex."
733 msgstr "futex に関連づけられた新たなファイルディスクリプタを返す。"
736 #: build/C/man2/futex.2:228
738 msgid "B<FUTEX_REQUEUE>"
739 msgstr "B<FUTEX_REQUEUE>"
742 #: build/C/man2/futex.2:231
744 msgid "B<FUTEX_CMP_REQUEUE>"
745 msgstr "B<FUTEX_CMP_REQUEUE>"
748 #: build/C/man2/futex.2:235 build/C/man2/quotactl.2:486
754 #: build/C/man2/futex.2:238
755 msgid "No read access to futex memory."
756 msgstr "futex メモリに読み込みアクセス権がなかった。"
759 #: build/C/man2/futex.2:238 build/C/man2/sendfile.2:116
765 #: build/C/man2/futex.2:249
768 #| "B<FUTEX_CMP_REQUEUE> found an unexpected futex value. (This probably "
769 #| "indicates a race; use the safe B<FUTEX_WAKE> now.)"
771 "B<FUTEX_CMP_REQUEUE> detected that the value pointed to by I<uaddr> is not "
772 "equal to the expected value I<val3>. (This probably indicates a race; use "
773 "the safe B<FUTEX_WAKE> now.)"
775 "B<FUTEX_CMP_REQUEUE> で予期しない futex 値が見つかった (これは競合を示してい"
776 "るかもしれない。 この場合は安全な B<FUTEX_WAKE> を使うこと)。"
779 #: build/C/man2/futex.2:254
780 msgid "Error retrieving I<timeout> information from user space."
781 msgstr "ユーザ空間から I<timeout> の情報を取得する際にエラーが発生した。"
784 #: build/C/man2/futex.2:254
790 #: build/C/man2/futex.2:261
792 "A B<FUTEX_WAIT> operation was interrupted by a signal (see B<signal>(7)) or "
797 #: build/C/man2/futex.2:264
798 msgid "Invalid argument."
802 #: build/C/man2/futex.2:264
808 #: build/C/man2/futex.2:267
809 msgid "The system limit on the total number of open files has been reached."
810 msgstr "オープンされているファイルの総数がシステムの制限に達した。"
813 #: build/C/man2/futex.2:267 build/C/man2/modify_ldt.2:126
814 #: build/C/man2/pciconfig_read.2:93 build/C/man2/quotactl.2:447
815 #: build/C/man2/vm86.2:62
821 #: build/C/man2/futex.2:271
822 msgid "Invalid operation specified in I<op>."
823 msgstr "I<op> に無効な操作が指定された。"
826 #: build/C/man2/futex.2:271
829 msgstr "B<ETIMEDOUT>"
832 #: build/C/man2/futex.2:276
833 msgid "Timeout during the B<FUTEX_WAIT> operation."
837 #: build/C/man2/futex.2:276
839 msgid "B<EWOULDBLOCK>"
840 msgstr "B<EWOULDBLOCK>"
843 #: build/C/man2/futex.2:286
845 "I<op> was B<FUTEX_WAIT> and the value pointed to by I<uaddr> was not equal "
846 "to the expected value I<val> at the time of the call."
850 #: build/C/man2/futex.2:286 build/C/man2/get_robust_list.2:115
851 #: build/C/man2/getunwind.2:94 build/C/man2/kexec_load.2:138
852 #: build/C/man2/lookup_dcookie.2:73 build/C/man2/perfmonctl.2:196
853 #: build/C/man2/pivot_root.2:125 build/C/man2/process_vm_readv.2:276
854 #: build/C/man2/sendfile.2:142 build/C/man2/set_tid_address.2:94
855 #: build/C/man2/splice.2:165 build/C/man2/tee.2:114
856 #: build/C/man2/vmsplice.2:138
862 #: build/C/man2/futex.2:296
864 "Initial futex support was merged in Linux 2.5.7 but with different semantics "
865 "from what was described above. A 4-argument system call with the semantics "
866 "described in this page was introduced in Linux 2.5.40. In Linux 2.5.70 one "
867 "argument was added. In Linux 2.6.7 a sixth argument was added\\(emmessy, "
868 "especially on the s390 architecture."
870 "最初の futex 対応は Linux 2.5.7 で組み込まれたが、 上記のセマンティクスとは異"
871 "なる。 4 つの引き数のここに書かれているセマンティクスを持つ システムコール"
872 "は、Linux 2.5.40 で導入された。 Linux 2.5.70 では 1 つの引き数が追加された。 "
873 "Linux 2.6.7 では 6 番目の引き数が追加された。 これは汚く、s390 アーキテクチャ"
877 #: build/C/man2/futex.2:298 build/C/man2/kexec_load.2:144
878 #: build/C/man2/set_tid_address.2:99 build/C/man2/splice.2:172
879 #: build/C/man2/tee.2:121 build/C/man2/vmsplice.2:145
880 msgid "This system call is Linux-specific."
881 msgstr "このシステムコールは Linux 固有である。"
885 #. Futexes were designed and worked on by
886 #. Hubertus Franke (IBM Thomas J. Watson Research Center),
887 #. Matthew Kirkwood, Ingo Molnar (Red Hat)
888 #. and Rusty Russell (IBM Linux Technology Center).
889 #. This page written by bert hubert.
891 #: build/C/man2/futex.2:312
893 "To reiterate, bare futexes are not intended as an easy-to-use abstraction "
894 "for end-users. (There is no wrapper function for this system call in "
895 "glibc.) Implementors are expected to be assembly literate and to have read "
896 "the sources of the futex user-space library referenced below."
898 "繰り返すが、裸の futex はエンドユーザが容易に使うことのできる概念として 意図"
899 "されたものではない (glibc にはこのシステムコールに対するラッパー関数はな"
900 "い)。 実装者は、アセンブリ言語に慣れており、以下に挙げる futex ユーザ空間ライ"
901 "ブラリの ソースを読み終えていることが要求される。"
904 #: build/C/man2/futex.2:314
909 #: build/C/man2/futex.2:317
911 "I<Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux> (proceedings "
912 "of the Ottawa Linux Symposium 2002), online at"
914 "I<Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux> (proceedings "
915 "of the Ottawa Linux Symposium 2002), online at"
918 #: build/C/man2/futex.2:320
920 "E<.UR http://kernel.org\\:/doc\\:/ols\\:/2002\\:/ols2002-pages-479-495.pdf> "
922 msgstr "E<.UR http://kernel.org\\:/doc\\:/ols\\:/2002\\:/ols2002-pages-479-495.pdf> E<.UE>"
925 #: build/C/man2/futex.2:322
926 msgid "Futex example library, futex-*.tar.bz2 at"
927 msgstr "futex の使用例ライブラリ, futex-*.tar.bz2"
930 #: build/C/man2/futex.2:325
932 "E<.UR ftp://ftp.nl.kernel.org\\:/pub\\:/linux\\:/kernel\\:/people\\:/rusty/> "
934 msgstr "E<.UR ftp://ftp.nl.kernel.org\\:/pub\\:/linux\\:/kernel\\:/people\\:/rusty/> E<.UE>"
937 #: build/C/man2/get_robust_list.2:29
939 msgid "GET_ROBUST_LIST"
940 msgstr "GET_ROBUST_LIST"
943 #: build/C/man2/get_robust_list.2:29 build/C/man2/kexec_load.2:26
944 #: build/C/man2/modify_ldt.2:24 build/C/man2/pivot_root.2:10
950 #: build/C/man2/get_robust_list.2:29
952 msgid "Linux System Calls"
956 #: build/C/man2/get_robust_list.2:32
957 msgid "get_robust_list, set_robust_list - get/set list of robust futexes"
961 #: build/C/man2/get_robust_list.2:36
964 "B<#include E<lt>linux/futex.hE<gt>>\n"
965 "B<#include E<lt>syscall.hE<gt>>\n"
967 "B<#include E<lt>linux/futex.hE<gt>>\n"
968 "B<#include E<lt>syscall.hE<gt>>\n"
971 #: build/C/man2/get_robust_list.2:40
974 "B<long get_robust_list(int >I<pid>B<, struct robust_list_head **>I<head_ptr>B<,>\n"
975 "B<\t\t\t size_t *>I<len_ptr>B<);>\n"
976 "B<long set_robust_list(struct robust_list_head *>I<head>B<, size_t >I<len>B<);>\n"
980 #: build/C/man2/get_robust_list.2:44
981 msgid "I<Note>: There are no glibc wrappers for these system calls; see NOTES."
985 #: build/C/man2/get_robust_list.2:49
987 "The robust futex implementation needs to maintain per-thread lists of robust "
988 "futexes which are unlocked when the thread exits. These lists are managed "
989 "in user space; the kernel is only notified about the location of the head of "
994 #: build/C/man2/get_robust_list.2:65
996 "The B<get_robust_list>() system call returns the head of the robust futex "
997 "list of the thread whose thread ID is specified in I<pid>. If I<pid> is 0, "
998 "the head of the list for the calling thread is returned. The list head is "
999 "stored in the location pointed to by I<head_ptr>. The size of the object "
1000 "pointed to by I<**head_ptr> is stored in I<len_ptr>."
1004 #: build/C/man2/get_robust_list.2:77
1006 "The B<set_robust_list>() system call requests the kernel to record the head "
1007 "of the list of robust futexes owned by the calling thread. The I<head> "
1008 "argument is the list head to record. The I<len> argument should be I<sizeof"
1013 #: build/C/man2/get_robust_list.2:84
1015 "The B<set_robust_list>() and B<get_robust_list>() system calls return zero "
1016 "when the operation is successful, an error code otherwise."
1020 #: build/C/man2/get_robust_list.2:88
1022 "The B<set_robust_list>() system call can fail with the following error:"
1026 #: build/C/man2/get_robust_list.2:94
1028 "I<len> does not match the size of structure B<struct robust_list_head> "
1029 "expected by kernel."
1033 #: build/C/man2/get_robust_list.2:98
1035 "The B<get_robust_list>() system call can fail with the following errors:"
1039 #: build/C/man2/get_robust_list.2:106
1041 "The calling process does not have permission to see the robust futex list of "
1042 "the thread with the thread ID I<pid>, and does not have the "
1043 "B<CAP_SYS_PTRACE> capability."
1047 #: build/C/man2/get_robust_list.2:106 build/C/man2/process_vm_readv.2:271
1048 #: build/C/man2/ptrace.2:1765 build/C/man2/quotactl.2:461
1049 #: build/C/man2/quotactl.2:504
1055 #: build/C/man2/get_robust_list.2:111
1056 msgid "No thread with the thread ID I<pid> could be found."
1060 #: build/C/man2/get_robust_list.2:115
1062 "The head of the robust futex list can't be stored at the location I<head>."
1066 #: build/C/man2/get_robust_list.2:119
1068 "These system calls were added in Linux 2.6.17. No library support is "
1069 "provided; use B<syscall>(2)."
1071 "これらのシステムコールは Linux 2.6.17 で追加された。ライブラリによる\n"
1072 "サポートは提供されていない。 B<syscall>(2) を使うこと。"
1075 #: build/C/man2/get_robust_list.2:124
1078 #| "These system calls are not needed by normal applications. No support for "
1079 #| "them is provided in glibc."
1081 "These system calls are not needed by normal applications. No support for "
1082 "them is provided in glibc. In the unlikely event that you want to call them "
1083 "directly, use B<syscall>(2)."
1085 "通常のアプリケーションでは、これらのシステムコールは必要ではない。\n"
1086 "glibc によるサポートは提供されていない。"
1089 #: build/C/man2/get_robust_list.2:128
1091 "A thread can have only one robust futex list; therefore applications that "
1092 "wish to use this functionality should use the robust mutexes provided by "
1096 #. .BR pthread_mutexattr_setrobust_np (3)
1098 #: build/C/man2/get_robust_list.2:131
1100 msgstr "B<futex>(2)"
1102 #. http://lwn.net/Articles/172149/
1104 #: build/C/man2/get_robust_list.2:137
1106 "I<Documentation/robust-futexes.txt> and I<Documentation/robust-futex-ABI."
1107 "txt> in the Linux kernel source tree"
1111 #: build/C/man2/getunwind.2:27
1117 #: build/C/man2/getunwind.2:27 build/C/man2/perfmonctl.2:27
1119 #| msgid "2009-02-20"
1124 #: build/C/man2/getunwind.2:30
1125 msgid "getunwind - copy the unwind data to caller's buffer"
1129 #: build/C/man2/getunwind.2:34
1132 #| "B<#include E<lt>sys/quota.hE<gt>>\n"
1133 #| "B<#include E<lt>xfs/xqm.hE<gt>>\n"
1135 "B<#include E<lt>syscall.hE<gt>>\n"
1136 "B<#include E<lt>linux/unwind.hE<gt>>\n"
1138 "B<#include E<lt>sys/quota.hE<gt>>\n"
1139 "B<#include E<lt>xfs/xqm.hE<gt>>\n"
1142 #: build/C/man2/getunwind.2:36
1144 msgid "B<long getunwind(void >I<*buf>B<, size_t >I<buf_size>B<);>\n"
1148 #: build/C/man2/getunwind.2:40 build/C/man2/kexec_load.2:39
1149 #: build/C/man2/modify_ldt.2:36 build/C/man2/perf_event_open.2:42
1150 #: build/C/man2/perfmonctl.2:39 build/C/man2/pivot_root.2:18
1151 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
1155 #: build/C/man2/getunwind.2:42
1156 msgid "I<Note: this function is obsolete.>"
1160 #: build/C/man2/getunwind.2:52
1162 "The IA-64-specific B<getunwind>() system call copies the kernel's call "
1163 "frame unwind data into the buffer pointed to by I<buf> and returns the size "
1164 "of the unwind data; this data describes the gate page (kernel code that is "
1165 "mapped into user space)."
1169 #: build/C/man2/getunwind.2:64
1171 "The size of the buffer I<buf> is specified in I<buf_size>. The data is "
1172 "copied only if I<buf_size> is greater than or equal to the size of the "
1173 "unwind data and I<buf> is not NULL; otherwise, no data is copied, and the "
1174 "call succeeds, returning the size that would be needed to store the unwind "
1179 #: build/C/man2/getunwind.2:68
1181 "The first part of the unwind data contains an unwind table. The rest "
1182 "contains the associated unwind information, in no particular order. The "
1183 "unwind table contains entries of the following form:"
1187 #: build/C/man2/getunwind.2:73
1190 "\tu64 start; (64-bit address of start of function)\n"
1191 "\tu64 end; (64-bit address of end of function)\n"
1192 "\tu64 info; (BUF-relative offset to unwind info)\n"
1196 #: build/C/man2/getunwind.2:81
1198 "An entry whose I<start> value is zero indicates the end of the table. For "
1199 "more information about the format, see the I<IA-64 Software Conventions and "
1200 "Runtime Architecture> manual."
1204 #: build/C/man2/getunwind.2:88
1207 #| "On success, B<kexec_load>() returns 0. On error, -1 is returned and "
1208 #| "I<errno> is set to indicate the error."
1210 "On success, B<getunwind>() returns the size of unwind table. On error, -1 "
1211 "is returned and I<errno> is set to indicate the error."
1213 "成功すると、 B<kexec_load> は 0 を返す。\n"
1214 "エラーの場合、 -1 が返り、 I<errno> にエラーを示す値が設定される。"
1217 #: build/C/man2/getunwind.2:94
1219 "B<getunwind>() fails with the error B<EFAULT> if the unwind info can't be "
1220 "stored in the space specified by I<buf>."
1224 #: build/C/man2/getunwind.2:96
1226 #| msgid "These calls are Linux-specific, available since Linux 2.0.26/2.1.11."
1227 msgid "This system call is available since Linux 2.4."
1229 "これらの呼び出しは Linux 特有のものであり、 Linux 2.0.26/2.1.11 から使用可能"
1233 #: build/C/man2/getunwind.2:99
1235 "This system call is Linux specific, and is available only on the IA-64 "
1240 #: build/C/man2/getunwind.2:107
1242 "This system call has been deprecated. The modern way to obtain the kernel's "
1243 "unwind data is via the gate DSO. The address of the ELF header for this DSO "
1244 "is passed to user level via B<AT_SYSINFO_EHDR> (see B<getauxval>(3))."
1248 #: build/C/man2/getunwind.2:111
1251 #| "Glibc does not provide a wrapper for this system call; call it using "
1254 "Glibc does not provide a wrapper for this system call; in the unlikely event "
1255 "that you want to call it, use B<syscall>(2)."
1257 "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>"
1261 #: build/C/man2/getunwind.2:113
1262 msgid "B<getauxval>(3)"
1263 msgstr "B<getauxval>(3)"
1266 #: build/C/man2/kexec_load.2:26
1272 #: build/C/man2/kexec_load.2:29
1273 msgid "kexec_load - load a new kernel for later execution"
1274 msgstr "kexec_load - 新しいカーネルを後で実行するためにロードする"
1277 #: build/C/man2/kexec_load.2:31
1278 msgid "B<#include E<lt>linux/kexec.hE<gt>>"
1279 msgstr "B<#include E<lt>linux/kexec.hE<gt>>"
1282 #: build/C/man2/kexec_load.2:33
1284 "B<long kexec_load(unsigned long >I<entry>B<, unsigned long >I<nr_segments>B<,"
1287 "B<long kexec_load(unsigned long >I<entry>B<, unsigned long >I<nr_segments>B<,"
1291 #: build/C/man2/kexec_load.2:36
1292 msgid "B< struct kexec_segment *>I<segments>B<, unsigned long >I<flags>B<);>"
1293 msgstr "B< struct kexec_segment *>I<segments>B<, unsigned long >I<flags>B<);>"
1296 #: build/C/man2/kexec_load.2:44
1298 "The B<kexec_load>() system call loads a new kernel that can be executed "
1299 "later by B<reboot>(2)."
1301 "B<kexec_load>() システムコールは、新しいカーネルをロードし、\n"
1302 "その後の B<reboot>(2) で実行できるようにする。"
1305 #: build/C/man2/kexec_load.2:50
1307 "The I<flags> argument is a mask whose high-order bits control the operation "
1308 "of the call. The following values can be specified in I<flags>:"
1310 "I<flags> 引き数はマスクビットで、\n"
1311 "その上位ビットでシステムコールの呼び出しの動作を制御する。\n"
1312 "I<flags> には以下の値を指定できる。"
1315 #: build/C/man2/kexec_load.2:50
1317 msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
1318 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
1320 #. FIXME figure out how this is really used
1322 #: build/C/man2/kexec_load.2:54
1323 msgid "Execute the new kernel automatically on a system crash."
1324 msgstr "システムのクラッシュ時に、新しいカーネルを自動的に実行する。"
1327 #: build/C/man2/kexec_load.2:54
1329 #| msgid "B<KEXEC_PRESERVE_CONTEXT> (since Linux 2.7.27)"
1330 msgid "B<KEXEC_PRESERVE_CONTEXT> (since Linux 2.6.27)"
1331 msgstr "B<KEXEC_PRESERVE_CONTEXT> (Linux 2.7.27 以降)"
1334 #: build/C/man2/kexec_load.2:64
1336 "Preserve the system hardware and software states before executing the new "
1337 "kernel. This could be used for system suspend. This flag is only available "
1338 "if the kernel was configured with B<CONFIG_KEXEC_JUMP>, and is only "
1339 "effective if I<nr_segments> is greater than 0."
1342 "システムのハードウェアとソフトウェアの状態を保存する。\n"
1343 "システムの中断時 (suspend) などで使用できる。\n"
1344 "このフラグは、カーネルの設定で B<CONFIG_KEXEC_JUMP> が有効の場合のみ\n"
1345 "利用可能であり、 I<nr_segments> が 0 より大きい場合のみ効果がある。"
1348 #: build/C/man2/kexec_load.2:84
1350 "The low-order bits of I<flags> contain the architecture of the to-be-"
1351 "executed kernel. Specify (OR) the constant B<KEXEC_ARCH_DEFAULT> to use the "
1352 "current architecture, or one of the following architecture constants "
1353 "B<KEXEC_ARCH_386>, B<KEXEC_ARCH_X86_64>, B<KEXEC_ARCH_PPC>, "
1354 "B<KEXEC_ARCH_PPC64>, B<KEXEC_ARCH_IA_64>, B<KEXEC_ARCH_ARM>, "
1355 "B<KEXEC_ARCH_S390>, B<KEXEC_ARCH_SH>, B<KEXEC_ARCH_MIPS>, and "
1356 "B<KEXEC_ARCH_MIPS_LE>. The architecture must be executable on the CPU of "
1359 "I<flags> の下位ビットには、実行されるカーネルのアーキテクチャが入る。\n"
1360 "現在のアーキテクチャを使うことを意味する定数 B<KEXEC_ARCH_DEFAULT> か、\n"
1361 "アーキテクチャ定数 B<KEXEC_ARCH_386>, B<KEXEC_ARCH_X86_64>,\n"
1362 "B<KEXEC_ARCH_PPC>, B<KEXEC_ARCH_PPC64>, B<KEXEC_ARCH_IA_64>,\n"
1363 "B<KEXEC_ARCH_ARM>, B<KEXEC_ARCH_S390>, B<KEXEC_ARCH_SH>,\n"
1364 "B<KEXEC_ARCH_MIPS>, B<KEXEC_ARCH_MIPS_LE> の\n"
1365 "いずれか一つを (OR で) 指定する。指定するアーキテクチャは、\n"
1366 "システムの CPU で実行可能なものでなければならない。"
1369 #: build/C/man2/kexec_load.2:98
1371 "The I<entry> argument is the physical entry address in the kernel image. "
1372 "The I<nr_segments> argument is the number of segments pointed to by the "
1373 "I<segments> pointer. The I<segments> argument is an array of "
1374 "I<kexec_segment> structures which define the kernel layout:"
1376 "I<entry> 引き数は、カーネルイメージの物理エントリーアドレスである。\n"
1377 "I<nr_segments> 引き数は、 I<segments> ポインタが指すセグメントの\n"
1378 "数である。 I<segments> 引き数は I<kexec_segment> 構造体の配列で、\n"
1379 "この構造体によりカーネルの配置が定義される。"
1382 #: build/C/man2/kexec_load.2:107
1385 "struct kexec_segment {\n"
1386 " void *buf; /* Buffer in user space */\n"
1387 " size_t bufsz; /* Buffer length in user space */\n"
1388 " void *mem; /* Physical address of kernel */\n"
1389 " size_t memsz; /* Physical address length */\n"
1392 "struct kexec_segment {\n"
1393 " void *buf; /* Buffer in user space */\n"
1394 " size_t bufsz; /* Buffer length in user space */\n"
1395 " void *mem; /* Physical address of kernel */\n"
1396 " size_t memsz; /* Physical address length */\n"
1399 #. FIXME elaborate on the following:
1401 #: build/C/man2/kexec_load.2:114
1403 "The kernel image defined by I<segments> is copied from the calling process "
1404 "into previously reserved memory."
1406 "I<segments> で定義されたカーネルイメージは、\n"
1407 "呼び出したプロセスから予約済みメモリにコピーされる。"
1410 #: build/C/man2/kexec_load.2:121
1412 "On success, B<kexec_load>() returns 0. On error, -1 is returned and "
1413 "I<errno> is set to indicate the error."
1415 "成功すると、 B<kexec_load> は 0 を返す。\n"
1416 "エラーの場合、 -1 が返り、 I<errno> にエラーを示す値が設定される。"
1419 #: build/C/man2/kexec_load.2:122 build/C/man2/pivot_root.2:110
1420 #: build/C/man2/ptrace.2:1728 build/C/man2/quotactl.2:495
1426 #: build/C/man2/kexec_load.2:126
1428 "Another crash kernel is already being loaded or a crash kernel is already in "
1431 "別のクラッシュカーネルがすでにロードされているか、\n"
1432 "クラッシュカーネルがすでに使用されている。"
1434 #. KEXEC_SEGMENT_MAX == 16
1436 #: build/C/man2/kexec_load.2:133
1437 msgid "I<flags> is invalid; or I<nr_segments> is too large"
1438 msgstr "I<flags> が無効である。 I<nr_segments> が大きすぎる。"
1441 #: build/C/man2/kexec_load.2:138
1442 msgid "The caller does not have the B<CAP_SYS_BOOT> capability."
1443 msgstr "呼び出し側が B<CAP_SYS_BOOT> ケーパビリティを持っていない。"
1446 #: build/C/man2/kexec_load.2:142
1447 msgid "The B<kexec_load>() system call first appeared in Linux 2.6.13."
1448 msgstr "B<kexec_load>() システムコールは Linux 2.6.13 で初めて登場した。"
1451 #: build/C/man2/kexec_load.2:149
1453 "Currently, there is no glibc support for B<kexec_load>(). Call it using "
1456 "現在のところ、 B<kexec_load>() は glibc ではサポートされていない。\n"
1457 "B<syscall>(2) を使って呼び出すこと。"
1459 #. FIXME Andi submitted a patch for this.
1460 #. Check if it got accepted later.
1462 #: build/C/man2/kexec_load.2:156
1465 #| "The required constants are in the kernel source file I<linux/kexec.h>, "
1466 #| "which is not currently exported to glibc. Therefore, these constants "
1467 #| "must be defined manually."
1469 "The required constants are in the Linux kernel source file I<linux/kexec.h>, "
1470 "which is not currently exported to glibc. Therefore, these constants must "
1471 "be defined manually."
1473 "必要な定数はカーネルのソースファイル I<linux/kexec.h> で定義されている\n"
1474 "が、現在のところ glibc には公開されていない。\n"
1475 "そのため、これらの定数は手動で定義しなければならない。"
1478 #: build/C/man2/kexec_load.2:159
1480 "This system call is only available if the kernel was configured with "
1483 "このシステムコールは、カーネルの設定で B<CONFIG_KEXEC> が有効になって\n"
1487 #: build/C/man2/kexec_load.2:162
1488 msgid "B<reboot>(2), B<syscall>(2)"
1489 msgstr "B<reboot>(2), B<syscall>(2)"
1492 #: build/C/man2/lookup_dcookie.2:27
1494 msgid "LOOKUP_DCOOKIE"
1495 msgstr "LOOKUP_DCOOKIE"
1498 #: build/C/man2/lookup_dcookie.2:27
1504 #: build/C/man2/lookup_dcookie.2:30
1505 msgid "lookup_dcookie - return a directory entry's path"
1506 msgstr "lookup_dcookie - ディレクトリ・エントリのパス名を返す"
1509 #: build/C/man2/lookup_dcookie.2:32
1511 "B<int lookup_dcookie(u64 >I<cookie>B<, char *>I<buffer>B<, size_t >I<len>B<);"
1514 "B<int lookup_dcookie(u64 >I<cookie>B<, char *>I<buffer>B<, size_t >I<len>B<);"
1518 #: build/C/man2/lookup_dcookie.2:38
1520 "Look up the full path of the directory entry specified by the value "
1521 "I<cookie>. The cookie is an opaque identifier uniquely identifying a "
1522 "particular directory entry. The buffer given is filled in with the full "
1523 "path of the directory entry."
1525 "I<cookie> 値で指定されたディレクトリ・エントリのフルパス名を検索する。 "
1526 "cookie は、個々のディレクトリ・エントリを区別する内部識別子 (opaque "
1527 "identifier) である。引き数で指定されたバッファに、ディレクトリ・エントリの フ"
1531 #: build/C/man2/lookup_dcookie.2:43
1533 "For B<lookup_dcookie>() to return successfully, the kernel must still hold "
1534 "a cookie reference to the directory entry."
1536 "B<lookup_dcookie>() が正常に値を返すためには、カーネルがディレクトリ・エント"
1537 "リへの cookie 参照を 保持していなければならない。"
1540 #: build/C/man2/lookup_dcookie.2:50
1542 "On success, B<lookup_dcookie>() returns the length of the path string "
1543 "copied into the buffer. On error, -1 is returned, and I<errno> is set "
1546 "成功した場合、 B<lookup_dcookie>() はバッファにコピーしたパス文字列の長さを"
1547 "返す。 エラーの場合は -1 を返し、 I<errno> に適切な値を設定する。"
1550 #: build/C/man2/lookup_dcookie.2:54
1551 msgid "The buffer was not valid."
1552 msgstr "バッファが有効でなかった。"
1555 #: build/C/man2/lookup_dcookie.2:58
1557 "The kernel has no registered cookie/directory entry mappings at the time of "
1558 "lookup, or the cookie does not refer to a valid directory entry."
1560 "検索が行われた時、cookie とディレクトリ・エントリのマッピングがカーネルに 登"
1561 "録されていなかったか、または cookie が有効なディレクトリ・エントリを 参照して"
1565 #: build/C/man2/lookup_dcookie.2:58
1567 msgid "B<ENAMETOOLONG>"
1568 msgstr "B<ENAMETOOLONG>"
1571 #: build/C/man2/lookup_dcookie.2:61
1572 msgid "The name could not fit in the buffer."
1573 msgstr "名前がバッファに入り切らなかった。"
1576 #: build/C/man2/lookup_dcookie.2:61 build/C/man2/process_vm_readv.2:262
1577 #: build/C/man2/sendfile.2:138 build/C/man2/splice.2:155
1578 #: build/C/man2/tee.2:111 build/C/man2/vmsplice.2:135
1584 #: build/C/man2/lookup_dcookie.2:65
1586 "The kernel could not allocate memory for the temporary buffer holding the "
1589 "カーネルが、パス名を保持する一時バッファ用のメモリを割り当てることが できな"
1593 #: build/C/man2/lookup_dcookie.2:70
1595 "The process does not have the capability B<CAP_SYS_ADMIN> required to look "
1598 "プロセスが cookie 値を検索するのに必要なケーパビリティ B<CAP_SYS_ADMIN> を"
1602 #: build/C/man2/lookup_dcookie.2:70 build/C/man2/quotactl.2:474
1608 #: build/C/man2/lookup_dcookie.2:73
1610 "The buffer was not large enough to hold the path of the directory entry."
1612 "バッファが、ディレクトリ・エントリのパス名を収容するのに 十分な大きさではな"
1616 #: build/C/man2/lookup_dcookie.2:78
1618 "Available since Linux 2.5.43. The B<ENAMETOOLONG> error return was added in "
1621 "Linux 2.5.43 以降で利用できる。 エラー B<ENAMETOOLONG> を返す仕様は 2.5.70 で"
1625 #: build/C/man2/lookup_dcookie.2:81
1626 msgid "B<lookup_dcookie>() is Linux-specific."
1627 msgstr "B<lookup_dcookie>() は Linux 独自の関数である。"
1630 #: build/C/man2/lookup_dcookie.2:85
1632 "B<lookup_dcookie>() is a special-purpose system call, currently used only "
1633 "by the oprofile profiler. It relies on a kernel driver to register cookies "
1634 "for directory entries."
1636 "B<lookup_dcookie>() は特殊な用途に使われるシステムコールで、現在のところ "
1637 "oprofile profiler で 使われているだけである。"
1640 #: build/C/man2/lookup_dcookie.2:88
1642 "The path returned may be suffixed by the string \" (deleted)\" if the "
1643 "directory entry has been removed."
1645 "指定されたディレクトリ・エントリが削除されていた場合、返されるパス名の最後に "
1646 "\" (deleted)\" という文字列が付加されることがある。"
1649 #: build/C/man2/modify_ldt.2:24
1655 #: build/C/man2/modify_ldt.2:27
1656 msgid "modify_ldt - get or set ldt"
1657 msgstr "modify_ldt - ldt を設定または取得する"
1660 #: build/C/man2/modify_ldt.2:30
1662 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
1663 msgstr "B<#include E<lt>sys/types.hE<gt>>\n"
1666 #: build/C/man2/modify_ldt.2:32
1668 msgid "B<int modify_ldt(int >I<func>B<, void *>I<ptr>B<, unsigned long >I<bytecount>B<);>\n"
1669 msgstr "B<int modify_ldt(int >I<func>B<, void *>I<ptr>B<, unsigned long >I<bytecount>B<);>\n"
1672 #: build/C/man2/modify_ldt.2:41
1674 "B<modify_ldt>() reads or writes the local descriptor table (ldt) for a "
1675 "process. The ldt is a per-process memory management table used by the i386 "
1676 "processor. For more information on this table, see an Intel 386 processor "
1679 "B<modify_ldt>() はプロセスのローカル・ディスクリプタ・テーブル (local "
1680 "descriptor table; ldt) を読み書きする。 ldt は i386 プロセッサで使用されるプ"
1681 "ロセスごとのメモリ管理テーブルである。 このテーブルに関してのより詳しい情報"
1682 "は Intel 386 processor handbook を 参照すること。"
1685 #: build/C/man2/modify_ldt.2:51
1687 "When I<func> is 0, B<modify_ldt>() reads the ldt into the memory pointed to "
1688 "by I<ptr>. The number of bytes read is the smaller of I<bytecount> and the "
1689 "actual size of the ldt."
1691 "I<func> が 0 ならば、 B<modify_ldt>() は ldt を I<ptr> が指しているメモリに"
1692 "読み込む。 読み込むバイト数は実際の ldt のサイズか I<bytecount> より小さい方"
1695 #. FIXME ? say something about func == 2 and func == 0x11?
1696 #. In Linux 2.4, func == 2 returned "the default ldt"
1697 #. In Linux 2.6, func == 2 is a nop, returning a zeroed out structure.
1698 #. Linux 2.4 and 2.6 implement an operation for func == 0x11
1700 #: build/C/man2/modify_ldt.2:69
1702 "When I<func> is 1, B<modify_ldt>() modifies one ldt entry. I<ptr> points "
1703 "to a I<user_desc> structure and I<bytecount> must equal the size of this "
1706 "I<func> が 1 ならば、 B<modify_ldt>() は ldt エントリの一つを変更する。 "
1707 "I<ptr> は I<user_desc> 構造体を指し、 I<bytecount> はこの構造体の大きさに等し"
1711 #: build/C/man2/modify_ldt.2:73
1712 msgid "The I<user_desc> structure is defined in I<E<lt>asm/ldt.hE<gt>> as:"
1714 "I<user_desc> 構造体は I<E<lt>asm/ldt.hE<gt>> で以下のように定義されている:"
1717 #: build/C/man2/modify_ldt.2:87
1720 "struct user_desc {\n"
1721 " unsigned int entry_number;\n"
1722 " unsigned long base_addr;\n"
1723 " unsigned int limit;\n"
1724 " unsigned int seg_32bit:1;\n"
1725 " unsigned int contents:2;\n"
1726 " unsigned int read_exec_only:1;\n"
1727 " unsigned int limit_in_pages:1;\n"
1728 " unsigned int seg_not_present:1;\n"
1729 " unsigned int useable:1;\n"
1732 "struct user_desc {\n"
1733 " unsigned int entry_number;\n"
1734 " unsigned long base_addr;\n"
1735 " unsigned int limit;\n"
1736 " unsigned int seg_32bit:1;\n"
1737 " unsigned int contents:2;\n"
1738 " unsigned int read_exec_only:1;\n"
1739 " unsigned int limit_in_pages:1;\n"
1740 " unsigned int seg_not_present:1;\n"
1741 " unsigned int useable:1;\n"
1745 #. The ldt is specific for the calling process. Any attempts to change
1746 #. the ldt to include the address space of another process or the kernel
1747 #. will result in a segmentation violation when trying to access the memory
1748 #. outside of the process address space. The memory protection is enforced
1749 #. at the paging layer.
1751 #: build/C/man2/modify_ldt.2:98
1752 msgid "In Linux 2.4 and earlier, this structure was named I<modify_ldt_ldt_s>."
1754 "Linux 2.4 以前では、この構造体は I<modify_ldt_ldt_s> という名前であった。"
1757 #: build/C/man2/modify_ldt.2:108
1759 "On success, B<modify_ldt>() returns either the actual number of bytes read "
1760 "(for reading) or 0 (for writing). On failure, B<modify_ldt>() returns -1 "
1761 "and sets I<errno> to indicate the error."
1763 "成功した場合は、 B<modify_ldt>() は (読み込みの場合は) 実際に読み込んだバイ"
1764 "ト数、 または (書き込みの場合は) 0 を返す。 失敗した場合は B<modify_ldt>() "
1765 "は -1 を返し、 I<errno> をエラーを示す値に設定する。"
1768 #: build/C/man2/modify_ldt.2:113
1769 msgid "I<ptr> points outside the address space."
1770 msgstr "I<ptr> がアドレス空間の外を指している。"
1773 #: build/C/man2/modify_ldt.2:126
1775 "I<ptr> is 0, or I<func> is 1 and I<bytecount> is not equal to the size of "
1776 "the structure I<modify_ldt_ldt_s>, or I<func> is 1 and the new ldt entry has "
1779 "I<ptr> が 0 である、 または I<func> が 1 で I<bytecount> が "
1780 "I<modify_ldt_ldt_s> 構造体のサイズと等しくないか、 I<func> が 1 で新しい ldt "
1784 #: build/C/man2/modify_ldt.2:130
1785 msgid "I<func> is neither 0 nor 1."
1786 msgstr "I<func> が 0 でも 1 でもない。"
1789 #: build/C/man2/modify_ldt.2:133
1791 "This call is Linux-specific and should not be used in programs intended to "
1794 "このコールは Linux 特有であり、移植を意図したプログラムでは 使用してはいけな"
1798 #: build/C/man2/modify_ldt.2:136 build/C/man2/perfmonctl.2:205
1799 #: build/C/man2/pivot_root.2:134
1801 "Glibc does not provide a wrapper for this system call; call it using "
1804 "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>"
1808 #: build/C/man2/modify_ldt.2:138
1813 #: build/C/man2/nfsservctl.2:8
1819 #: build/C/man2/nfsservctl.2:8
1825 #: build/C/man2/nfsservctl.2:11
1826 msgid "nfsservctl - syscall interface to kernel nfs daemon"
1827 msgstr "nfsservctl - カーネル nfs デーモンのためのインターフェース"
1830 #: build/C/man2/nfsservctl.2:14
1832 msgid "B<#include E<lt>linux/nfsd/syscall.hE<gt>>\n"
1833 msgstr "B<#include E<lt>linux/nfsd/syscall.hE<gt>>\n"
1836 #: build/C/man2/nfsservctl.2:17
1839 "B<long nfsservctl(int >I<cmd>B<, struct nfsctl_arg *>I<argp>B<,>\n"
1840 "B< union nfsctl_res *>I<resp>B<);>\n"
1842 "B<long nfsservctl(int >I<cmd>B<, struct nfsctl_arg *>I<argp>B<,>\n"
1843 "B< union nfsctl_res *>I<resp>B<);>\n"
1846 #: build/C/man2/nfsservctl.2:21
1847 msgid "I<Note>: Since Linux 3.1, this system call no longer exists."
1848 msgstr "I<注意>: Linux 3.1 以降では、このシステムコールはもはや存在しない。"
1851 #: build/C/man2/nfsservctl.2:33
1855 " * These are the commands understood by nfsctl().\n"
1857 "#define NFSCTL_SVC 0 /* This is a server process. */\n"
1858 "#define NFSCTL_ADDCLIENT 1 /* Add an NFS client. */\n"
1859 "#define NFSCTL_DELCLIENT 2 /* Remove an NFS client. */\n"
1860 "#define NFSCTL_EXPORT 3 /* export a file system. */\n"
1861 "#define NFSCTL_UNEXPORT 4 /* unexport a file system. */\n"
1862 "#define NFSCTL_UGIDUPDATE 5 /* update a client's UID/GID map. */\n"
1863 "#define NFSCTL_GETFH 6 /* get an fh (used by mountd) */\n"
1866 " * nfsctl() によって理解されるコマンド\n"
1868 "#define NFSCTL_SVC 0 /* サーバープロセス */\n"
1869 "#define NFSCTL_ADDCLIENT 1 /* NFS クライアントを追加 */\n"
1870 "#define NFSCTL_DELCLIENT 2 /* NFS クライアンドを削除 */\n"
1871 "#define NFSCTL_EXPORT 3 /* ファイルシステムのエクスポート */\n"
1872 "#define NFSCTL_UNEXPORT 4 /* ファイルシステムのアンエクスポート */\n"
1873 "#define NFSCTL_UGIDUPDATE 5 /* UID/GID マップの更新 */\n"
1874 "#define NFSCTL_GETFH 6 /* (mountd で使用される) fh の取得 */\n"
1877 #: build/C/man2/nfsservctl.2:45
1880 "struct nfsctl_arg {\n"
1881 " int ca_version; /* safeguard */\n"
1883 " struct nfsctl_svc u_svc;\n"
1884 " struct nfsctl_client u_client;\n"
1885 " struct nfsctl_export u_export;\n"
1886 " struct nfsctl_uidmap u_umap;\n"
1887 " struct nfsctl_fhparm u_getfh;\n"
1888 " unsigned int u_debug;\n"
1892 "struct nfsctl_arg {\n"
1893 " int ca_version; /* safeguard */\n"
1895 " struct nfsctl_svc u_svc;\n"
1896 " struct nfsctl_client u_client;\n"
1897 " struct nfsctl_export u_export;\n"
1898 " struct nfsctl_uidmap u_umap;\n"
1899 " struct nfsctl_fhparm u_getfh;\n"
1900 " unsigned int u_debug;\n"
1905 #: build/C/man2/nfsservctl.2:50
1908 "union nfsctl_res {\n"
1909 " struct knfs_fh cr_getfh;\n"
1910 " unsigned int cr_debug;\n"
1913 "union nfsctl_res {\n"
1914 " struct knfs_fh cr_getfh;\n"
1915 " unsigned int cr_debug;\n"
1919 #: build/C/man2/nfsservctl.2:56 build/C/man2/pivot_root.2:105
1920 #: build/C/man2/vm86.2:57
1922 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
1925 "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設"
1929 #: build/C/man2/nfsservctl.2:58
1930 msgid "This call is Linux-specific."
1931 msgstr "このコールは Linux 特有である。"
1934 #: build/C/man2/outb.2:26
1940 #: build/C/man2/outb.2:26
1946 #: build/C/man2/outb.2:31
1948 "outb, outw, outl, outsb, outsw, outsl, inb, inw, inl, insb, insw, insl, "
1949 "outb_p, outw_p, outl_p, inb_p, inw_p, inl_p - port I/O"
1951 "outb, outw, outl, outsb, outsw, outsl, inb, inw, inl, insb, insw, insl, "
1952 "outb_p, outw_p, outl_p, inb_p, inw_p, inl_p - ポート入出力"
1955 #: build/C/man2/outb.2:34
1957 msgid "B<#include E<lt>sys/io.hE<gt>>\n"
1958 msgstr "B<#include E<lt>sys/io.hE<gt>>\n"
1961 #: build/C/man2/outb.2:41
1964 "B<unsigned char inb(unsigned short int >I<port>B<);>\n"
1965 "B<unsigned char inb_p(unsigned short int >I<port>B<);>\n"
1966 "B<unsigned short int inw(unsigned short int >I<port>B<);>\n"
1967 "B<unsigned short int inw_p(unsigned short int >I<port>B<);>\n"
1968 "B<unsigned int inl(unsigned short int >I<port>B<);>\n"
1969 "B<unsigned int inl_p(unsigned short int >I<port>B<);>\n"
1971 "B<unsigned char inb(unsigned short int >I<port>B<);>\n"
1972 "B<unsigned char inb_p(unsigned short int >I<port>B<);>\n"
1973 "B<unsigned short int inw(unsigned short int >I<port>B<);>\n"
1974 "B<unsigned short int inw_p(unsigned short int >I<port>B<);>\n"
1975 "B<unsigned int inl(unsigned short int >I<port>B<);>\n"
1976 "B<unsigned int inl_p(unsigned short int >I<port>B<);>\n"
1979 #: build/C/man2/outb.2:48
1982 "B<void outb(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
1983 "B<void outb_p(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
1984 "B<void outw(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
1985 "B<void outw_p(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
1986 "B<void outl(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
1987 "B<void outl_p(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
1989 "B<void outb(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
1990 "B<void outb_p(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
1991 "B<void outw(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
1992 "B<void outw_p(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
1993 "B<void outl(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
1994 "B<void outl_p(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
1997 #: build/C/man2/outb.2:61
2000 "B<void insb(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2001 "B< unsigned long int >I<count>B<);>\n"
2002 "B<void insw(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2003 "B< unsigned long int >I<count>B<);>\n"
2004 "B<void insl(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2005 "B< unsigned long int >I<count>B<);>\n"
2006 "B<void outsb(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2007 "B< unsigned long int >I<count>B<);>\n"
2008 "B<void outsw(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2009 "B< unsigned long int >I<count>B<);>\n"
2010 "B<void outsl(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2011 "B< unsigned long int >I<count>B<);>\n"
2013 "B<void insb(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2014 "B< unsigned long int >I<count>B<);>\n"
2015 "B<void insw(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2016 "B< unsigned long int >I<count>B<);>\n"
2017 "B<void insl(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2018 "B< unsigned long int >I<count>B<);>\n"
2019 "B<void outsb(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2020 "B< unsigned long int >I<count>B<);>\n"
2021 "B<void outsw(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2022 "B< unsigned long int >I<count>B<);>\n"
2023 "B<void outsl(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2024 "B< unsigned long int >I<count>B<);>\n"
2027 #: build/C/man2/outb.2:67
2029 "This family of functions is used to do low-level port input and output. The "
2030 "out* functions do port output, the in* functions do port input; the b-suffix "
2031 "functions are byte-width and the w-suffix functions word-width; the _p-"
2032 "suffix functions pause until the I/O completes."
2034 "この一連の関数はポートに対する低レベルの入出力に使用する。 out* 関数はポート"
2035 "出力、in* 関数はポート入力を行う。 語尾に b がついている関数はバイト単位、w "
2036 "がついている関数はワード単位である。 _p がついている関数は I/O が終了するまで"
2039 #. , given the following information
2040 #. in addition to that given in
2043 #: build/C/man2/outb.2:73
2045 "They are primarily designed for internal kernel use, but can be used from "
2048 "これらの関数はもともとカーネル内部での使用を想定して設計されているが、 ユー"
2052 #: build/C/man2/outb.2:78
2055 "You must compile with B<-O> or B<-O2> or similar. The functions are defined "
2056 "as inline macros, and will not be substituted in without optimization "
2057 "enabled, causing unresolved references at link time."
2058 msgstr "B<-O> や B<-O2> などを指定してコンパイルしなければならない。 これらの関数はインライン・マクロとして定義されており、 最適化を行わないと関数の展開が行われず、 リンクの時に「解決できない参照(unresolved reference)」が発生する。"
2061 #: build/C/man2/outb.2:87
2063 "You use B<ioperm>(2) or alternatively B<iopl>(2) to tell the kernel to "
2064 "allow the user space application to access the I/O ports in question. "
2065 "Failure to do this will cause the application to receive a segmentation "
2068 "ユーザー空間のアプリケーションが I/O ポートにアクセスすることを カーネルに教"
2069 "えるために B<ioperm>(2) もしくは B<iopl>(2) を使用すること。これを忘れると"
2070 "アプリケーションはセグメンテーション違反 (segmentation fault) を受けとること"
2074 #: build/C/man2/outb.2:96
2076 "B<outb>() and friends are hardware-specific. The I<value> argument is "
2077 "passed first and the I<port> argument is passed second, which is the "
2078 "opposite order from most DOS implementations."
2080 "B<outb>() とその仲間はハードウェア特有である。 I<value> 引数が最初に渡さ"
2081 "れ、 I<port> 引数が二番目に渡される。 この順序はほとんどの DOS での実装とは逆"
2085 #: build/C/man2/outb.2:99
2086 msgid "B<ioperm>(2), B<iopl>(2)"
2087 msgstr "B<ioperm>(2), B<iopl>(2)"
2090 #: build/C/man2/pciconfig_read.2:8
2092 msgid "PCICONFIG_READ"
2093 msgstr "PCICONFIG_READ"
2096 #: build/C/man2/pciconfig_read.2:8
2102 #: build/C/man2/pciconfig_read.2:11
2104 "pciconfig_read, pciconfig_write, pciconfig_iobase - pci device information "
2107 "pciconfig_read, pciconfig_write, pciconfig_iobase - pci デバイス情報を扱う"
2110 #: build/C/man2/pciconfig_read.2:14
2112 msgid "B<#include E<lt>pci.hE<gt>>\n"
2113 msgstr "B<#include E<lt>pci.hE<gt>>\n"
2116 #: build/C/man2/pciconfig_read.2:21
2119 "B<int pciconfig_read(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
2120 "B< unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
2121 "B<int pciconfig_write(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
2122 "B< unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
2123 "B<int pciconfig_iobase(long >I<which>B<, unsigned long >I<bus>B<,>\n"
2124 "B< unsigned long >I<devfn>B<);>\n"
2126 "B<int pciconfig_read(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
2127 "B< unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
2128 "B<int pciconfig_write(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
2129 "B< unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
2130 "B<int pciconfig_iobase(long >I<which>B<, unsigned long >I<bus>B<,>\n"
2131 "B< unsigned long >I<devfn>B<);>\n"
2134 #: build/C/man2/pciconfig_read.2:27
2137 #| "Most of the interaction with PCI devices is already handled by the kernel "
2138 #| "PCI layer, and thus these calls should not normally need to be accessed "
2139 #| "from userspace."
2141 "Most of the interaction with PCI devices is already handled by the kernel "
2142 "PCI layer, and thus these calls should not normally need to be accessed from "
2145 "PCI デバイスとのやり取り (interaction) は カーネル PCI レイヤですでに処理され"
2146 "ているので、 通常はこららの関数をユーザ空間からアクセスする必要はない。"
2149 #: build/C/man2/pciconfig_read.2:27 build/C/man2/pciconfig_read.2:51
2151 msgid "B<pciconfig_read>()"
2152 msgstr "B<pciconfig_read>()"
2155 #: build/C/man2/pciconfig_read.2:36
2156 msgid "Reads to I<buf> from device I<dev> at offset I<off> value."
2157 msgstr "デバイス I<dev> のオフセット I<off> の値を I<buf> に読み込む。"
2160 #: build/C/man2/pciconfig_read.2:36 build/C/man2/pciconfig_read.2:57
2162 msgid "B<pciconfig_write>()"
2163 msgstr "B<pciconfig_write>()"
2166 #: build/C/man2/pciconfig_read.2:45
2167 msgid "Writes from I<buf> to device I<dev> at offset I<off> value."
2168 msgstr "デバイス I<dev> のオフセット I<off> に I<buf> の値を書き込む。"
2171 #: build/C/man2/pciconfig_read.2:45 build/C/man2/pciconfig_read.2:63
2173 msgid "B<pciconfig_iobase>()"
2174 msgstr "B<pciconfig_iobase>()"
2177 #: build/C/man2/pciconfig_read.2:50
2179 "You pass it a bus/devfn pair and get a physical address for either the "
2180 "memory offset (for things like prep, this is 0xc0000000), the IO base for "
2181 "PIO cycles, or the ISA holes if any."
2183 "bus/devfn ペアをこの関数に渡し、 メモリオフセット (prep のようなものでは、こ"
2184 "の値は 0xc0000000 である) と PIO サイクルの IO ベースの物理アドレスを取得す"
2185 "る。 また、もしあるならば ISA hole の物理アドレスを取得する。"
2188 #: build/C/man2/pciconfig_read.2:57 build/C/man2/pciconfig_read.2:63
2190 "On success zero is returned. On error, -1 is returned and I<errno> is set "
2193 "成功した場合、0 が返される。 エラーの場合、-1 が返され、 I<errno> が適切に設"
2197 #: build/C/man2/pciconfig_read.2:77
2199 "Returns information on locations of various I/O regions in physical memory "
2200 "according to the I<which> value. Values for I<which> are: "
2201 "B<IOBASE_BRIDGE_NUMBER>, B<IOBASE_MEMORY>, B<IOBASE_IO>, B<IOBASE_ISA_IO>, "
2202 "B<IOBASE_ISA_MEM>."
2204 "I<which> の値に基づいて、物理メモリ内の様々な I/O 領域の位置情報が返される。 "
2205 "I<which> の値は、 B<IOBASE_BRIDGE_NUMBER>, B<IOBASE_MEMORY>, B<IOBASE_IO>, "
2206 "B<IOBASE_ISA_IO>, B<IOBASE_ISA_MEM> である。"
2209 #: build/C/man2/pciconfig_read.2:84
2210 msgid "I<len> value is invalid. This does not apply to B<pciconfig_iobase>()."
2212 "I<len> の値が無効である。 このエラーは B<pciconfig_iobase>() には適用されな"
2216 #: build/C/man2/pciconfig_read.2:84 build/C/man2/ptrace.2:1745
2217 #: build/C/man2/sendfile.2:134
2223 #: build/C/man2/pciconfig_read.2:87
2228 #: build/C/man2/pciconfig_read.2:87
2234 #: build/C/man2/pciconfig_read.2:93
2236 "For B<pciconfig_iobase>(), \"hose\" value is NULL. For the other calls, "
2237 "could not find a slot."
2239 "B<pciconfig_iobase>() の場合、でホース (hose) の値が NULL である。 他の呼び"
2240 "出しの場合、スロット (slot) が見つからない。"
2243 #: build/C/man2/pciconfig_read.2:98
2244 msgid "The system has not implemented these calls (B<CONFIG_PCI> not defined)."
2246 "このシステムはこれらの呼び出しを実装していない。 (B<CONFIG_PCI> が定義されて"
2250 #: build/C/man2/pciconfig_read.2:98
2252 msgid "B<EOPNOTSUPP>"
2253 msgstr "B<EOPNOTSUPP>"
2256 #: build/C/man2/pciconfig_read.2:105
2258 "This return value is only valid for B<pciconfig_iobase>(). It is returned "
2259 "if the value for I<which> is invalid."
2261 "この返り値は B<pciconfig_iobase>() でのみ有効である。 このエラーは I<which> "
2265 #: build/C/man2/pciconfig_read.2:110
2267 "User does not have the B<CAP_SYS_ADMIN> capability. This does not apply to "
2268 "B<pciconfig_iobase>()."
2270 "ユーザが B<CAP_SYS_ADMIN> 権限を持っていない。 このエラーは "
2271 "B<pciconfig_iobase>() には適用されない。"
2274 #: build/C/man2/pciconfig_read.2:112
2275 msgid "These calls are Linux-specific, available since Linux 2.0.26/2.1.11."
2277 "これらの呼び出しは Linux 特有のものであり、 Linux 2.0.26/2.1.11 から使用可能"
2281 #: build/C/man2/pciconfig_read.2:114
2282 msgid "B<capabilities>(7)"
2283 msgstr "B<capabilities>(7)"
2286 #: build/C/man2/perf_event_open.2:27
2288 #| msgid "B<PTRACE_EVENT_CLONE>"
2289 msgid "PERF_EVENT_OPEN"
2290 msgstr "B<PTRACE_EVENT_CLONE>"
2293 #: build/C/man2/perf_event_open.2:27
2295 #| msgid "2012-04-25"
2300 #: build/C/man2/perf_event_open.2:30
2301 msgid "perf_event_open - set up performance monitoring"
2305 #: build/C/man2/perf_event_open.2:34
2308 "B<#include E<lt>linux/perf_event.hE<gt>>\n"
2309 "B<#include E<lt>linux/hw_breakpoint.hE<gt>>\n"
2311 "B<#include E<lt>linux/perf_event.hE<gt>>\n"
2312 "B<#include E<lt>linux/hw_breakpoint.hE<gt>>\n"
2315 #: build/C/man2/perf_event_open.2:38
2318 "B<int perf_event_open(struct perf_event_attr *>I<attr>B<,>\n"
2319 "B< pid_t >I<pid>B<, int >I<cpu>B<, int >I<group_fd>B<,>\n"
2320 "B< unsigned long >I<flags>B<);>\n"
2322 "B<int perf_event_open(struct perf_event_attr *>I<attr>B<,>\n"
2323 "B< pid_t >I<pid>B<, int >I<cpu>B<, int >I<group_fd>B<,>\n"
2324 "B< unsigned long >I<flags>B<);>\n"
2327 #: build/C/man2/perf_event_open.2:47
2329 "Given a list of parameters, B<perf_event_open>() returns a file descriptor, "
2330 "for use in subsequent system calls (B<read>(2), B<mmap>(2), B<prctl>(2), "
2331 "B<fcntl>(2), etc.)."
2335 #: build/C/man2/perf_event_open.2:55
2337 "A call to B<perf_event_open>() creates a file descriptor that allows "
2338 "measuring performance information. Each file descriptor corresponds to one "
2339 "event that is measured; these can be grouped together to measure multiple "
2340 "events simultaneously."
2344 #: build/C/man2/perf_event_open.2:62
2346 "Events can be enabled and disabled in two ways: via B<ioctl>(2) and via "
2347 "B<prctl>(2)B<.> When an event is disabled it does not count or generate "
2348 "overflows but does continue to exist and maintain its count value."
2352 #: build/C/man2/perf_event_open.2:76
2354 "Events come in two flavors: counting and sampled. A I<counting> event is "
2355 "one that is used for counting the aggregate number of events that occur. In "
2356 "general, counting event results are gathered with a B<read>(2) call. A "
2357 "I<sampling> event periodically writes measurements to a buffer that can then "
2358 "be accessed via B<mmap>(2)B<.>"
2362 #: build/C/man2/perf_event_open.2:76
2368 #: build/C/man2/perf_event_open.2:90
2370 "The argument I<pid> allows events to be attached to processes in various "
2371 "ways. If I<pid> is 0, measurements happen on the current thread, if I<pid> "
2372 "is greater than 0, the process indicated by I<pid> is measured, and if "
2373 "I<pid> is -1, all processes are counted."
2377 #: build/C/man2/perf_event_open.2:101
2379 "The I<cpu> argument allows measurements to be specific to a CPU. If I<cpu> "
2380 "is greater than or equal to 0, measurements are restricted to the specified "
2381 "CPU; if I<cpu> is -1, the events are measured on all CPUs."
2385 #: build/C/man2/perf_event_open.2:107
2387 "Note that the combination of I<pid> == -1 and I<cpu> == -1 is not valid."
2391 #: build/C/man2/perf_event_open.2:115
2393 "A I<pid> E<gt> 0 and I<cpu> == -1 setting measures per-process and follows "
2394 "that process to whatever CPU the process gets scheduled to. Per-process "
2395 "events can be created by any user."
2399 #: build/C/man2/perf_event_open.2:126
2401 "A I<pid> == -1 and I<cpu> E<gt>= 0 setting is per-CPU and measures all "
2402 "processes on the specified CPU. Per-CPU events need the B<CAP_SYS_ADMIN> "
2403 "capability or a I</proc/sys/kernel/perf_event_paranoid> value of less than 1."
2407 #: build/C/man2/perf_event_open.2:148
2409 "The I<group_fd> argument allows event groups to be created. An event group "
2410 "has one event which is the group leader. The leader is created first, with "
2411 "I<group_fd> = -1. The rest of the group members are created with subsequent "
2412 "B<perf_event_open>() calls with I<group_fd> being set to the fd of the "
2413 "group leader. (A single event on its own is created with I<group_fd> = -1 "
2414 "and is considered to be a group with only 1 member.) An event group is "
2415 "scheduled onto the CPU as a unit: it will only be put onto the CPU if all of "
2416 "the events in the group can be put onto the CPU. This means that the values "
2417 "of the member events can be meaningfully compared, added, divided (to get "
2418 "ratios), etc., with each other, since they have counted events for the same "
2419 "set of executed instructions."
2423 #: build/C/man2/perf_event_open.2:152
2425 #| msgid "The I<subcmd> value is one of the following:"
2426 msgid "The I<flags> argument takes one of the following values:"
2427 msgstr "I<subcmd> の値は以下のいずれかである"
2430 #: build/C/man2/perf_event_open.2:152
2432 msgid "B<PERF_FLAG_FD_NO_GROUP>"
2435 #. FIXME The following sentence is unclear
2436 #. FIXME So, why is it useful?
2438 #: build/C/man2/perf_event_open.2:159
2440 "This flag allows creating an event as part of an event group but having no "
2441 "group leader. It is unclear why this is useful."
2445 #: build/C/man2/perf_event_open.2:159
2447 msgid "B<PERF_FLAG_FD_OUTPUT>"
2451 #: build/C/man2/perf_event_open.2:162
2452 msgid "This flag re-routes the output from an event to the group leader."
2456 #: build/C/man2/perf_event_open.2:162
2458 #| msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
2459 msgid "B<PERF_FLAG_PID_CGROUP> (Since Linux 2.6.39)."
2460 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
2463 #: build/C/man2/perf_event_open.2:185
2465 "This flag activates per-container system-wide monitoring. A container is an "
2466 "abstraction that isolates a set of resources for finer grain control (CPUs, "
2467 "memory, etc...). In this mode, the event is measured only if the thread "
2468 "running on the monitored CPU belongs to the designated container (cgroup). "
2469 "The cgroup is identified by passing a file descriptor opened on its "
2470 "directory in the cgroupfs filesystem. For instance, if the cgroup to "
2471 "monitor is called I<test>, then a file descriptor opened on I</dev/cgroup/"
2472 "test> (assuming cgroupfs is mounted on I</dev/cgroup>) must be passed as "
2473 "the I<pid> parameter. cgroup monitoring is only available for system-wide "
2474 "events and may therefore require extra permissions."
2478 #: build/C/man2/perf_event_open.2:190
2480 "The I<perf_event_attr> structure provides detailed configuration information "
2481 "for the event being created."
2485 #: build/C/man2/perf_event_open.2:197
2488 "struct perf_event_attr {\n"
2489 " __u32 type; /* Type of event */\n"
2490 " __u32 size; /* Size of attribute structure */\n"
2491 " __u64 config; /* Type-specific configuration */\n"
2495 #: build/C/man2/perf_event_open.2:202
2499 " __u64 sample_period; /* Period of sampling */\n"
2500 " __u64 sample_freq; /* Frequency of sampling */\n"
2505 #: build/C/man2/perf_event_open.2:205
2508 " __u64 sample_type; /* Specifies values included in sample */\n"
2509 " __u64 read_format; /* Specifies values returned in read */\n"
2513 #: build/C/man2/perf_event_open.2:231
2516 " __u64 disabled : 1, /* off by default */\n"
2517 " inherit : 1, /* children inherit it */\n"
2518 " pinned : 1, /* must always be on PMU */\n"
2519 " exclusive : 1, /* only group on PMU */\n"
2520 " exclude_user : 1, /* don't count user */\n"
2521 " exclude_kernel : 1, /* don't count kernel */\n"
2522 " exclude_hv : 1, /* don't count hypervisor */\n"
2523 " exclude_idle : 1, /* don't count when idle */\n"
2524 " mmap : 1, /* include mmap data */\n"
2525 " comm : 1, /* include comm data */\n"
2526 " freq : 1, /* use freq, not period */\n"
2527 " inherit_stat : 1, /* per task counts */\n"
2528 " enable_on_exec : 1, /* next exec enables */\n"
2529 " task : 1, /* trace fork/exit */\n"
2530 " watermark : 1, /* wakeup_watermark */\n"
2531 " precise_ip : 2, /* skid constraint */\n"
2532 " mmap_data : 1, /* non-exec mmap data */\n"
2533 " sample_id_all : 1, /* sample_type all events */\n"
2534 " exclude_host : 1, /* don't count in host */\n"
2535 " exclude_guest : 1, /* don't count in guest */\n"
2536 " exclude_callchain_kernel : 1,\n"
2537 " /* exclude kernel callchains */\n"
2538 " exclude_callchain_user : 1,\n"
2539 "\t /* exclude user callchains */\n"
2540 " __reserved_1 : 41;\n"
2544 #: build/C/man2/perf_event_open.2:236
2548 " __u32 wakeup_events; /* wakeup every n events */\n"
2549 " __u32 wakeup_watermark; /* bytes before wakeup */\n"
2554 #: build/C/man2/perf_event_open.2:238
2556 msgid " __u32 bp_type; /* breakpoint type */\n"
2560 #: build/C/man2/perf_event_open.2:243
2564 " __u64 bp_addr; /* breakpoint address */\n"
2565 " __u64 config1; /* extension of config */\n"
2570 #: build/C/man2/perf_event_open.2:253
2574 " __u64 bp_len; /* breakpoint length */\n"
2575 " __u64 config2; /* extension of config1 */\n"
2577 " __u64 branch_sample_type; /* enum perf_branch_sample_type */\n"
2578 " __u64 sample_regs_user; /* user regs to dump on samples */\n"
2579 " __u32 sample_stack_user; /* size of stack to dump on\n"
2581 " __u32 __reserved_2; /* Align to u64 */\n"
2585 #: build/C/man2/perf_event_open.2:255
2591 #: build/C/man2/perf_event_open.2:261
2593 "The fields of the I<perf_event_attr> structure are described in more detail "
2598 #: build/C/man2/perf_event_open.2:261 build/C/man2/perf_event_open.2:1272
2604 #: build/C/man2/perf_event_open.2:265
2606 "This field specifies the overall event type. It has one of the following "
2611 #: build/C/man2/perf_event_open.2:266
2613 msgid "B<PERF_TYPE_HARDWARE>"
2617 #: build/C/man2/perf_event_open.2:273
2619 "This indicates one of the \"generalized\" hardware events provided by the "
2620 "kernel. See the I<config> field definition for more details."
2624 #: build/C/man2/perf_event_open.2:273
2626 msgid "B<PERF_TYPE_SOFTWARE>"
2630 #: build/C/man2/perf_event_open.2:277
2632 "This indicates one of the software-defined events provided by the kernel "
2633 "(even if no hardware support is available)."
2637 #: build/C/man2/perf_event_open.2:277
2639 #| msgid "B<PTRACE_CONT>"
2640 msgid "B<PERF_TYPE_TRACEPOINT>"
2641 msgstr "B<PTRACE_CONT>"
2644 #: build/C/man2/perf_event_open.2:281
2646 "This indicates a tracepoint provided by the kernel tracepoint infrastructure."
2650 #: build/C/man2/perf_event_open.2:281
2652 msgid "B<PERF_TYPE_HW_CACHE>"
2656 #: build/C/man2/perf_event_open.2:287
2658 "This indicates a hardware cache event. This has a special encoding, "
2659 "described in the I<config> field definition."
2663 #: build/C/man2/perf_event_open.2:287
2665 msgid "B<PERF_TYPE_RAW>"
2669 #: build/C/man2/perf_event_open.2:291
2671 "This indicates a \"raw\" implementation-specific event in the I<config> "
2676 #: build/C/man2/perf_event_open.2:291
2678 #| msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
2679 msgid "B<PERF_TYPE_BREAKPOINT> (Since Linux 2.6.33)"
2680 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
2683 #: build/C/man2/perf_event_open.2:296
2685 "This indicates a hardware breakpoint as provided by the CPU. Breakpoints "
2686 "can be read/write accesses to an address as well as execution of an "
2687 "instruction address."
2691 #: build/C/man2/perf_event_open.2:296
2697 #: build/C/man2/perf_event_open.2:315
2699 "Since Linux 2.6.39, B<perf_event_open>() can support multiple PMUs. To "
2700 "enable this, a value exported by the kernel can be used in the I<type> field "
2701 "to indicate which PMU to use. The value to use can be found in the sysfs "
2702 "filesystem: there is a subdirectory per PMU instance under I</sys/bus/"
2703 "event_source/devices>. In each sub-directory there is a I<type> file whose "
2704 "content is an integer that can be used in the I<type> field. For instance, "
2705 "I</sys/bus/event_source/devices/cpu/type> contains the value for the core "
2706 "CPU PMU, which is usually 4."
2710 #: build/C/man2/perf_event_open.2:316 build/C/man2/perf_event_open.2:1588
2716 #: build/C/man2/perf_event_open.2:325
2718 "The size of the I<perf_event_attr> structure for forward/backward "
2719 "compatibility. Set this using I<sizeof(struct perf_event_attr)> to allow "
2720 "the kernel to see the struct size at the time of compilation."
2724 #: build/C/man2/perf_event_open.2:340
2726 "The related define B<PERF_ATTR_SIZE_VER0> is set to 64; this was the size of "
2727 "the first published struct. B<PERF_ATTR_SIZE_VER1> is 72, corresponding to "
2728 "the addition of breakpoints in Linux 2.6.33. B<PERF_ATTR_SIZE_VER2> is 80 "
2729 "corresponding to the addition of branch sampling in Linux 3.4. "
2730 "B<PERF_ATR_SIZE_VER3> is 96 corresponding to the addition of "
2731 "I<sample_regs_user> and I<sample_stack_user> in Linux 3.7."
2735 #: build/C/man2/perf_event_open.2:340
2741 #: build/C/man2/perf_event_open.2:351
2743 "This specifies which event you want, in conjunction with the I<type> field. "
2744 "The I<config1> and I<config2> fields are also taken into account in cases "
2745 "where 64 bits is not enough to fully specify the event. The encoding of "
2746 "these fields are event dependent."
2750 #: build/C/man2/perf_event_open.2:357
2752 "The most significant bit (bit 63) of I<config> signifies CPU-specific (raw) "
2753 "counter configuration data; if the most significant bit is unset, the next 7 "
2754 "bits are an event type and the rest of the bits are the event identifier."
2758 #: build/C/man2/perf_event_open.2:368
2760 "There are various ways to set the I<config> field that are dependent on the "
2761 "value of the previously described I<type> field. What follows are various "
2762 "possible settings for I<config> separated out by I<type>."
2766 #: build/C/man2/perf_event_open.2:378
2768 "If I<type> is B<PERF_TYPE_HARDWARE>, we are measuring one of the generalized "
2769 "hardware CPU events. Not all of these are available on all platforms. Set "
2770 "I<config> to one of the following:"
2774 #: build/C/man2/perf_event_open.2:379
2776 msgid "B<PERF_COUNT_HW_CPU_CYCLES>"
2780 #: build/C/man2/perf_event_open.2:383
2781 msgid "Total cycles. Be wary of what happens during CPU frequency scaling"
2785 #: build/C/man2/perf_event_open.2:383
2787 msgid "B<PERF_COUNT_HW_INSTRUCTIONS>"
2791 #: build/C/man2/perf_event_open.2:388
2793 "Retired instructions. Be careful, these can be affected by various issues, "
2794 "most notably hardware interrupt counts"
2798 #: build/C/man2/perf_event_open.2:388
2800 msgid "B<PERF_COUNT_HW_CACHE_REFERENCES>"
2804 #: build/C/man2/perf_event_open.2:395
2806 "Cache accesses. Usually this indicates Last Level Cache accesses but this "
2807 "may vary depending on your CPU. This may include prefetches and coherency "
2808 "messages; again this depends on the design of your CPU."
2812 #: build/C/man2/perf_event_open.2:395
2814 msgid "B<PERF_COUNT_HW_CACHE_MISSES>"
2818 #: build/C/man2/perf_event_open.2:402
2820 "Cache misses. Usually this indicates Last Level Cache misses; this is "
2821 "intended to be used in conjunction with the "
2822 "B<PERF_COUNT_HW_CACHE_REFERENCES> event to calculate cache miss rates."
2826 #: build/C/man2/perf_event_open.2:402
2828 msgid "B<PERF_COUNT_HW_BRANCH_INSTRUCTIONS>"
2832 #: build/C/man2/perf_event_open.2:407
2834 "Retired branch instructions. Prior to Linux 2.6.34, this used the wrong "
2835 "event on AMD processors."
2839 #: build/C/man2/perf_event_open.2:407
2841 msgid "B<PERF_COUNT_HW_BRANCH_MISSES>"
2845 #: build/C/man2/perf_event_open.2:410
2846 msgid "Mispredicted branch instructions."
2850 #: build/C/man2/perf_event_open.2:410
2852 msgid "B<PERF_COUNT_HW_BUS_CYCLES>"
2856 #: build/C/man2/perf_event_open.2:413
2857 msgid "Bus cycles, which can be different from total cycles."
2861 #: build/C/man2/perf_event_open.2:413
2863 #| msgid "B<PTRACE_O_TRACEVFORKDONE> (since Linux 2.5.60)"
2864 msgid "B<PERF_COUNT_HW_STALLED_CYCLES_FRONTEND> (Since Linux 3.0)"
2865 msgstr "B<PTRACE_O_TRACEVFORKDONE> (Linux 2.5.60 以降)"
2868 #: build/C/man2/perf_event_open.2:416
2869 msgid "Stalled cycles during issue."
2873 #: build/C/man2/perf_event_open.2:416
2875 msgid "B<PERF_COUNT_HW_STALLED_CYCLES_BACKEND> (Since Linux 3.0)"
2879 #: build/C/man2/perf_event_open.2:419
2880 msgid "Stalled cycles during retirement."
2884 #: build/C/man2/perf_event_open.2:419
2886 #| msgid "B<PTRACE_O_TRACECLONE> (since Linux 2.5.46)"
2887 msgid "B<PERF_COUNT_HW_REF_CPU_CYCLES> (Since Linux 3.3)"
2888 msgstr "B<PTRACE_O_TRACECLONE> (Linux 2.5.46 以降)"
2891 #: build/C/man2/perf_event_open.2:422
2892 msgid "Total cycles; not affected by CPU frequency scaling."
2896 #: build/C/man2/perf_event_open.2:432
2898 "If I<type> is B<PERF_TYPE_SOFTWARE>, we are measuring software events "
2899 "provided by the kernel. Set I<config> to one of the following:"
2903 #: build/C/man2/perf_event_open.2:433
2905 msgid "B<PERF_COUNT_SW_CPU_CLOCK>"
2909 #: build/C/man2/perf_event_open.2:436
2910 msgid "This reports the CPU clock, a high-resolution per-CPU timer."
2914 #: build/C/man2/perf_event_open.2:436
2916 msgid "B<PERF_COUNT_SW_TASK_CLOCK>"
2920 #: build/C/man2/perf_event_open.2:439
2921 msgid "This reports a clock count specific to the task that is running."
2925 #: build/C/man2/perf_event_open.2:439
2927 msgid "B<PERF_COUNT_SW_PAGE_FAULTS>"
2931 #: build/C/man2/perf_event_open.2:442
2932 msgid "This reports the number of page faults."
2936 #: build/C/man2/perf_event_open.2:442
2938 msgid "B<PERF_COUNT_SW_CONTEXT_SWITCHES>"
2942 #: build/C/man2/perf_event_open.2:447
2944 "This counts context switches. Until Linux 2.6.34, these were all reported "
2945 "as user-space events, after that they are reported as happening in the "
2950 #: build/C/man2/perf_event_open.2:447
2952 msgid "B<PERF_COUNT_SW_CPU_MIGRATIONS>"
2956 #: build/C/man2/perf_event_open.2:451
2957 msgid "This reports the number of times the process has migrated to a new CPU."
2961 #: build/C/man2/perf_event_open.2:451
2963 msgid "B<PERF_COUNT_SW_PAGE_FAULTS_MIN>"
2967 #: build/C/man2/perf_event_open.2:455
2969 "This counts the number of minor page faults. These did not require disk I/O "
2974 #: build/C/man2/perf_event_open.2:455
2976 msgid "B<PERF_COUNT_SW_PAGE_FAULTS_MAJ>"
2980 #: build/C/man2/perf_event_open.2:459
2982 "This counts the number of major page faults. These required disk I/O to "
2987 #: build/C/man2/perf_event_open.2:459
2989 #| msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
2990 msgid "B<PERF_COUNT_SW_ALIGNMENT_FAULTS> (Since Linux 2.6.33)"
2991 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
2994 #: build/C/man2/perf_event_open.2:465
2996 "This counts the number of alignment faults. These happen when unaligned "
2997 "memory accesses happen; the kernel can handle these but it reduces "
2998 "performance. This only happens on some architectures (never on x86)."
3002 #: build/C/man2/perf_event_open.2:465
3004 #| msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
3005 msgid "B<PERF_COUNT_SW_EMULATION_FAULTS> (Since Linux 2.6.33)"
3006 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
3009 #: build/C/man2/perf_event_open.2:471
3011 "This counts the number of emulation faults. The kernel sometimes traps on "
3012 "unimplemented instructions and emulates them for user space. This can "
3013 "negatively impact performance."
3017 #: build/C/man2/perf_event_open.2:484
3019 "If I<type> is B<PERF_TYPE_TRACEPOINT>, then we are measuring kernel "
3020 "tracepoints. The value to use in I<config> can be obtained from under "
3021 "debugfs I<tracing/events/*/*/id> if ftrace is enabled in the kernel."
3025 #: build/C/man2/perf_event_open.2:495
3027 "If I<type> is B<PERF_TYPE_HW_CACHE>, then we are measuring a hardware CPU "
3028 "cache event. To calculate the appropriate I<config> value use the following "
3033 #: build/C/man2/perf_event_open.2:500
3036 " (perf_hw_cache_id) | (perf_hw_cache_op_id E<lt>E<lt> 8) |\n"
3037 " (perf_hw_cache_op_result_id E<lt>E<lt> 16)\n"
3041 #: build/C/man2/perf_event_open.2:505
3042 msgid "where I<perf_hw_cache_id> is one of:"
3046 #: build/C/man2/perf_event_open.2:506
3048 msgid "B<PERF_COUNT_HW_CACHE_L1D>"
3052 #: build/C/man2/perf_event_open.2:509
3053 msgid "for measuring Level 1 Data Cache"
3057 #: build/C/man2/perf_event_open.2:509
3059 msgid "B<PERF_COUNT_HW_CACHE_L1I>"
3063 #: build/C/man2/perf_event_open.2:512
3064 msgid "for measuring Level 1 Instruction Cache"
3068 #: build/C/man2/perf_event_open.2:512
3070 msgid "B<PERF_COUNT_HW_CACHE_LL>"
3074 #: build/C/man2/perf_event_open.2:515
3075 msgid "for measuring Last-Level Cache"
3079 #: build/C/man2/perf_event_open.2:515
3081 msgid "B<PERF_COUNT_HW_CACHE_DTLB>"
3085 #: build/C/man2/perf_event_open.2:518
3086 msgid "for measuring the Data TLB"
3090 #: build/C/man2/perf_event_open.2:518
3092 msgid "B<PERF_COUNT_HW_CACHE_ITLB>"
3096 #: build/C/man2/perf_event_open.2:521
3097 msgid "for measuring the Instruction TLB"
3101 #: build/C/man2/perf_event_open.2:521
3103 msgid "B<PERF_COUNT_HW_CACHE_BPU>"
3107 #: build/C/man2/perf_event_open.2:524
3108 msgid "for measuring the branch prediction unit"
3112 #: build/C/man2/perf_event_open.2:524
3114 #| msgid "B<PTRACE_O_TRACEVFORKDONE> (since Linux 2.5.60)"
3115 msgid "B<PERF_COUNT_HW_CACHE_NODE> (Since Linux 3.0)"
3116 msgstr "B<PTRACE_O_TRACEVFORKDONE> (Linux 2.5.60 以降)"
3119 #: build/C/man2/perf_event_open.2:527
3120 msgid "for measuring local memory accesses"
3124 #: build/C/man2/perf_event_open.2:532
3125 msgid "and I<perf_hw_cache_op_id> is one of"
3129 #: build/C/man2/perf_event_open.2:533
3131 msgid "B<PERF_COUNT_HW_CACHE_OP_READ>"
3135 #: build/C/man2/perf_event_open.2:536
3136 msgid "for read accesses"
3140 #: build/C/man2/perf_event_open.2:536
3142 msgid "B<PERF_COUNT_HW_CACHE_OP_WRITE>"
3146 #: build/C/man2/perf_event_open.2:539
3147 msgid "for write accesses"
3151 #: build/C/man2/perf_event_open.2:539
3153 msgid "B<PERF_COUNT_HW_CACHE_OP_PREFETCH>"
3157 #: build/C/man2/perf_event_open.2:542
3158 msgid "for prefetch accesses"
3162 #: build/C/man2/perf_event_open.2:547
3163 msgid "and I<perf_hw_cache_op_result_id> is one of"
3167 #: build/C/man2/perf_event_open.2:548
3169 msgid "B<PERF_COUNT_HW_CACHE_RESULT_ACCESS>"
3173 #: build/C/man2/perf_event_open.2:551
3174 msgid "to measure accesses"
3178 #: build/C/man2/perf_event_open.2:551
3180 msgid "B<PERF_COUNT_HW_CACHE_RESULT_MISS>"
3184 #: build/C/man2/perf_event_open.2:554
3185 msgid "to measure misses"
3189 #: build/C/man2/perf_event_open.2:572
3191 "If I<type> is B<PERF_TYPE_RAW>, then a custom \"raw\" I<config> value is "
3192 "needed. Most CPUs support events that are not covered by the \"generalized"
3193 "\" events. These are implementation defined; see your CPU manual (for "
3194 "example the Intel Volume 3B documentation or the AMD BIOS and Kernel "
3195 "Developer Guide). The libpfm4 library can be used to translate from the "
3196 "name in the architectural manuals to the raw hex value B<perf_event_open>() "
3197 "expects in this field."
3201 #: build/C/man2/perf_event_open.2:581
3203 "If I<type> is B<PERF_TYPE_BREAKPOINT>, then leave I<config> set to zero. "
3204 "Its parameters are set in other places."
3208 #: build/C/man2/perf_event_open.2:582
3210 msgid "I<sample_period>, I<sample_freq>"
3214 #: build/C/man2/perf_event_open.2:594
3216 "A \"sampling\" counter is one that generates an interrupt every N events, "
3217 "where N is given by I<sample_period>. A sampling counter has "
3218 "I<sample_period> E<gt> 0. When an overflow interrupt occurs, requested data "
3219 "is recorded in the mmap buffer. The I<sample_type> field controls what data "
3220 "is recorded on each interrupt."
3224 #: build/C/man2/perf_event_open.2:604
3226 "I<sample_freq> can be used if you wish to use frequency rather than period. "
3227 "In this case you set the I<freq> flag. The kernel will adjust the sampling "
3228 "period to try and achieve the desired rate. The rate of adjustment is a "
3233 #: build/C/man2/perf_event_open.2:604
3235 msgid "I<sample_type>"
3239 #: build/C/man2/perf_event_open.2:616
3241 "The various bits in this field specify which values to include in the "
3242 "sample. They will be recorded in a ring-buffer, which is available to user "
3243 "space using B<mmap>(2). The order in which the values are saved in the "
3244 "sample are documented in the MMAP Layout subsection below; it is not the "
3245 "I<enum perf_event_sample_format> order."
3249 #: build/C/man2/perf_event_open.2:617
3251 msgid "B<PERF_SAMPLE_IP>"
3255 #: build/C/man2/perf_event_open.2:620
3256 msgid "Records instruction pointer."
3260 #: build/C/man2/perf_event_open.2:620
3262 msgid "B<PERF_SAMPLE_TID>"
3266 #: build/C/man2/perf_event_open.2:623
3267 msgid "Records the process and thread IDs."
3271 #: build/C/man2/perf_event_open.2:623
3273 msgid "B<PERF_SAMPLE_TIME>"
3277 #: build/C/man2/perf_event_open.2:626
3278 msgid "Records a timestamp."
3282 #: build/C/man2/perf_event_open.2:626
3284 msgid "B<PERF_SAMPLE_ADDR>"
3288 #: build/C/man2/perf_event_open.2:629
3289 msgid "Records an address, if applicable."
3293 #: build/C/man2/perf_event_open.2:629
3295 msgid "B<PERF_SAMPLE_READ>"
3299 #: build/C/man2/perf_event_open.2:632
3301 "Record counter values for all events in a group, not just the group leader."
3305 #: build/C/man2/perf_event_open.2:632
3307 msgid "B<PERF_SAMPLE_CALLCHAIN>"
3311 #: build/C/man2/perf_event_open.2:635
3312 msgid "Records the callchain (stack backtrace)."
3316 #: build/C/man2/perf_event_open.2:635
3318 msgid "B<PERF_SAMPLE_ID>"
3322 #: build/C/man2/perf_event_open.2:638
3323 msgid "Records a unique ID for the opened event's group leader."
3327 #: build/C/man2/perf_event_open.2:638
3329 msgid "B<PERF_SAMPLE_CPU>"
3333 #: build/C/man2/perf_event_open.2:641
3334 msgid "Records CPU number."
3338 #: build/C/man2/perf_event_open.2:641
3340 msgid "B<PERF_SAMPLE_PERIOD>"
3344 #: build/C/man2/perf_event_open.2:644
3345 msgid "Records the current sampling period."
3349 #: build/C/man2/perf_event_open.2:644
3351 msgid "B<PERF_SAMPLE_STREAM_ID>"
3355 #: build/C/man2/perf_event_open.2:651
3357 "Records a unique ID for the opened event. Unlike B<PERF_SAMPLE_ID> the "
3358 "actual ID is returned, not the group leader. This ID is the same as the one "
3359 "returned by PERF_FORMAT_ID."
3363 #: build/C/man2/perf_event_open.2:651
3365 msgid "B<PERF_SAMPLE_RAW>"
3369 #: build/C/man2/perf_event_open.2:655
3371 "Records additional data, if applicable. Usually returned by tracepoint "
3376 #: build/C/man2/perf_event_open.2:655
3378 #| msgid "B<PTRACE_O_TRACEFORK> (since Linux 2.5.46)"
3379 msgid "B<PERF_SAMPLE_BRANCH_STACK> (Since Linux 3.4)"
3380 msgstr "B<PTRACE_O_TRACEFORK> (Linux 2.5.46 以降)"
3383 #: build/C/man2/perf_event_open.2:659
3384 msgid "Records the branch stack. See branch_sample_type."
3388 #: build/C/man2/perf_event_open.2:659
3390 #| msgid "B<FUTEX_CMP_REQUEUE> (since Linux 2.6.7)"
3391 msgid "B<PERF_SAMPLE_REGS_USER> (Since Linux 3.7)"
3392 msgstr "B<FUTEX_CMP_REQUEUE> (Linux 2.6.7 以降)"
3395 #: build/C/man2/perf_event_open.2:662
3396 msgid "Records the current register state."
3400 #: build/C/man2/perf_event_open.2:662
3402 #| msgid "B<PTRACE_O_TRACEFORK> (since Linux 2.5.46)"
3403 msgid "B<PERF_SAMPLE_STACK_USER> (Since Linux 3.7)"
3404 msgstr "B<PTRACE_O_TRACEFORK> (Linux 2.5.46 以降)"
3407 #: build/C/man2/perf_event_open.2:665 build/C/man2/perf_event_open.2:1786
3408 #: build/C/man2/perf_event_open.2:1803
3409 msgid "[To be documented]"
3413 #: build/C/man2/perf_event_open.2:666
3415 msgid "I<read_format>"
3419 #: build/C/man2/perf_event_open.2:673
3421 "This field specifies the format of the data returned by B<read>(2) on a "
3422 "B<perf_event_open>() file descriptor."
3426 #: build/C/man2/perf_event_open.2:674
3428 msgid "B<PERF_FORMAT_TOTAL_TIME_ENABLED>"
3432 #: build/C/man2/perf_event_open.2:681
3434 "Adds the 64-bit I<time_enabled> field. This can be used to calculate "
3435 "estimated totals if the PMU is overcommitted and multiplexing is happening."
3439 #: build/C/man2/perf_event_open.2:681
3441 msgid "B<PERF_FORMAT_TOTAL_TIME_RUNNING>"
3445 #: build/C/man2/perf_event_open.2:688
3447 "Adds the 64-bit I<time_running> field. This can be used to calculate "
3448 "estimated totals if the PMU is overcommitted and multiplexing is happening."
3452 #: build/C/man2/perf_event_open.2:688
3454 msgid "B<PERF_FORMAT_ID>"
3458 #: build/C/man2/perf_event_open.2:691
3459 msgid "Adds a 64-bit unique value that corresponds to the event group."
3463 #: build/C/man2/perf_event_open.2:691
3465 msgid "B<PERF_FORMAT_GROUP>"
3469 #: build/C/man2/perf_event_open.2:694
3470 msgid "Allows all counter values in an event group to be read with one read."
3474 #: build/C/man2/perf_event_open.2:695
3480 #: build/C/man2/perf_event_open.2:705
3482 "The I<disabled> bit specifies whether the counter starts out disabled or "
3483 "enabled. If disabled, the event can later be enabled by B<ioctl>(2), "
3484 "B<prctl>(2), or I<enable_on_exec>."
3488 #: build/C/man2/perf_event_open.2:705
3494 #: build/C/man2/perf_event_open.2:714
3496 "The I<inherit> bit specifies that this counter should count events of child "
3497 "tasks as well as the task specified. This only applies to new children, not "
3498 "to any existing children at the time the counter is created (nor to any new "
3499 "children of existing children)."
3503 #: build/C/man2/perf_event_open.2:719
3505 "Inherit does not work for some combinations of I<read_format>s, such as "
3506 "B<PERF_FORMAT_GROUP>."
3510 #: build/C/man2/perf_event_open.2:719
3516 #: build/C/man2/perf_event_open.2:732
3518 "The I<pinned> bit specifies that the counter should always be on the CPU if "
3519 "at all possible. It only applies to hardware counters and only to group "
3520 "leaders. If a pinned counter cannot be put onto the CPU (e.g., because "
3521 "there are not enough hardware counters or because of a conflict with some "
3522 "other event), then the counter goes into an 'error' state, where reads "
3523 "return end-of-file (i.e., B<read>(2) returns 0) until the counter is "
3524 "subsequently enabled or disabled."
3528 #: build/C/man2/perf_event_open.2:732
3530 msgid "I<exclusive>"
3534 #: build/C/man2/perf_event_open.2:741
3536 "The I<exclusive> bit specifies that when this counter's group is on the CPU, "
3537 "it should be the only group using the CPU's counters. In the future this "
3538 "may allow monitoring programs to support PMU features that need to run alone "
3539 "so that they do not disrupt other hardware counters."
3543 #: build/C/man2/perf_event_open.2:741
3545 msgid "I<exclude_user>"
3549 #: build/C/man2/perf_event_open.2:744
3551 "If this bit is set, the count excludes events that happen in user space."
3555 #: build/C/man2/perf_event_open.2:744
3557 msgid "I<exclude_kernel>"
3561 #: build/C/man2/perf_event_open.2:747
3563 "If this bit is set, the count excludes events that happen in kernel-space."
3567 #: build/C/man2/perf_event_open.2:747
3569 msgid "I<exclude_hv>"
3573 #: build/C/man2/perf_event_open.2:755
3575 "If this bit is set, the count excludes events that happen in the "
3576 "hypervisor. This is mainly for PMUs that have built-in support for handling "
3577 "this (such as POWER). Extra support is needed for handling hypervisor "
3578 "measurements on most machines."
3582 #: build/C/man2/perf_event_open.2:755
3584 msgid "I<exclude_idle>"
3588 #: build/C/man2/perf_event_open.2:758
3589 msgid "If set, don't count when the CPU is idle."
3593 #: build/C/man2/perf_event_open.2:758
3599 #: build/C/man2/perf_event_open.2:763
3600 msgid "The I<mmap> bit enables recording of exec mmap events."
3604 #: build/C/man2/perf_event_open.2:763
3610 #: build/C/man2/perf_event_open.2:774
3612 "The I<comm> bit enables tracking of process command name as modified by the "
3613 "I<exec>(2) and I<prctl>(PR_SET_NAME) system calls. Unfortunately for "
3614 "tools, there is no way to distinguish one system call versus the other."
3618 #: build/C/man2/perf_event_open.2:774
3624 #: build/C/man2/perf_event_open.2:781
3626 "If this bit is set, then I<sample_frequency> not I<sample_period> is used "
3627 "when setting up the sampling interval."
3631 #: build/C/man2/perf_event_open.2:781
3633 msgid "I<inherit_stat>"
3637 #: build/C/man2/perf_event_open.2:788
3639 "This bit enables saving of event counts on context switch for inherited "
3640 "tasks. This is only meaningful if the I<inherit> field is set."
3644 #: build/C/man2/perf_event_open.2:788
3646 msgid "I<enable_on_exec>"
3650 #: build/C/man2/perf_event_open.2:793
3652 "If this bit is set, a counter is automatically enabled after a call to "
3657 #: build/C/man2/perf_event_open.2:793
3663 #: build/C/man2/perf_event_open.2:797
3665 "If this bit is set, then fork/exit notifications are included in the ring "
3670 #: build/C/man2/perf_event_open.2:797
3672 msgid "I<watermark>"
3676 #: build/C/man2/perf_event_open.2:805
3678 "If set, have a sampling interrupt happen when we cross the "
3679 "I<wakeup_watermark> boundary. Otherwise interrupts happen after "
3680 "I<wakeup_events> samples."
3684 #: build/C/man2/perf_event_open.2:805
3686 #| msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
3687 msgid "I<precise_ip> (Since Linux 2.6.35)"
3688 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
3691 #: build/C/man2/perf_event_open.2:815
3693 "This controls the amount of skid. Skid is how many instructions execute "
3694 "between an event of interest happening and the kernel being able to stop and "
3695 "record the event. Smaller skid is better and allows more accurate reporting "
3696 "of which events correspond to which instructions, but hardware is often "
3697 "limited with how small this can be."
3701 #: build/C/man2/perf_event_open.2:817
3703 #| msgid "The I<subcmd> value is one of the following:"
3704 msgid "The values of this are the following:"
3705 msgstr "I<subcmd> の値は以下のいずれかである"
3708 #: build/C/man2/perf_event_open.2:818
3714 #: build/C/man2/perf_event_open.2:822
3715 msgid "B<SAMPLE_IP> can have arbitrary skid"
3719 #: build/C/man2/perf_event_open.2:822
3725 #: build/C/man2/perf_event_open.2:826
3726 msgid "B<SAMPLE_IP> must have constant skid"
3730 #: build/C/man2/perf_event_open.2:826
3736 #: build/C/man2/perf_event_open.2:830
3737 msgid "B<SAMPLE_IP> requested to have 0 skid"
3741 #: build/C/man2/perf_event_open.2:830
3747 #: build/C/man2/perf_event_open.2:836
3748 msgid "B<SAMPLE_IP> must have 0 skid. See also B<PERF_RECORD_MISC_EXACT_IP>."
3752 #: build/C/man2/perf_event_open.2:837
3754 #| msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
3755 msgid "I<mmap_data> (Since Linux 2.6.36)"
3756 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
3759 #: build/C/man2/perf_event_open.2:843
3761 "The counterpart of the I<mmap> field, but enables including data mmap events "
3762 "in the ring-buffer."
3766 #: build/C/man2/perf_event_open.2:843
3768 #| msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
3769 msgid "I<sample_id_all> (Since Linux 2.6.38)"
3770 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
3773 #: build/C/man2/perf_event_open.2:851
3775 "If set, then TID, TIME, ID, CPU, and STREAM_ID can additionally be included "
3776 "in non-B<PERF_RECORD_SAMPLE>s if the corresponding I<sample_type> is "
3781 #: build/C/man2/perf_event_open.2:851
3783 msgid "I<exclude_host> (Since Linux 3.2)"
3787 #: build/C/man2/perf_event_open.2:854
3788 msgid "Do not measure time spent in VM host"
3792 #: build/C/man2/perf_event_open.2:854
3794 msgid "I<exclude_guest> (Since Linux 3.2)"
3798 #: build/C/man2/perf_event_open.2:857
3799 msgid "Do not measure time spent in VM guest"
3803 #: build/C/man2/perf_event_open.2:857
3805 msgid "I<exclude_callchain_kernel> (Since Linux 3.7)"
3809 #: build/C/man2/perf_event_open.2:860
3810 msgid "Do not include kernel callchains."
3814 #: build/C/man2/perf_event_open.2:860
3816 msgid "I<exclude_callchain_user> (Since Linux 3.7)"
3820 #: build/C/man2/perf_event_open.2:863
3821 msgid "Do not include user callchains."
3825 #: build/C/man2/perf_event_open.2:863
3827 msgid "I<wakeup_events>, I<wakeup_watermark>"
3831 #: build/C/man2/perf_event_open.2:873
3833 "This union sets how many samples (I<wakeup_events>) or bytes "
3834 "(I<wakeup_watermark>) happen before an overflow signal happens. Which one "
3835 "is used is selected by the I<watermark> bitflag."
3839 #: build/C/man2/perf_event_open.2:873
3841 #| msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
3842 msgid "I<bp_type> (Since Linux 2.6.33)"
3843 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
3846 #: build/C/man2/perf_event_open.2:877
3847 msgid "This chooses the breakpoint type. It is one of:"
3851 #: build/C/man2/perf_event_open.2:878
3853 msgid "B<HW_BREAKPOINT_EMPTY>"
3857 #: build/C/man2/perf_event_open.2:881
3858 msgid "no breakpoint"
3862 #: build/C/man2/perf_event_open.2:881
3864 msgid "B<HW_BREAKPOINT_R>"
3868 #: build/C/man2/perf_event_open.2:884
3869 msgid "count when we read the memory location"
3873 #: build/C/man2/perf_event_open.2:884
3875 msgid "B<HW_BREAKPOINT_W>"
3879 #: build/C/man2/perf_event_open.2:887
3880 msgid "count when we write the memory location"
3884 #: build/C/man2/perf_event_open.2:887
3886 msgid "B<HW_BREAKPOINT_RW>"
3890 #: build/C/man2/perf_event_open.2:890
3891 msgid "count when we read or write the memory location"
3895 #: build/C/man2/perf_event_open.2:890
3897 msgid "B<HW_BREAKPOINT_X>"
3901 #: build/C/man2/perf_event_open.2:893
3902 msgid "count when we execute code at the memory location"
3906 #: build/C/man2/perf_event_open.2:902
3908 "The values can be combined via a bitwise or, but the combination of "
3909 "B<HW_BREAKPOINT_R> or B<HW_BREAKPOINT_W> with B<HW_BREAKPOINT_X> is not "
3914 #: build/C/man2/perf_event_open.2:903
3916 #| msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
3917 msgid "I<bp_addr> (Since Linux 2.6.33)"
3918 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
3921 #: build/C/man2/perf_event_open.2:910
3923 "I<bp_addr> address of the breakpoint. For execution breakpoints this is the "
3924 "memory address of the instruction of interest; for read and write "
3925 "breakpoints it is the memory address of the memory location of interest."
3929 #: build/C/man2/perf_event_open.2:910
3931 #| msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
3932 msgid "I<config1> (Since Linux 2.6.39)"
3933 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
3936 #: build/C/man2/perf_event_open.2:917
3938 "I<config1> is used for setting events that need an extra register or "
3939 "otherwise do not fit in the regular config field. Raw OFFCORE_EVENTS on "
3940 "Nehalem/Westmere/SandyBridge use this field on 3.3 and later kernels."
3944 #: build/C/man2/perf_event_open.2:917
3946 #| msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
3947 msgid "I<bp_len> (Since Linux 2.6.33)"
3948 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
3951 #: build/C/man2/perf_event_open.2:931
3953 "I<bp_len> is the length of the breakpoint being measured if I<type> is "
3954 "B<PERF_TYPE_BREAKPOINT>. Options are B<HW_BREAKPOINT_LEN_1>, "
3955 "B<HW_BREAKPOINT_LEN_2>, B<HW_BREAKPOINT_LEN_4>, B<HW_BREAKPOINT_LEN_8>. For "
3956 "an execution breakpoint, set this to I<sizeof(long)>."
3960 #: build/C/man2/perf_event_open.2:931
3962 #| msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
3963 msgid "I<config2> (Since Linux 2.6.39)"
3964 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
3967 #: build/C/man2/perf_event_open.2:938
3968 msgid "I<config2> is a further extension of the I<config1> field."
3972 #: build/C/man2/perf_event_open.2:938
3974 msgid "I<branch_sample_type> (Since Linux 3.4)"
3978 #: build/C/man2/perf_event_open.2:942
3980 "This is used with the CPUs hardware branch sampling, if available. It can "
3981 "have one of the following values:"
3985 #: build/C/man2/perf_event_open.2:943
3987 msgid "B<PERF_SAMPLE_BRANCH_USER>"
3991 #: build/C/man2/perf_event_open.2:946
3992 msgid "Branch target is in user space"
3996 #: build/C/man2/perf_event_open.2:946
3998 msgid "B<PERF_SAMPLE_BRANCH_KERNEL>"
4002 #: build/C/man2/perf_event_open.2:949
4003 msgid "Branch target is in kernel space"
4007 #: build/C/man2/perf_event_open.2:949
4009 msgid "B<PERF_SAMPLE_BRANCH_HV>"
4013 #: build/C/man2/perf_event_open.2:952
4014 msgid "Branch target is in hypervisor"
4018 #: build/C/man2/perf_event_open.2:952
4020 msgid "B<PERF_SAMPLE_BRANCH_ANY>"
4024 #: build/C/man2/perf_event_open.2:955
4025 msgid "Any branch type."
4029 #: build/C/man2/perf_event_open.2:955
4031 msgid "B<PERF_SAMPLE_BRANCH_ANY_CALL>"
4035 #: build/C/man2/perf_event_open.2:958
4036 msgid "Any call branch"
4040 #: build/C/man2/perf_event_open.2:958
4042 msgid "B<PERF_SAMPLE_BRANCH_ANY_RETURN>"
4046 #: build/C/man2/perf_event_open.2:961
4047 msgid "Any return branch"
4051 #: build/C/man2/perf_event_open.2:961
4053 msgid "B<PERF_SAMPLE_BRANCH_IND_CALL>"
4057 #: build/C/man2/perf_event_open.2:964
4058 msgid "Indirect calls"
4062 #: build/C/man2/perf_event_open.2:964
4064 msgid "B<PERF_SAMPLE_BRANCH_PLM_ALL>"
4068 #: build/C/man2/perf_event_open.2:967
4069 msgid "User, kernel, and hv"
4073 #: build/C/man2/perf_event_open.2:968
4075 msgid "I<sample_regs_user> (Since Linux 3.7)"
4078 #. FIXME: The following reference seems to be not quite right:
4080 #: build/C/man2/perf_event_open.2:974
4082 "This defines the set of user registers to dump on samples. See I<asm/"
4087 #: build/C/man2/perf_event_open.2:974
4089 msgid "I<sample_stack_user> (Since Linux 3.7)"
4093 #: build/C/man2/perf_event_open.2:977
4094 msgid "This defines the size of the user stack to dump on samples."
4098 #: build/C/man2/perf_event_open.2:977
4100 msgid "Reading results"
4104 #: build/C/man2/perf_event_open.2:987
4106 "Once a B<perf_event_open>() file descriptor has been opened, the values of "
4107 "the events can be read from the file descriptor. The values that are there "
4108 "are specified by the I<read_format> field in the I<attr> structure at open "
4113 #: build/C/man2/perf_event_open.2:992
4115 "If you attempt to read into a buffer that is not big enough to hold the data "
4116 "B<ENOSPC> is returned"
4120 #: build/C/man2/perf_event_open.2:994
4121 msgid "Here is the layout of the data returned by a read:"
4125 #: build/C/man2/perf_event_open.2:994 build/C/man2/perf_event_open.2:1012
4126 #: build/C/man2/ptrace.2:1552 build/C/man2/ptrace.2:1562
4127 #: build/C/man2/ptrace.2:1570 build/C/man2/ptrace.2:1576
4128 #: build/C/man2/ptrace.2:1705
4134 #: build/C/man2/perf_event_open.2:998
4136 "If B<PERF_FORMAT_GROUP> was specified to allow reading all events in a group "
4141 #: build/C/man2/perf_event_open.2:1010
4144 "struct read_format {\n"
4145 " u64 nr; /* The number of events */\n"
4146 " u64 time_enabled; /* if PERF_FORMAT_TOTAL_TIME_ENABLED */\n"
4147 " u64 time_running; /* if PERF_FORMAT_TOTAL_TIME_RUNNING */\n"
4149 " u64 value; /* The value of the event */\n"
4150 " u64 id; /* if PERF_FORMAT_ID */\n"
4156 #: build/C/man2/perf_event_open.2:1018
4157 msgid "If B<PERF_FORMAT_GROUP> was I<not> specified:"
4161 #: build/C/man2/perf_event_open.2:1027
4164 "struct read_format {\n"
4165 " u64 value; /* The value of the event */\n"
4166 " u64 time_enabled; /* if PERF_FORMAT_TOTAL_TIME_ENABLED */\n"
4167 " u64 time_running; /* if PERF_FORMAT_TOTAL_TIME_RUNNING */\n"
4168 " u64 id; /* if PERF_FORMAT_ID */\n"
4173 #: build/C/man2/perf_event_open.2:1031
4174 msgid "The values read are as follows:"
4178 #: build/C/man2/perf_event_open.2:1031
4184 #: build/C/man2/perf_event_open.2:1037
4186 "The number of events in this file descriptor. Only available if "
4187 "B<PERF_FORMAT_GROUP> was specified."
4191 #: build/C/man2/perf_event_open.2:1037
4193 msgid "I<time_enabled>, I<time_running>"
4197 #: build/C/man2/perf_event_open.2:1049
4199 "Total time the event was enabled and running. Normally these are the same. "
4200 "If more events are started than available counter slots on the PMU, then "
4201 "multiplexing happens and events only run part of the time. In that case the "
4202 "I<time_enabled> and I<time running> values can be used to scale an estimated "
4203 "value for the count."
4207 #: build/C/man2/perf_event_open.2:1049
4213 #: build/C/man2/perf_event_open.2:1052
4214 msgid "An unsigned 64-bit value containing the counter result."
4218 #: build/C/man2/perf_event_open.2:1052 build/C/man2/perf_event_open.2:1316
4219 #: build/C/man2/perf_event_open.2:1451
4225 #: build/C/man2/perf_event_open.2:1058
4227 "A globally unique value for this particular event, only there if "
4228 "B<PERF_FORMAT_ID> was specified in I<read_format>."
4232 #: build/C/man2/perf_event_open.2:1058
4238 #: build/C/man2/perf_event_open.2:1068
4240 "When using B<perf_event_open>() in sampled mode, asynchronous events (like "
4241 "counter overflow or B<PROT_EXEC> mmap tracking) are logged into a ring-"
4242 "buffer. This ring-buffer is created and accessed through B<mmap>(2)."
4246 #: build/C/man2/perf_event_open.2:1074
4248 "The mmap size should be 1+2^n pages, where the first page is a metadata page "
4249 "(I<struct perf_event_mmap_page>) that contains various bits of information "
4250 "such as where the ring-buffer head is."
4254 #: build/C/man2/perf_event_open.2:1077
4256 "Before kernel 2.6.39, there is a bug that means you must allocate a mmap "
4257 "ring buffer when sampling even if you do not plan to access it."
4261 #: build/C/man2/perf_event_open.2:1079
4262 msgid "The structure of the first metadata mmap page is as follows:"
4266 #: build/C/man2/perf_event_open.2:1103
4269 "struct perf_event_mmap_page {\n"
4270 " __u32 version; /* version number of this structure */\n"
4271 " __u32 compat_version; /* lowest version this is compat with */\n"
4272 " __u32 lock; /* seqlock for synchronization */\n"
4273 " __u32 index; /* hardware counter identifier */\n"
4274 " __s64 offset; /* add to hardware counter value */\n"
4275 " __u64 time_enabled; /* time event active */\n"
4276 " __u64 time_running; /* time event on CPU */\n"
4278 " __u64 capabilities;\n"
4279 " __u64 cap_usr_time : 1,\n"
4280 " cap_usr_rdpmc : 1,\n"
4282 " __u16 pmc_width;\n"
4283 " __u16 time_shift;\n"
4284 " __u32 time_mult;\n"
4285 " __u64 time_offset;\n"
4286 " __u64 __reserved[120]; /* Pad to 1k */\n"
4287 " __u64 data_head; /* head in the data section */\n"
4288 " __u64 data_tail; /* user-space written tail */\n"
4293 #: build/C/man2/perf_event_open.2:1109
4295 "The following looks at the fields in the I<perf_event_mmap_page> structure "
4300 #: build/C/man2/perf_event_open.2:1109
4306 #: build/C/man2/perf_event_open.2:1112
4307 msgid "Version number of this structure."
4311 #: build/C/man2/perf_event_open.2:1112
4313 msgid "I<compat_version>"
4317 #: build/C/man2/perf_event_open.2:1115
4318 msgid "The lowest version this is compatible with."
4322 #: build/C/man2/perf_event_open.2:1115
4328 #: build/C/man2/perf_event_open.2:1118
4329 msgid "A seqlock for synchronization."
4333 #: build/C/man2/perf_event_open.2:1118
4339 #: build/C/man2/perf_event_open.2:1121
4340 msgid "A unique hardware counter identifier."
4344 #: build/C/man2/perf_event_open.2:1121
4351 #: build/C/man2/perf_event_open.2:1125
4352 msgid "Add this to hardware counter value??"
4356 #: build/C/man2/perf_event_open.2:1125
4358 msgid "I<time_enabled>"
4362 #: build/C/man2/perf_event_open.2:1128
4363 msgid "Time the event was active."
4367 #: build/C/man2/perf_event_open.2:1128
4369 msgid "I<time_running>"
4373 #: build/C/man2/perf_event_open.2:1131
4374 msgid "Time the event was running."
4378 #: build/C/man2/perf_event_open.2:1131
4380 msgid "I<cap_usr_time>"
4384 #: build/C/man2/perf_event_open.2:1134
4385 msgid "User time capability"
4389 #: build/C/man2/perf_event_open.2:1134
4391 msgid "I<cap_usr_rdpmc>"
4395 #: build/C/man2/perf_event_open.2:1139
4397 "If the hardware supports user-space read of performance counters without "
4398 "syscall (this is the \"rdpmc\" instruction on x86), then the following code "
4399 "can be used to do a read:"
4403 #: build/C/man2/perf_event_open.2:1146
4406 "u32 seq, time_mult, time_shift, idx, width;\n"
4407 "u64 count, enabled, running;\n"
4408 "u64 cyc, time_offset;\n"
4413 #: build/C/man2/perf_event_open.2:1152
4417 " seq = pc-E<gt>lock;\n"
4419 " enabled = pc-E<gt>time_enabled;\n"
4420 " running = pc-E<gt>time_running;\n"
4424 #: build/C/man2/perf_event_open.2:1159
4427 " if (pc-E<gt>cap_usr_time && enabled != running) {\n"
4429 " time_offset = pc-E<gt>time_offset;\n"
4430 " time_mult = pc-E<gt>time_mult;\n"
4431 " time_shift = pc-E<gt>time_shift;\n"
4436 #: build/C/man2/perf_event_open.2:1162
4439 " idx = pc-E<gt>index;\n"
4440 " count = pc-E<gt>offset;\n"
4444 #: build/C/man2/perf_event_open.2:1167
4447 " if (pc-E<gt>cap_usr_rdpmc && idx) {\n"
4448 " width = pc-E<gt>pmc_width;\n"
4449 " pmc = rdpmc(idx - 1);\n"
4454 #: build/C/man2/perf_event_open.2:1170
4458 "} while (pc-E<gt>lock != seq);\n"
4462 #: build/C/man2/perf_event_open.2:1172
4464 msgid "I<pmc_width>"
4468 #: build/C/man2/perf_event_open.2:1179
4470 "If I<cap_usr_rdpmc>, this field provides the bit-width of the value read "
4471 "using the rdpmc or equivalent instruction. This can be used to sign extend "
4476 #: build/C/man2/perf_event_open.2:1185
4479 "pmc E<lt>E<lt>= 64 - pmc_width;\n"
4480 "pmc E<gt>E<gt>= 64 - pmc_width; // signed shift right\n"
4485 #: build/C/man2/perf_event_open.2:1187
4487 msgid "I<time_shift>, I<time_mult>, I<time_offset>"
4491 #: build/C/man2/perf_event_open.2:1194
4493 "If I<cap_usr_time>, these fields can be used to compute the time delta since "
4494 "time_enabled (in nanoseconds) using rdtsc or similar."
4498 #: build/C/man2/perf_event_open.2:1202
4503 " quot = (cyc E<gt>E<gt> time_shift);\n"
4504 " rem = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
4505 " delta = time_offset + quot * time_mult +\n"
4506 " ((rem * time_mult) E<gt>E<gt> time_shift);\n"
4510 #: build/C/man2/perf_event_open.2:1214
4512 "Where I<time_offset>, I<time_mult>, I<time_shift>, and I<cyc> are read in "
4513 "the seqcount loop described above. This delta can then be added to enabled "
4514 "and possible running (if idx), improving the scaling:"
4518 #: build/C/man2/perf_event_open.2:1222
4521 " enabled += delta;\n"
4523 " running += delta;\n"
4524 " quot = count / running;\n"
4525 " rem = count % running;\n"
4526 " count = quot * enabled + (rem * enabled) / running;\n"
4530 #: build/C/man2/perf_event_open.2:1223
4532 msgid "I<data_head>"
4536 #: build/C/man2/perf_event_open.2:1229
4538 "This points to the head of the data section. The value continuously "
4539 "increases, it does not wrap. The value needs to be manually wrapped by the "
4540 "size of the mmap buffer before accessing the samples."
4544 #: build/C/man2/perf_event_open.2:1232
4546 "On SMP-capable platforms, after reading the data_head value, user space "
4547 "should issue an rmb()."
4551 #: build/C/man2/perf_event_open.2:1232
4553 msgid "I<data_tail;>"
4557 #: build/C/man2/perf_event_open.2:1240
4559 "When the mapping is B<PROT_WRITE>, the I<data_tail> value should be written "
4560 "by user space to reflect the last read data. In this case the kernel will "
4561 "not over-write unread data."
4565 #: build/C/man2/perf_event_open.2:1242
4566 msgid "The following 2^n ring-buffer pages have the layout described below."
4570 #: build/C/man2/perf_event_open.2:1256
4572 "If I<perf_event_attr.sample_id_all> is set, then all event types will have "
4573 "the sample_type selected fields related to where/when (identity) an event "
4574 "took place (TID, TIME, ID, CPU, STREAM_ID) described in "
4575 "B<PERF_RECORD_SAMPLE> below, it will be stashed just after the "
4576 "I<perf_event_header> and the fields already present for the existing fields, "
4577 "i.e., at the end of the payload. That way a newer perf.data file will be "
4578 "supported by older perf tools, with these new optional fields being ignored."
4582 #: build/C/man2/perf_event_open.2:1258
4583 msgid "The mmap values start with a header:"
4587 #: build/C/man2/perf_event_open.2:1266
4590 "struct perf_event_header {\n"
4598 #: build/C/man2/perf_event_open.2:1272
4599 msgid "Below, we describe the I<perf_event_header> fields in more detail."
4603 #: build/C/man2/perf_event_open.2:1281
4605 "The I<type> value is one of the below. The values in the corresponding "
4606 "record (that follows the header) depend on the I<type> selected as shown."
4610 #: build/C/man2/perf_event_open.2:1282
4612 msgid "B<PERF_RECORD_MMAP>"
4616 #: build/C/man2/perf_event_open.2:1289
4618 "The MMAP events record the B<PROT_EXEC> mappings so that we can correlate "
4619 "user-space IPs to code. They have the following structure:"
4623 #: build/C/man2/perf_event_open.2:1300
4627 " struct perf_event_header header;\n"
4632 " char filename[];\n"
4637 #: build/C/man2/perf_event_open.2:1302
4639 msgid "B<PERF_RECORD_LOST>"
4643 #: build/C/man2/perf_event_open.2:1305
4644 msgid "This record indicates when events are lost."
4648 #: build/C/man2/perf_event_open.2:1313
4652 " struct perf_event_header header;\n"
4659 #: build/C/man2/perf_event_open.2:1319
4660 msgid "is the unique event ID for the samples that were lost."
4664 #: build/C/man2/perf_event_open.2:1319
4670 #: build/C/man2/perf_event_open.2:1322
4672 #| msgid "Returns the number of processes woken up."
4673 msgid "is the number of events that were lost."
4674 msgstr "wake したプロセスの数を返す。"
4677 #: build/C/man2/perf_event_open.2:1323
4679 msgid "B<PERF_RECORD_COMM>"
4683 #: build/C/man2/perf_event_open.2:1326
4684 msgid "This record indicates a change in the process name."
4688 #: build/C/man2/perf_event_open.2:1334
4692 " struct perf_event_header header;\n"
4699 #: build/C/man2/perf_event_open.2:1336
4701 #| msgid "B<PTRACE_EVENT_EXIT>"
4702 msgid "B<PERF_RECORD_EXIT>"
4703 msgstr "B<PTRACE_EVENT_EXIT>"
4706 #: build/C/man2/perf_event_open.2:1339
4707 msgid "This record indicates a process exit event."
4711 #: build/C/man2/perf_event_open.2:1348 build/C/man2/perf_event_open.2:1376
4715 " struct perf_event_header header;\n"
4723 #: build/C/man2/perf_event_open.2:1350
4725 msgid "B<PERF_RECORD_THROTTLE>, B<PERF_RECORD_UNTHROTTLE>"
4729 #: build/C/man2/perf_event_open.2:1353
4730 msgid "This record indicates a throttle/unthrottle event."
4734 #: build/C/man2/perf_event_open.2:1362
4738 " struct perf_event_header header;\n"
4746 #: build/C/man2/perf_event_open.2:1364
4748 #| msgid "B<PTRACE_EVENT_FORK>"
4749 msgid "B<PERF_RECORD_FORK>"
4750 msgstr "B<PTRACE_EVENT_FORK>"
4753 #: build/C/man2/perf_event_open.2:1367
4754 msgid "This record indicates a fork event."
4758 #: build/C/man2/perf_event_open.2:1378
4760 msgid "B<PERF_RECORD_READ>"
4764 #: build/C/man2/perf_event_open.2:1381
4765 msgid "This record indicates a read event."
4769 #: build/C/man2/perf_event_open.2:1389
4773 " struct perf_event_header header;\n"
4775 " struct read_format values;\n"
4780 #: build/C/man2/perf_event_open.2:1391
4782 msgid "B<PERF_RECORD_SAMPLE>"
4786 #: build/C/man2/perf_event_open.2:1394
4787 msgid "This record indicates a sample."
4791 #: build/C/man2/perf_event_open.2:1422
4795 " struct perf_event_header header;\n"
4796 " u64 ip; /* if PERF_SAMPLE_IP */\n"
4797 " u32 pid, tid; /* if PERF_SAMPLE_TID */\n"
4798 " u64 time; /* if PERF_SAMPLE_TIME */\n"
4799 " u64 addr; /* if PERF_SAMPLE_ADDR */\n"
4800 " u64 id; /* if PERF_SAMPLE_ID */\n"
4801 " u64 stream_id; /* if PERF_SAMPLE_STREAM_ID */\n"
4802 " u32 cpu, res; /* if PERF_SAMPLE_CPU */\n"
4803 " u64 period; /* if PERF_SAMPLE_PERIOD */\n"
4804 " struct read_format v; /* if PERF_SAMPLE_READ */\n"
4805 " u64 nr; /* if PERF_SAMPLE_CALLCHAIN */\n"
4806 " u64 ips[nr]; /* if PERF_SAMPLE_CALLCHAIN */\n"
4807 " u32 size; /* if PERF_SAMPLE_RAW */\n"
4808 " char data[size]; /* if PERF_SAMPLE_RAW */\n"
4809 " u64 bnr; /* if PERF_SAMPLE_BRANCH_STACK */\n"
4810 " struct perf_branch_entry lbr[bnr];\n"
4811 " /* if PERF_SAMPLE_BRANCH_STACK */\n"
4812 " u64 abi; /* if PERF_SAMPLE_REGS_USER */\n"
4813 " u64 regs[weight(mask)];\n"
4814 " /* if PERF_SAMPLE_REGS_USER */\n"
4815 " u64 size; /* if PERF_SAMPLE_STACK_USER */\n"
4816 " char data[size]; /* if PERF_SAMPLE_STACK_USER */\n"
4817 " u64 dyn_size; /* if PERF_SAMPLE_STACK_USER */\n"
4822 #: build/C/man2/perf_event_open.2:1424
4828 #: build/C/man2/perf_event_open.2:1430
4830 "If B<PERF_SAMPLE_IP> is enabled, then a 64-bit instruction pointer value is "
4835 #: build/C/man2/perf_event_open.2:1430
4837 msgid "I<pid>, I<tid>"
4841 #: build/C/man2/perf_event_open.2:1436
4843 "If B<PERF_SAMPLE_TID> is enabled, then a 32-bit process ID and 32-bit thread "
4848 #: build/C/man2/perf_event_open.2:1436
4854 #: build/C/man2/perf_event_open.2:1444
4856 "If B<PERF_SAMPLE_TIME> is enabled, then a 64-bit timestamp is included. "
4857 "This is obtained via local_clock() which is a hardware timestamp if "
4858 "available and the jiffies value if not."
4862 #: build/C/man2/perf_event_open.2:1444
4868 #: build/C/man2/perf_event_open.2:1451
4870 "If B<PERF_SAMPLE_ADDR> is enabled, then a 64-bit address is included. This "
4871 "is usually the address of a tracepoint, breakpoint, or software event; "
4872 "otherwise the value is 0."
4876 #: build/C/man2/perf_event_open.2:1459
4878 "If B<PERF_SAMPLE_ID> is enabled, a 64-bit unique ID is included. If the "
4879 "event is a member of an event group, the group leader ID is returned. This "
4880 "ID is the same as the one returned by B<PERF_FORMAT_ID>."
4884 #: build/C/man2/perf_event_open.2:1459
4886 msgid "I<stream_id>"
4890 #: build/C/man2/perf_event_open.2:1469
4892 "If B<PERF_SAMPLE_STREAM_ID> is enabled, a 64-bit unique ID is included. "
4893 "Unlike B<PERF_SAMPLE_ID> the actual ID is returned, not the group leader. "
4894 "This ID is the same as the one returned by B<PERF_FORMAT_ID>."
4898 #: build/C/man2/perf_event_open.2:1469
4900 msgid "I<cpu>, I<res>"
4904 #: build/C/man2/perf_event_open.2:1476
4906 "If B<PERF_SAMPLE_CPU> is enabled, this is a 32-bit value indicating which "
4907 "CPU was being used, in addition to a reserved (unused) 32-bit value."
4911 #: build/C/man2/perf_event_open.2:1476
4917 #: build/C/man2/perf_event_open.2:1482
4919 "If B<PERF_SAMPLE_PERIOD> is enabled, a 64-bit value indicating the current "
4920 "sampling period is written."
4924 #: build/C/man2/perf_event_open.2:1482
4930 #: build/C/man2/perf_event_open.2:1493
4932 "If B<PERF_SAMPLE_READ> is enabled, a structure of type read_format is "
4933 "included which has values for all events in the event group. The values "
4934 "included depend on the I<read_format> value used at B<perf_event_open>() "
4939 #: build/C/man2/perf_event_open.2:1493
4941 msgid "I<nr>, I<ips[nr]>"
4945 #: build/C/man2/perf_event_open.2:1501
4947 "If B<PERF_SAMPLE_CALLCHAIN> is enabled, then a 64-bit number is included "
4948 "which indicates how many following 64-bit instruction pointers will follow. "
4949 "This is the current callchain."
4953 #: build/C/man2/perf_event_open.2:1501
4955 msgid "I<size>, I<data[size]>"
4959 #: build/C/man2/perf_event_open.2:1508
4961 "If B<PERF_SAMPLE_RAW> is enabled, then a 32-bit value indicating size is "
4962 "included followed by an array of 8-bit values of length size. The values "
4963 "are padded with 0 to have 64-bit alignment."
4967 #: build/C/man2/perf_event_open.2:1513
4969 "This RAW record data is opaque with respect to the ABI. The ABI doesn't "
4970 "make any promises with respect to the stability of its content, it may vary "
4971 "depending on event, hardware, and kernel version."
4975 #: build/C/man2/perf_event_open.2:1513
4977 msgid "I<bnr>, I<lbr[bnr]>"
4981 #: build/C/man2/perf_event_open.2:1524
4983 "If B<PERF_SAMPLE_BRANCH_STACK> is enabled, then a 64-bit value indicating "
4984 "the number of records is included, followed by I<bnr> I<perf_branch_entry> "
4985 "structures. These structures have from, to, and flags values indicating the "
4986 "from and to addresses from the branches on the callstack."
4990 #: build/C/man2/perf_event_open.2:1524
4992 msgid "I<abi>, I<regs[weight(mask)]>"
4996 #: build/C/man2/perf_event_open.2:1530
4997 msgid "If B<PERF_SAMPLE_REGS_USER> is enabled, then [to be documented]."
5001 #: build/C/man2/perf_event_open.2:1536
5003 "The I<abi> field is one of B<PERF_SAMPLE_REGS_ABI_NONE>, "
5004 "B<PERF_SAMPLE_REGS_ABI_32> or B<PERF_SAMPLE_REGS_ABI_64>."
5008 #: build/C/man2/perf_event_open.2:1536
5010 msgid "I<size>, I<data[size]>, I<dyn_size>"
5014 #: build/C/man2/perf_event_open.2:1542
5015 msgid "If B<PERF_SAMPLE_STACK_USER> is enabled, then [to be documented]."
5019 #: build/C/man2/perf_event_open.2:1544
5025 #: build/C/man2/perf_event_open.2:1549
5026 msgid "The I<misc> field contains additional information about the sample."
5030 #: build/C/man2/perf_event_open.2:1554
5032 "The CPU mode can be determined from this value by masking with "
5033 "B<PERF_RECORD_MISC_CPUMODE_MASK> and looking for one of the following (note "
5034 "these are not bit masks, only one can be set at a time):"
5038 #: build/C/man2/perf_event_open.2:1555
5040 msgid "B<PERF_RECORD_MISC_CPUMODE_UNKNOWN>"
5044 #: build/C/man2/perf_event_open.2:1558
5045 msgid "Unknown CPU mode."
5049 #: build/C/man2/perf_event_open.2:1558
5051 msgid "B<PERF_RECORD_MISC_KERNEL>"
5055 #: build/C/man2/perf_event_open.2:1561
5056 msgid "Sample happened in the kernel."
5060 #: build/C/man2/perf_event_open.2:1561
5062 msgid "B<PERF_RECORD_MISC_USER>"
5066 #: build/C/man2/perf_event_open.2:1564
5067 msgid "Sample happened in user code."
5071 #: build/C/man2/perf_event_open.2:1564
5073 msgid "B<PERF_RECORD_MISC_HYPERVISOR>"
5077 #: build/C/man2/perf_event_open.2:1567
5078 msgid "Sample happened in the hypervisor."
5082 #: build/C/man2/perf_event_open.2:1567
5084 msgid "B<PERF_RECORD_MISC_GUEST_KERNEL>"
5088 #: build/C/man2/perf_event_open.2:1570
5089 msgid "Sample happened in the guest kernel."
5093 #: build/C/man2/perf_event_open.2:1570
5095 msgid "B<PERF_RECORD_MISC_GUEST_USER>"
5099 #: build/C/man2/perf_event_open.2:1573
5100 msgid "Sample happened in guest user code."
5104 #: build/C/man2/perf_event_open.2:1576
5105 msgid "In addition, one of the following bits can be set:"
5109 #: build/C/man2/perf_event_open.2:1577
5111 msgid "B<PERF_RECORD_MISC_EXACT_IP>"
5115 #: build/C/man2/perf_event_open.2:1585
5117 "This indicates that the content of B<PERF_SAMPLE_IP> points to the actual "
5118 "instruction that triggered the event. See also I<perf_event_attr."
5123 #: build/C/man2/perf_event_open.2:1585
5125 msgid "B<PERF_RECORD_MISC_EXT_RESERVED>"
5129 #: build/C/man2/perf_event_open.2:1588
5130 msgid "This indicates there is extended data available (currently not used)."
5134 #: build/C/man2/perf_event_open.2:1591
5135 msgid "This indicates the size of the record."
5139 #: build/C/man2/perf_event_open.2:1592
5141 msgid "Signal overflow"
5145 #: build/C/man2/perf_event_open.2:1601
5147 "Events can be set to deliver a signal when a threshold is crossed. The "
5148 "signal handler is set up using the B<poll>(2), B<select>(2), B<epoll>(2) "
5149 "and B<fcntl>(2), system calls."
5153 #: build/C/man2/perf_event_open.2:1605
5155 "To generate signals, sampling must be enabled (I<sample_period> must have a "
5160 #: build/C/man2/perf_event_open.2:1607
5161 msgid "There are two ways to generate signals."
5165 #: build/C/man2/perf_event_open.2:1617
5167 "The first is to set a I<wakeup_events> or I<wakeup_watermark> value that "
5168 "will generate a signal if a certain number of samples or bytes have been "
5169 "written to the mmap ring buffer. In this case a signal of type B<POLL_IN> "
5174 #: build/C/man2/perf_event_open.2:1629
5176 "The other way is by use of the B<PERF_EVENT_IOC_REFRESH> ioctl. This ioctl "
5177 "adds to a counter that decrements each time the event overflows. When non-"
5178 "zero, a B<POLL_IN> signal is sent on overflow, but once the value reaches 0, "
5179 "a signal is sent of type B<POLL_HUP> and the underlying event is disabled."
5182 #. FIXME(Vince) : Find out when this was introduced
5184 #: build/C/man2/perf_event_open.2:1635
5186 "Note: on newer kernels (definitely noticed with 3.2) a signal is provided "
5187 "for every overflow, even if I<wakeup_events> is not set."
5191 #: build/C/man2/perf_event_open.2:1635
5193 msgid "rdpmc instruction"
5197 #: build/C/man2/perf_event_open.2:1642
5199 "Starting with Linux 3.4 on x86, you can use the I<rdpmc> instruction to get "
5200 "low-latency reads without having to enter the kernel. Note that using "
5201 "I<rdpmc> is not necessarily faster than other methods for reading event "
5206 #: build/C/man2/perf_event_open.2:1647
5208 "Support for this can be detected with the I<cap_usr_rdpmc> field in the mmap "
5209 "page; documentation on how to calculate event values can be found in that "
5214 #: build/C/man2/perf_event_open.2:1647
5216 msgid "perf_event ioctl calls"
5220 #: build/C/man2/perf_event_open.2:1652
5221 msgid "Various ioctls act on B<perf_event_open>() file descriptors"
5225 #: build/C/man2/perf_event_open.2:1652
5227 #| msgid "B<PTRACE_EVENT_CLONE>"
5228 msgid "B<PERF_EVENT_IOC_ENABLE>"
5229 msgstr "B<PTRACE_EVENT_CLONE>"
5232 #: build/C/man2/perf_event_open.2:1656
5234 "Enables the individual event or event group specified by the file descriptor "
5239 #: build/C/man2/perf_event_open.2:1658 build/C/man2/perf_event_open.2:1671
5240 #: build/C/man2/perf_event_open.2:1699
5241 msgid "The ioctl argument is ignored."
5245 #: build/C/man2/perf_event_open.2:1658
5247 #| msgid "B<PTRACE_EVENT_CLONE>"
5248 msgid "B<PERF_EVENT_IOC_DISABLE>"
5249 msgstr "B<PTRACE_EVENT_CLONE>"
5252 #: build/C/man2/perf_event_open.2:1662
5254 "Disables the individual counter or event group specified by the file "
5255 "descriptor argument."
5259 #: build/C/man2/perf_event_open.2:1669
5261 "Enabling or disabling the leader of a group enables or disables the entire "
5262 "group; that is, while the group leader is disabled, none of the counters in "
5263 "the group will count. Enabling or disabling a member of a group other than "
5264 "the leader only affects that counter; disabling a non-leader stops that "
5265 "counter from counting but doesn't affect any other counter."
5269 #: build/C/man2/perf_event_open.2:1671
5271 #| msgid "B<PTRACE_EVENT_FORK>"
5272 msgid "B<PERF_EVENT_IOC_REFRESH>"
5273 msgstr "B<PTRACE_EVENT_FORK>"
5276 #: build/C/man2/perf_event_open.2:1685
5278 "Non-inherited overflow counters can use this to enable a counter for a "
5279 "number of overflows specified by the argument, after which it is disabled. "
5280 "Subsequent calls of this ioctl add the argument value to the current count. "
5281 "A signal with B<POLL_IN> set will happen on each overflow until the count "
5282 "reaches 0; when that happens a signal with POLL_HUP set is sent and the "
5283 "event is disabled. Using an argument of 0 is considered undefined behavior."
5287 #: build/C/man2/perf_event_open.2:1685
5289 #| msgid "B<PTRACE_EVENT_FORK>"
5290 msgid "B<PERF_EVENT_IOC_RESET>"
5291 msgstr "B<PTRACE_EVENT_FORK>"
5294 #: build/C/man2/perf_event_open.2:1697
5296 "Reset the event count specified by the file descriptor argumentto zero. "
5297 "This only resets the counts; there is no way to reset the multiplexing "
5298 "I<time_enabled> or I<time_running> values. When sent to a group leader, "
5299 "only the leader is reset (child events are not)."
5303 #: build/C/man2/perf_event_open.2:1699
5305 #| msgid "B<PTRACE_EVENT_FORK>"
5306 msgid "B<PERF_EVENT_IOC_PERIOD>"
5307 msgstr "B<PTRACE_EVENT_FORK>"
5310 #: build/C/man2/perf_event_open.2:1703
5312 "IOC_PERIOD is the command to update the period; it does not update the "
5313 "current period but instead defers until next."
5317 #: build/C/man2/perf_event_open.2:1706
5319 "The argument is a pointer to a 64-bit value containing the desired new "
5324 #: build/C/man2/perf_event_open.2:1706
5326 msgid "B<PERF_EVENT_IOC_SET_OUTPUT>"
5330 #: build/C/man2/perf_event_open.2:1711
5332 "This tells the kernel to report event notifications to the specified file "
5333 "descriptor rather than the default one. The file descriptors must all be on "
5338 #: build/C/man2/perf_event_open.2:1714
5340 "The argument specifies the desired file descriptor, or -1 if output should "
5345 #: build/C/man2/perf_event_open.2:1714
5347 #| msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
5348 msgid "B<PERF_EVENT_IOC_SET_FILTER> (Since Linux 2.6.33)"
5349 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
5352 #: build/C/man2/perf_event_open.2:1717
5353 msgid "This adds an ftrace filter to this event."
5357 #: build/C/man2/perf_event_open.2:1719
5358 msgid "The argument is a pointer to the desired ftrace filter."
5362 #: build/C/man2/perf_event_open.2:1719
5368 #: build/C/man2/perf_event_open.2:1732
5370 "A process can enable or disable all the event groups that are attached to it "
5371 "using the B<prctl>(2) B<PR_TASK_PERF_EVENTS_ENABLE> and "
5372 "B<PR_TASK_PERF_EVENTS_DISABLE> operations. This applies to all counters on "
5373 "the current process, whether created by this process or by another, and does "
5374 "not affect any counters that this process has created on other processes. "
5375 "It only enables or disables the group leaders, not any other members in the "
5380 #: build/C/man2/perf_event_open.2:1732
5382 msgid "perf_event related configuration files"
5386 #: build/C/man2/perf_event_open.2:1735
5387 msgid "Files in I</proc/sys/kernel/>"
5391 #: build/C/man2/perf_event_open.2:1736
5393 msgid "I</proc/sys/kernel/perf_event_paranoid>"
5397 #: build/C/man2/perf_event_open.2:1742
5399 "The I<perf_event_paranoid> file can be set to restrict access to the "
5400 "performance counters."
5404 #: build/C/man2/perf_event_open.2:1744
5405 msgid "2 - only allow user-space measurements"
5409 #: build/C/man2/perf_event_open.2:1746
5410 msgid "1 - (default) allow both kernel and user measurements"
5414 #: build/C/man2/perf_event_open.2:1748
5415 msgid "0 - allow access to CPU-specific data but not raw tracepoint samples"
5419 #: build/C/man2/perf_event_open.2:1750
5420 msgid "-1 - no restrictions"
5424 #: build/C/man2/perf_event_open.2:1755
5426 "The existence of the I<perf_event_paranoid> file is the official method for "
5427 "determining if a kernel supports B<perf_event_open>()."
5431 #: build/C/man2/perf_event_open.2:1755
5433 msgid "I</proc/sys/kernel/perf_event_max_sample_rate>"
5437 #: build/C/man2/perf_event_open.2:1764
5439 "This sets the maximum sample rate. Setting this too high can allow users to "
5440 "sample at a rate that impacts overall machine performance and potentially "
5441 "lock up the machine. The default value is 100000 (samples per second)."
5445 #: build/C/man2/perf_event_open.2:1764
5447 msgid "I</proc/sys/kernel/perf_event_mlock_kb>"
5451 #: build/C/man2/perf_event_open.2:1769
5453 "Maximum number of pages an unprivileged user can mlock (2) . The default is "
5458 #: build/C/man2/perf_event_open.2:1772
5459 msgid "Files in I</sys/bus/event_source/devices/>"
5463 #: build/C/man2/perf_event_open.2:1778
5465 "Since Linux 2.6.34 the kernel supports having multiple PMUs available for "
5466 "monitoring. Information on how to program these PMUs can be found under I</"
5467 "sys/bus/event_source/devices/>. Each subdirectory corresponds to a "
5472 #: build/C/man2/perf_event_open.2:1778
5474 msgid "I</sys/bus/event_source/devices/*/type>"
5478 #: build/C/man2/perf_event_open.2:1783
5480 "This contains an integer that can be used in the I<type> field of "
5481 "perf_event_attr to indicate you wish to use this PMU."
5485 #: build/C/man2/perf_event_open.2:1783
5487 msgid "I</sys/bus/event_source/devices/*/rdpmc>"
5491 #: build/C/man2/perf_event_open.2:1786
5493 msgid "I</sys/bus/event_source/devices/*/format/>"
5497 #: build/C/man2/perf_event_open.2:1791
5499 "This sub-directory contains information on what bits in the I<config> field "
5500 "of perf_event_attr correspond to."
5504 #: build/C/man2/perf_event_open.2:1791
5506 msgid "I</sys/bus/event_source/devices/*/events/>"
5510 #: build/C/man2/perf_event_open.2:1800
5512 "This sub-directory contains files with pre-defined events. The contents are "
5513 "strings describing the event settings expressed in terms of the fields found "
5514 "in the I<./format/> directory. These are not necessarily complete lists of "
5515 "all events supported by a PMU, but usually a subset of events deemed useful "
5520 #: build/C/man2/perf_event_open.2:1800
5522 msgid "I</sys/bus/event_source/devices/*/uevent>"
5526 #: build/C/man2/perf_event_open.2:1810
5528 "B<perf_event_open>() returns the new file descriptor, or -1 if an error "
5529 "occurred (in which case, I<errno> is set appropriately)."
5533 #: build/C/man2/perf_event_open.2:1814
5534 msgid "Returned if the specified event is not available."
5538 #: build/C/man2/perf_event_open.2:1814
5540 #| msgid "B<ENOSYS>"
5545 #: build/C/man2/perf_event_open.2:1824
5547 "Prior to Linux 3.3, if there was not enough room for the event, B<ENOSPC> "
5548 "was returned. Linus did not like this, and this was changed to B<EINVAL>. "
5549 "B<ENOSPC> is still returned if you try to read results into too small of a "
5554 #: build/C/man2/perf_event_open.2:1824
5561 #: build/C/man2/perf_event_open.2:1829
5563 "B<perf_event_open>() was introduced in Linux 2.6.31 but was called "
5564 "B<perf_counter_open>()B<.> It was renamed in Linux 2.6.32."
5568 #: build/C/man2/perf_event_open.2:1834
5571 #| "B<personality>() is Linux-specific and should not be used in programs "
5572 #| "intended to be portable."
5574 "This B<perf_event_open>() system call Linux- specific and should not be "
5575 "used in programs intended to be portable."
5577 "B<personality>() は Linux 固有であり、移植を意図したプログラムで使用すべきで"
5581 #: build/C/man2/perf_event_open.2:1838
5584 #| "Glibc does not provide a wrapper for this system call; call it using "
5587 "Glibc does not provide a wrapper for this system call; call it using "
5588 "B<syscall>(2). See the example below."
5590 "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>"
5594 #: build/C/man2/perf_event_open.2:1844
5596 "The official way of knowing if B<perf_event_open>() support is enabled is "
5597 "checking for the existence of the file I</proc/sys/kernel/"
5598 "perf_event_paranoid>."
5602 #: build/C/man2/perf_event_open.2:1844 build/C/man2/pivot_root.2:134
5603 #: build/C/man2/ptrace.2:1810
5609 #: build/C/man2/perf_event_open.2:1851
5611 "The B<F_SETOWN_EX> option to B<fcntl>(2) is needed to properly get overflow "
5612 "signals in threads. This was introduced in Linux 2.6.32."
5616 #: build/C/man2/perf_event_open.2:1859
5618 "Prior to Linux 2.6.33 (at least for x86) the kernel did not check if events "
5619 "could be scheduled together until read time. The same happens on all known "
5620 "kernels if the NMI watchdog is enabled. This means to see if a given set of "
5621 "events works you have to B<perf_event_open>(), start, then read before you "
5622 "know for sure you can get valid measurements."
5626 #: build/C/man2/perf_event_open.2:1863
5628 "Prior to Linux 2.6.34 event constraints were not enforced by the kernel. In "
5629 "that case, some events would silently return \"0\" if the kernel scheduled "
5630 "them in an improper counter slot."
5634 #: build/C/man2/perf_event_open.2:1866
5636 "Prior to Linux 2.6.34 there was a bug when multiplexing where the wrong "
5637 "results could be returned."
5641 #: build/C/man2/perf_event_open.2:1869
5643 "Kernels from Linux 2.6.35 to Linux 2.6.39 can quickly crash the kernel if "
5644 "\"inherit\" is enabled and many threads are started."
5648 #: build/C/man2/perf_event_open.2:1873
5650 "Prior to Linux 2.6.35, B<PERF_FORMAT_GROUP> did not work with attached "
5655 #: build/C/man2/perf_event_open.2:1878
5657 "In older Linux 2.6 versions, refreshing an event group leader refreshed all "
5658 "siblings, and refreshing with a parameter of 0 enabled infinite refresh. "
5659 "This behavior is unsupported and should not be relied on."
5663 #: build/C/man2/perf_event_open.2:1884
5665 "There is a bug in the kernel code between Linux 2.6.36 and Linux 3.0 that "
5666 "ignores the \"watermark\" field and acts as if a wakeup_event was chosen if "
5667 "the union has a non-zero value in it."
5671 #: build/C/man2/perf_event_open.2:1889
5673 "Always double-check your results! Various generalized events have had wrong "
5674 "values. For example, retired branches measured the wrong thing on AMD "
5675 "machines until Linux 2.6.35."
5679 #: build/C/man2/perf_event_open.2:1889 build/C/man2/process_vm_readv.2:295
5680 #: build/C/man2/splice.2:223 build/C/man2/tee.2:130
5686 #: build/C/man2/perf_event_open.2:1893
5688 "The following is a short example that measures the total instruction count "
5689 "of a call to B<printf>(3)."
5693 #: build/C/man2/perf_event_open.2:1902
5696 #| "#define _GNU_SOURCE\n"
5697 #| "#include E<lt>fcntl.hE<gt>\n"
5698 #| "#include E<lt>stdio.hE<gt>\n"
5699 #| "#include E<lt>stdlib.hE<gt>\n"
5700 #| "#include E<lt>unistd.hE<gt>\n"
5701 #| "#include E<lt>errno.hE<gt>\n"
5702 #| "#include E<lt>limits.hE<gt>\n"
5704 "#include E<lt>stdlib.hE<gt>\n"
5705 "#include E<lt>stdio.hE<gt>\n"
5706 "#include E<lt>unistd.hE<gt>\n"
5707 "#include E<lt>string.hE<gt>\n"
5708 "#include E<lt>sys/ioctl.hE<gt>\n"
5709 "#include E<lt>linux/perf_event.hE<gt>\n"
5710 "#include E<lt>asm/unistd.hE<gt>\n"
5712 "#define _GNU_SOURCE\n"
5713 "#include E<lt>fcntl.hE<gt>\n"
5714 "#include E<lt>stdio.hE<gt>\n"
5715 "#include E<lt>stdlib.hE<gt>\n"
5716 "#include E<lt>unistd.hE<gt>\n"
5717 "#include E<lt>errno.hE<gt>\n"
5718 "#include E<lt>limits.hE<gt>\n"
5721 #: build/C/man2/perf_event_open.2:1908
5725 "perf_event_open(struct perf_event_attr *hw_event, pid_t pid,\n"
5726 " int cpu, int group_fd, unsigned long flags)\n"
5732 #: build/C/man2/perf_event_open.2:1913
5735 " ret = syscall(__NR_perf_event_open, hw_event, pid, cpu,\n"
5736 " group_fd, flags);\n"
5742 #: build/C/man2/perf_event_open.2:1920
5746 #| "main(int argc, char *argv[])\n"
5749 #| " int len, slen;\n"
5752 "main(int argc, char **argv)\n"
5754 " struct perf_event_attr pe;\n"
5755 " long long count;\n"
5759 "main(int argc, char *argv[])\n"
5765 #: build/C/man2/perf_event_open.2:1928
5768 " memset(&pe, 0, sizeof(struct perf_event_attr));\n"
5769 " pe.type = PERF_TYPE_HARDWARE;\n"
5770 " pe.size = sizeof(struct perf_event_attr);\n"
5771 " pe.config = PERF_COUNT_HW_INSTRUCTIONS;\n"
5772 " pe.disabled = 1;\n"
5773 " pe.exclude_kernel = 1;\n"
5774 " pe.exclude_hv = 1;\n"
5778 #: build/C/man2/perf_event_open.2:1934
5781 #| " fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
5782 #| " if (fd == -1) {\n"
5783 #| " perror(\"open\");\n"
5784 #| " exit(EXIT_FAILURE);\n"
5787 " fd = perf_event_open(&pe, 0, -1, -1, 0);\n"
5788 " if (fd == -1) {\n"
5789 " fprintf(stderr, \"Error opening leader %llx\\en\", pe.config);\n"
5790 " exit(EXIT_FAILURE);\n"
5793 " fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
5794 " if (fd == -1) {\n"
5795 " perror(\"open\");\n"
5796 " exit(EXIT_FAILURE);\n"
5800 #: build/C/man2/perf_event_open.2:1937
5803 " ioctl(fd, PERF_EVENT_IOC_RESET, 0);\n"
5804 " ioctl(fd, PERF_EVENT_IOC_ENABLE, 0);\n"
5808 #: build/C/man2/perf_event_open.2:1939
5810 msgid " printf(\"Measuring instruction count for this printf\\en\");\n"
5814 #: build/C/man2/perf_event_open.2:1942
5817 " ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);\n"
5818 " read(fd, &count, sizeof(long long));\n"
5822 #: build/C/man2/perf_event_open.2:1944
5824 msgid " printf(\"Used %lld instructions\\en\", count);\n"
5828 #: build/C/man2/perf_event_open.2:1947
5836 #: build/C/man2/perf_event_open.2:1954
5838 #| msgid "B<mmap>(2), B<open>(2), B<socket>(2), B<splice>(2)"
5839 msgid "B<fcntl>(2), B<mmap>(2), B<open>(2), B<prctl>(2), B<read>(2)"
5840 msgstr "B<mmap>(2), B<open>(2), B<socket>(2), B<splice>(2)"
5843 #: build/C/man2/perfmonctl.2:27
5849 #: build/C/man2/perfmonctl.2:30
5850 msgid "perfmonctl - interface to IA-64 performance monitoring unit"
5854 #: build/C/man2/perfmonctl.2:34
5857 #| "B<#include E<lt>sys/quota.hE<gt>>\n"
5858 #| "B<#include E<lt>xfs/xqm.hE<gt>>\n"
5860 "B<#include E<lt>syscall.hE<gt>>\n"
5861 "B<#include E<lt>perfmon.hE<gt>>\n"
5863 "B<#include E<lt>sys/quota.hE<gt>>\n"
5864 "B<#include E<lt>xfs/xqm.hE<gt>>\n"
5867 #: build/C/man2/perfmonctl.2:36
5869 #| msgid "B<int quotactl(int >I<cmd>B<, const char *>I<special>B<, int >I<id>B<, caddr_t >I<addr>B<);>\n"
5870 msgid "B<long perfmonctl(int >I<fd>B<, int >I<cmd>B<, void *>I<arg>B<, int >I<narg>B<);>\n"
5871 msgstr "B<int quotactl(int >I<cmd>B<, const char *>I<special>B<, int >I<id>B<, caddr_t >I<addr>B<);>\n"
5874 #: build/C/man2/perfmonctl.2:47
5876 "The IA-64-specific B<perfmonctl>() system call provides an interface to the "
5877 "PMU (performance monitoring unit). The PMU consists of PMD (performance "
5878 "monitoring data) registers and PMC (performance monitoring control) "
5879 "registers, which gather hardware statistics."
5883 #: build/C/man2/perfmonctl.2:57
5885 "B<perfmonctl>() applies the operation I<cmd> to the input arguments "
5886 "specified by I<arg>. The number of arguments is defined by I<narg>. The "
5887 "I<fd> argument specifies the perfmon context to operate on."
5891 #: build/C/man2/perfmonctl.2:61
5892 msgid "Supported values for I<cmd> are:"
5896 #: build/C/man2/perfmonctl.2:61
5898 #| msgid "B<PTRACE_CONT>"
5899 msgid "B<PFM_CREATE_CONTEXT>"
5900 msgstr "B<PTRACE_CONT>"
5903 #: build/C/man2/perfmonctl.2:65
5905 msgid "B<perfmonctl(int >I<fd>B<, PFM_CREATE_CONTEXT, pfarg_context_t *>I<ctxt>B<, 1);>\n"
5909 #: build/C/man2/perfmonctl.2:67
5910 msgid "Set up a context."
5914 #: build/C/man2/perfmonctl.2:74
5916 "The I<fd> parameter is ignored. A new perfmon context is created as "
5917 "specified in I<ctxt> and its file descriptor is returned in I<ctxt-"
5922 #: build/C/man2/perfmonctl.2:86
5924 "The file descriptor can be used in subsequent calls to B<perfmonctl>() and "
5925 "can be used to read event notifications (type I<pfm_msg_t>) using B<read>"
5926 "(2). The file descriptor is pollable using B<select>(2), B<poll>(2), and "
5931 #: build/C/man2/perfmonctl.2:90
5933 "The context can be destroyed by calling B<close>(2) on the file descriptor."
5937 #: build/C/man2/perfmonctl.2:90
5939 msgid "B<PFM_WRITE_PMCS>"
5943 #: build/C/man2/perfmonctl.2:95
5945 msgid "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMCS, pfarg_reg_t *>I<pmcs>B<, n);>\n"
5949 #: build/C/man2/perfmonctl.2:97
5950 msgid "Set PMC registers."
5954 #: build/C/man2/perfmonctl.2:97
5956 msgid "B<PFM_WRITE_PMDS>"
5960 #: build/C/man2/perfmonctl.2:101
5962 msgid "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
5967 #: build/C/man2/perfmonctl.2:104
5968 msgid "Set PMD registers."
5972 #: build/C/man2/perfmonctl.2:104
5974 msgid "B<PFM_READ_PMDS>"
5978 #: build/C/man2/perfmonctl.2:109
5980 msgid "B<perfmonctl(int >I<fd>B<, PFM_READ_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
5984 #: build/C/man2/perfmonctl.2:111
5985 msgid "Read PMD registers."
5989 #: build/C/man2/perfmonctl.2:111
5991 msgid "B<PFM_START>"
5994 #. .BI "perfmonctl(int " fd ", PFM_START, arg, 1);
5996 #: build/C/man2/perfmonctl.2:117
5998 msgid "B<perfmonctl(int >I<fd>B<, PFM_START, NULL, 0);>\n"
6002 #: build/C/man2/perfmonctl.2:119
6003 msgid "Start monitoring."
6007 #: build/C/man2/perfmonctl.2:119
6013 #: build/C/man2/perfmonctl.2:124
6015 msgid "B<perfmonctl(int >I<fd>B<, PFM_STOP, NULL, 0);>\n"
6019 #: build/C/man2/perfmonctl.2:126
6020 msgid "Stop monitoring."
6024 #: build/C/man2/perfmonctl.2:126
6026 #| msgid "B<PTRACE_CONT>"
6027 msgid "B<PFM_LOAD_CONTEXT>"
6028 msgstr "B<PTRACE_CONT>"
6031 #: build/C/man2/perfmonctl.2:131
6033 msgid "B<perfmonctl(int >I<fd>B<, PFM_LOAD_CONTEXT, pfarg_load_t *>I<largs>B<, 1);>\n"
6037 #: build/C/man2/perfmonctl.2:133
6038 msgid "Attach the context to a thread."
6042 #: build/C/man2/perfmonctl.2:133
6044 msgid "B<PFM_UNLOAD_CONTEXT>"
6048 #: build/C/man2/perfmonctl.2:138
6050 msgid "B<perfmonctl(int >I<fd>B<, PFM_UNLOAD_CONTEXT, NULL, 0);>\n"
6054 #: build/C/man2/perfmonctl.2:140
6055 msgid "Detach the context from a thread."
6059 #: build/C/man2/perfmonctl.2:140
6061 msgid "B<PFM_RESTART>"
6065 #: build/C/man2/perfmonctl.2:145
6067 msgid "B<perfmonctl(int >I<fd>B<, PFM_RESTART, NULL, 0);>\n"
6071 #: build/C/man2/perfmonctl.2:147
6072 msgid "Restart monitoring after receiving an overflow notification."
6076 #: build/C/man2/perfmonctl.2:147
6078 #| msgid "B<Q_GETSTATS>"
6079 msgid "B<PFM_GET_FEATURES>"
6080 msgstr "B<Q_GETSTATS>"
6083 #: build/C/man2/perfmonctl.2:152
6085 msgid "B<perfmonctl(int >I<fd>B<, PFM_GET_FEARURES, pfarg_features_t *>I<arg>B<, 1);>\n"
6089 #: build/C/man2/perfmonctl.2:153
6091 msgid "B<PFM_DEBUG>"
6095 #: build/C/man2/perfmonctl.2:158
6097 msgid "B<perfmonctl(int >I<fd>B<, PFM_DEBUG, >I<val>B<, 0);>\n"
6101 #: build/C/man2/perfmonctl.2:162
6102 msgid "If I<val> is nonzero, enable debugging mode, otherwise disable."
6106 #: build/C/man2/perfmonctl.2:162
6108 msgid "B<PFM_GET_PMC_RESET_VAL>"
6112 #: build/C/man2/perfmonctl.2:167
6114 msgid "B<perfmonctl(int >I<fd>B<, PFM_GET_PMC_RESET_VAL, pfarg_reg_t * >I<req>B<, n);>\n"
6121 #. .B PFM_CREATE_EVTSETS
6122 #. create or modify event sets
6124 #. .BI "perfmonctl(int " fd ", PFM_CREATE_EVTSETS, pfarg_setdesc_t *desc , n);
6127 #. .B PFM_DELETE_EVTSETS
6128 #. delete event sets
6130 #. .BI "perfmonctl(int " fd ", PFM_DELETE_EVTSET, pfarg_setdesc_t *desc , n);
6133 #. .B PFM_GETINFO_EVTSETS
6134 #. get information about event sets
6136 #. .BI "perfmonctl(int " fd ", PFM_GETINFO_EVTSETS, pfarg_setinfo_t *info, n);
6139 #: build/C/man2/perfmonctl.2:190
6140 msgid "Reset PMC registers to default values."
6144 #: build/C/man2/perfmonctl.2:196
6147 #| "On success, B<kexec_load>() returns 0. On error, -1 is returned and "
6148 #| "I<errno> is set to indicate the error."
6150 "B<performctl>() returns zero when the operation is successful. On error, "
6151 "-1 is returned and I<errno> is set to indicate the cause of the error."
6153 "成功すると、 B<kexec_load> は 0 を返す。\n"
6154 "エラーの場合、 -1 が返り、 I<errno> にエラーを示す値が設定される。"
6157 #: build/C/man2/perfmonctl.2:199
6159 #| msgid "B<pivot_root>() was introduced in Linux 2.3.41."
6160 msgid "B<perfmonctl>() is available since Linux 2.4."
6161 msgstr "B<pivot_root>() は Linux 2.3.41 で導入された。"
6164 #: build/C/man2/perfmonctl.2:202
6166 "B<perfmonctl>() is Linux specific and is available only on the IA-64 "
6171 #: build/C/man2/perfmonctl.2:207
6176 #: build/C/man2/perfmonctl.2:209
6177 msgid "The perfmon2 interface specification"
6181 #: build/C/man2/personality.2:32
6184 msgstr "PERSONALITY"
6187 #: build/C/man2/personality.2:32
6193 #: build/C/man2/personality.2:35
6194 msgid "personality - set the process execution domain"
6195 msgstr "personality - プロセスを実行するドメインを設定する"
6198 #: build/C/man2/personality.2:37
6199 msgid "B<#include E<lt>sys/personality.hE<gt>>"
6200 msgstr "B<#include E<lt>sys/personality.hE<gt>>"
6203 #: build/C/man2/personality.2:39
6204 msgid "B<int personality(unsigned long >I<persona>B<);>"
6205 msgstr "B<int personality(unsigned long >I<persona>B<);>"
6208 #: build/C/man2/personality.2:47
6210 "Linux supports different execution domains, or personalities, for each "
6211 "process. Among other things, execution domains tell Linux how to map signal "
6212 "numbers into signal actions. The execution domain system allows Linux to "
6213 "provide limited support for binaries compiled under other UNIX-like "
6214 "operating systems."
6216 "Linux は、プロセス毎の異なる実行ドメイン、すなわち パーソナリティ "
6217 "(personality) をサポートしている。 実行ドメインは Linux にシグナル番号にどの"
6218 "シグナルを割り付けるかを 教えたりする。また、実行ドメイン・システムにより、 "
6219 "Linux は他の UNIX 風のオペレーティング・システムでコンパイルされた バイナリに"
6220 "対する限定的なサポートを提供している。"
6223 #: build/C/man2/personality.2:57
6225 "This function will return the current B<personality>() when I<persona> "
6226 "equals 0xffffffff. Otherwise, it will make the execution domain referenced "
6227 "by I<persona> the new execution domain of the calling process."
6229 "B<personality ()> 関数は、 I<persona> が 0xffffffff の場合は現在の B<パーソナ"
6230 "リティ> を返す。 それ以外の場合、 I<persona> により参照される実行ドメイン"
6231 "を、 呼び出し元のプロセスの新しい実行ドメインとする。"
6234 #: build/C/man2/personality.2:64
6236 "On success, the previous I<persona> is returned. On error, -1 is returned, "
6237 "and I<errno> is set appropriately."
6239 "成功した場合、以前の I<persona> が返される。エラーの場合は、-1 が返され、 "
6240 "I<errno> が適切に設定される。"
6243 #: build/C/man2/personality.2:68
6244 msgid "The kernel was unable to change the personality."
6245 msgstr "カーネルがパーソナリティを変更できなかった。"
6248 #: build/C/man2/personality.2:72
6250 "B<personality>() is Linux-specific and should not be used in programs "
6251 "intended to be portable."
6253 "B<personality>() は Linux 固有であり、移植を意図したプログラムで使用すべきで"
6257 #: build/C/man2/pivot_root.2:10
6263 #: build/C/man2/pivot_root.2:13
6264 msgid "pivot_root - change the root file system"
6265 msgstr "pivot_root - root ファイルシステムを変更する"
6268 #: build/C/man2/pivot_root.2:15
6270 "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
6272 "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
6276 #. capability is required.
6278 #: build/C/man2/pivot_root.2:27
6280 "B<pivot_root>() moves the root file system of the calling process to the "
6281 "directory I<put_old> and makes I<new_root> the new root file system of the "
6284 "B<pivot_root>() は呼び出し元のプロセスの root ファイルシステムを I<put_old> "
6285 "ディレクトリに移動し、 I<new_root> を呼び出し元のプロセスの新しい root ファイ"
6289 #: build/C/man2/pivot_root.2:34
6291 "The typical use of B<pivot_root>() is during system startup, when the "
6292 "system mounts a temporary root file system (e.g., an B<initrd>), then mounts "
6293 "the real root file system, and eventually turns the latter into the current "
6294 "root of all relevant processes or threads."
6296 "B<pivot_root>() の典型的な利用法は、システムの起動中にシステムが一時的な "
6297 "root ファイルシステム (例えば B<initrd>) をマウントし、これに続いて本当の "
6298 "root ファイルシステムをマウントし、 後者を必要な全てのプロセス・スレッドの カ"
6299 "レント root に変更するような場合である。"
6302 #: build/C/man2/pivot_root.2:46
6304 "B<pivot_root>() may or may not change the current root and the current "
6305 "working directory of any processes or threads which use the old root "
6306 "directory. The caller of B<pivot_root>() must ensure that processes with "
6307 "root or current working directory at the old root operate correctly in "
6308 "either case. An easy way to ensure this is to change their root and current "
6309 "working directory to I<new_root> before invoking B<pivot_root>()."
6311 "古い root ディレクトリを使っていた全てのプロセスやスレッドの カレント root と"
6312 "カレントワーキングディレクトリを、 B<pivot_root>() が変更するかどうかはわか"
6313 "らない。 B<pivot_root>() の呼びだしプロセスは、古い root やカレントワーキン"
6314 "グディレクトリを使っていた プロセスが、いずれの場合でも正しく動作することを保"
6315 "証しなければならない。 これを簡単に行うには、それらのプロセスの root と カレ"
6316 "ントワーキングディレクトリを B<pivot_root>() を呼び出す前に I<new_root> に変"
6320 #: build/C/man2/pivot_root.2:64
6322 "The paragraph above is intentionally vague because the implementation of "
6323 "B<pivot_root>() may change in the future. At the time of writing, "
6324 "B<pivot_root>() changes root and current working directory of each process "
6325 "or thread to I<new_root> if they point to the old root directory. This is "
6326 "necessary in order to prevent kernel threads from keeping the old root "
6327 "directory busy with their root and current working directory, even if they "
6328 "never access the file system in any way. In the future, there may be a "
6329 "mechanism for kernel threads to explicitly relinquish any access to the file "
6330 "system, such that this fairly intrusive mechanism can be removed from "
6333 "上記の段落は、将来 B<pivot_root>() が変更されるかも知れないことを鑑みて、わ"
6334 "ざと曖昧に書いてある。 本ページを記述している時点では、 B<pivot_root>() は古"
6335 "い root ディレクトリを用いている全てのプロセス・スレッドの root と カレント"
6336 "ワーキングディレクトリを I<new_root> に変更する。これはカーネルのスレッドが古"
6337 "い root ディレクトリを busy 状態にしないために必要である。これらのスレッドが "
6338 "古いディレクトリを root やカレントワーキングディレクトリとしていると、 ファイ"
6339 "ルシステムに一切アクセスしない場合でも 古い root が busy になってしまうからで"
6340 "ある。 将来は、カーネルスレッドがあらゆるファイルシステムへのアクセスを 明示"
6341 "的に放棄するメカニズムができ、このでしゃばりな機能は B<pivot_root>() から削"
6345 #: build/C/man2/pivot_root.2:72
6347 "Note that this also applies to the calling process: B<pivot_root>() may or "
6348 "may not affect its current working directory. It is therefore recommended "
6349 "to call B<chdir(\"/\")> immediately after B<pivot_root>()."
6351 "これは呼び出し元のプロセスについても当てはまることに注意。 B<pivot_root>() "
6352 "がカレントプロセスのカレントワーキングディレクトリに影響するかどうかは 分から"
6353 "ない。したがって B<pivot_root>() の直後に B<chdir(\"/\")> を呼び出すとよい。"
6356 #: build/C/man2/pivot_root.2:74
6357 msgid "The following restrictions apply to I<new_root> and I<put_old>:"
6358 msgstr "I<new_root> および I<put_old> には以下の制限がある:"
6361 #: build/C/man2/pivot_root.2:74 build/C/man2/pivot_root.2:76
6362 #: build/C/man2/pivot_root.2:79 build/C/man2/pivot_root.2:83
6368 #: build/C/man2/pivot_root.2:76
6369 msgid "They must be directories."
6370 msgstr "ディレクトリでなければならない。"
6373 #: build/C/man2/pivot_root.2:79
6375 "I<new_root> and I<put_old> must not be on the same file system as the "
6378 "I<new_root> と I<put_old> は現在の root と同じファイルシステムにあってはなら"
6382 #: build/C/man2/pivot_root.2:83
6384 "I<put_old> must be underneath I<new_root>, that is, adding a nonzero number "
6385 "of I</..> to the string pointed to by I<put_old> must yield the same "
6386 "directory as I<new_root>."
6388 "I<put_old> は I<new_root> 以下になければならない。すなわち I<put_old> を差す"
6389 "文字列に 1 個以上の I<../> を付けることによって I<new_root> と同じディレクト"
6393 #: build/C/man2/pivot_root.2:85
6394 msgid "No other file system may be mounted on I<put_old>."
6395 msgstr "他のファイルシステムが I<put_old> にマウントされていてはならない。"
6398 #: build/C/man2/pivot_root.2:89
6399 msgid "See also B<pivot_root>(8) for additional usage examples."
6400 msgstr "利用例については B<pivot_root>(8) を参照のこと。"
6403 #: build/C/man2/pivot_root.2:96
6405 "If the current root is not a mount point (e.g., after B<chroot>(2) or "
6406 "B<pivot_root>(), see also below), not the old root directory, but the mount "
6407 "point of that file system is mounted on I<put_old>."
6409 "現在の root がマウントポイントではない (B<chroot>(2) や B<pivot_root>() の"
6410 "後など。以下も参照) 場合、 古い root ディレクトリではなく、 そのファイルシス"
6411 "テムのマウントポイントが I<put_old> にマウントされる。"
6414 #: build/C/man2/pivot_root.2:101
6416 "I<new_root> does not have to be a mount point. In this case, I</proc/"
6417 "mounts> will show the mount point of the file system containing I<new_root> "
6420 "I<new_root> はマウントポイントでなくてもよい。 この場合 I</proc/mounts> は、 "
6421 "I<new_root> を root (I</>) とするファイルシステムのマウントポイントを表示す"
6425 #: build/C/man2/pivot_root.2:110
6427 "B<pivot_root>() may return (in I<errno>) any of the errors returned by "
6428 "B<stat>(2). Additionally, it may return:"
6430 "B<pivot_root>() は B<stat>(2) の返すあらゆるエラーを (I<errno> に) 返す可能"
6431 "性がある。さらに以下を返すことがある:"
6434 #: build/C/man2/pivot_root.2:114
6436 "I<new_root> or I<put_old> are on the current root file system, or a file "
6437 "system is already mounted on I<put_old>."
6439 "I<new_root> または I<put_old> が、現在の root ファイルシステム上にあるか、既"
6440 "に I<put_old> になんらかのファイルシステムがマウントされている。"
6443 #: build/C/man2/pivot_root.2:117
6444 msgid "I<put_old> is not underneath I<new_root>."
6445 msgstr "I<put_old> が I<new_root> の下層にない。"
6448 #: build/C/man2/pivot_root.2:117
6454 #: build/C/man2/pivot_root.2:120
6455 msgid "I<new_root> or I<put_old> is not a directory."
6456 msgstr "I<new_root> または I<put_old> がディレクトリでない。"
6459 #: build/C/man2/pivot_root.2:125
6460 msgid "The calling process does not have the B<CAP_SYS_ADMIN> capability."
6461 msgstr "呼び出し元のプロセスが B<CAP_SYS_ADMIN> ケーパビリティを持っていない。"
6464 #: build/C/man2/pivot_root.2:128
6465 msgid "B<pivot_root>() was introduced in Linux 2.3.41."
6466 msgstr "B<pivot_root>() は Linux 2.3.41 で導入された。"
6469 #: build/C/man2/pivot_root.2:131
6470 msgid "B<pivot_root>() is Linux-specific and hence is not portable."
6471 msgstr "B<pivot_root>() は Linux に固有のものなので、移植性はない。"
6474 #: build/C/man2/pivot_root.2:138
6476 "B<pivot_root>() should not have to change root and current working "
6477 "directory of all other processes in the system."
6479 "B<pivot_root>() はシステムの他のプロセス全ての root と カレントワーキング"
6480 "ディレクトリとを変更しなくてもよいはずである。"
6483 #: build/C/man2/pivot_root.2:143
6485 "Some of the more obscure uses of B<pivot_root>() may quickly lead to "
6488 "B<pivot_root>() の使い方がもうちょっと曖昧になると、 あっという間にわけのわ"
6492 #: build/C/man2/pivot_root.2:149
6493 msgid "B<chdir>(2), B<chroot>(2), B<stat>(2), B<initrd>(4), B<pivot_root>(8)"
6494 msgstr "B<chdir>(2), B<chroot>(2), B<stat>(2), B<initrd>(4), B<pivot_root>(8)"
6497 #: build/C/man2/process_vm_readv.2:29
6499 msgid "PROCESS_VM_READV"
6503 #: build/C/man2/process_vm_readv.2:29
6509 #: build/C/man2/process_vm_readv.2:32
6511 "process_vm_readv, process_vm_writev - transfer data between process address "
6516 #: build/C/man2/process_vm_readv.2:35
6518 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
6519 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
6522 #: build/C/man2/process_vm_readv.2:42
6525 "B<ssize_t process_vm_readv(pid_t >I<pid>B<,>\n"
6526 "B< const struct iovec *>I<local_iov>B<,>\n"
6527 "B< unsigned long >I<liovcnt>B<,>\n"
6528 "B< const struct iovec *>I<remote_iov>B<,>\n"
6529 "B< unsigned long >I<riovcnt>B<,>\n"
6530 "B< unsigned long >I<flags>B<);>\n"
6534 #: build/C/man2/process_vm_readv.2:49
6537 "B<ssize_t process_vm_writev(pid_t >I<pid>B<,>\n"
6538 "B< const struct iovec *>I<local_iov>B<,>\n"
6539 "B< unsigned long >I<liovcnt>B<,>\n"
6540 "B< const struct iovec *>I<remote_iov>B<,>\n"
6541 "B< unsigned long >I<riovcnt>B<,>\n"
6542 "B< unsigned long >I<flags>B<);>\n"
6546 #: build/C/man2/process_vm_readv.2:57
6548 "These system calls transfer data between the address space of the calling "
6549 "process (\"the local process\") and the process identified by I<pid> (\"the "
6550 "remote process\"). The data moves directly between the address spaces of "
6551 "the two processes, without passing through kernel space."
6555 #: build/C/man2/process_vm_readv.2:82
6557 "The B<process_vm_readv>() system call transfers data from the remote "
6558 "process to the local process. The data to be transferred is identified by "
6559 "I<remote_iov> and I<riovcnt>: I<remote_iov> is a pointer to an array "
6560 "describing address ranges in the process I<pid>, and I<riovcnt> specifies "
6561 "the number of elements in I<remote_iov>. The data is transferred to the "
6562 "locations specified by I<local_iov> and I<liovcnt>: I<local_iov> is a "
6563 "pointer to an array describing address ranges in the calling process, and "
6564 "I<liovcnt> specifies the number of elements in I<local_iov>."
6568 #: build/C/man2/process_vm_readv.2:96
6570 "The B<process_vm_writev>() system call is the converse of "
6571 "B<process_vm_readv>()\\(emit transfers data from the local process to the "
6572 "remote process. Other than the direction of the transfer, the arguments "
6573 "I<liovcnt>, I<local_iov>, I<riovcnt>, and I<remote_iov> have the same "
6574 "meaning as for B<process_vm_readv>()."
6578 #: build/C/man2/process_vm_readv.2:106
6580 "The I<local_iov> and I<remote_iov> arguments point to an array of I<iovec> "
6581 "structures, defined in I<E<lt>sys/uio.hE<gt>> as:"
6583 "引き数 I<local_iov> と I<remote_iov> は I<iovec> 構造体の配列へのポイン\n"
6584 "タである。 I<iovec> 構造体は I<E<lt>sys/uio.hE<gt>> で以下のように定義\n"
6588 #: build/C/man2/process_vm_readv.2:113
6592 " void *iov_base; /* Starting address */\n"
6593 " size_t iov_len; /* Number of bytes to transfer */\n"
6597 " void *iov_base; /* Starting address */\n"
6598 " size_t iov_len; /* Number of bytes to transfer */\n"
6602 #: build/C/man2/process_vm_readv.2:129
6604 "Buffers are processed in array order. This means that B<process_vm_readv>"
6605 "() completely fills I<local_iov[0]> before proceeding to I<local_iov[1]>, "
6606 "and so on. Likewise, I<remote_iov[0]> is completely read before proceeding "
6607 "to I<remote_iov[1]>, and so on."
6609 "バッファは配列の順序で処理される。これは、 B<process_vm_readv>() が\n"
6610 "I<local_iov>[0] が完全に一杯になるまでデータを詰めてから、\n"
6611 "I<local_iov>[1] に進むといったことを意味する。同様に、\n"
6612 "I<remote_iov>[0] を完全に読み出してから I<remote_iov>[1] に進み、\n"
6616 #: build/C/man2/process_vm_readv.2:140
6618 "Similarly, B<process_vm_writev>() writes out the entire contents of "
6619 "I<local_iov[0]> before proceeding to I<local_iov[1]>, and it completely "
6620 "fills I<remote_iov[0]> before proceeding to I<remote_iov[1]>."
6624 #: build/C/man2/process_vm_readv.2:148
6626 "The lengths of I<remote_iov[i].iov_len> and I<local_iov[i].iov_len> do not "
6627 "have to be the same. Thus, it is possible to split a single local buffer "
6628 "into multiple remote buffers, or vice versa."
6632 #: build/C/man2/process_vm_readv.2:152
6633 msgid "The I<flags> argument is currently unused and must be set to 0."
6634 msgstr "I<flags> 引き数は現在使用されておらず、 0 を設定しなければならない。"
6636 #. In time, glibc might provide a wrapper that works around this limit,
6637 #. as is done for readv()/writev()
6639 #: build/C/man2/process_vm_readv.2:165
6641 "The values specified in the I<liovcnt> and I<riovcnt> arguments must be less "
6642 "than or equal to B<IOV_MAX> (defined in I<E<lt>limits.hE<gt>> or accessible "
6643 "via the call I<sysconf(_SC_IOV_MAX)>)."
6647 #: build/C/man2/process_vm_readv.2:175
6649 "The count arguments and I<local_iov> are checked before doing any "
6650 "transfers. If the counts are too big, or I<local_iov> is invalid, or the "
6651 "addresses refer to regions that are inaccessible to the local process, none "
6652 "of the vectors will be processed and an error will be returned immediately."
6656 #: build/C/man2/process_vm_readv.2:195
6658 "Note, however, that these system calls do not check the memory regions in "
6659 "the remote process until just before doing the read/write. Consequently, a "
6660 "partial read/write (see RETURN VALUE) may result if one of the "
6661 "I<remote_iov> elements points to an invalid memory region in the remote "
6662 "process. No further reads/writes will be attempted beyond that point. Keep "
6663 "this in mind when attempting to read data of unknown length (such as C "
6664 "strings that are null-terminated) from a remote process, by avoiding "
6665 "spanning memory pages (typically 4KiB) in a single remote I<iovec> element. "
6666 "(Instead, split the remote read into two I<remote_iov> elements and have "
6667 "them merge back into a single write I<local_iov> entry. The first read "
6668 "entry goes up to the page boundary, while the second starts on the next page "
6673 #: build/C/man2/process_vm_readv.2:209
6675 "In order to read from or write to another process, either the caller must "
6676 "have the capability B<CAP_SYS_PTRACE>, or the real user ID, effective user "
6677 "ID, and saved set-user-ID of the remote process must match the real user ID "
6678 "of the caller I<and> the real group ID, effective group ID, and saved set-"
6679 "group-ID of the remote process must match the real group ID of the caller. "
6680 "(The permission required is exactly the same as that required to perform a "
6681 "B<ptrace>(2) B<PTRACE_ATTACH> on the remote process.)"
6685 #: build/C/man2/process_vm_readv.2:225
6687 "On success, B<process_vm_readv>() returns the number of bytes read and "
6688 "B<process_vm_writev>() returns the number of bytes written. This return "
6689 "value may be less than the total number of requested bytes, if a partial "
6690 "read/write occurred. (Partial transfers apply at the granularity of "
6691 "I<iovec> elements. These system calls won't perform a partial transfer that "
6692 "splits a single I<iovec> element.) The caller should check the return value "
6693 "to determine whether a partial read/write occurred."
6697 #: build/C/man2/process_vm_readv.2:229
6698 msgid "On error, -1 is returned and I<errno> is set appropriately."
6699 msgstr "エラーの場合は -1 が返され、 I<errno> が適切に設定される。"
6702 #: build/C/man2/process_vm_readv.2:241
6704 "The sum of the I<iov_len> values of either I<local_iov> or I<remote_iov> "
6705 "overflows a I<ssize_t> value."
6709 #: build/C/man2/process_vm_readv.2:245
6710 msgid "I<flags> is not 0."
6711 msgstr "I<flags> が 0 でない。"
6714 #: build/C/man2/process_vm_readv.2:251
6715 msgid "I<liovcnt> or I<riovcnt> is too large."
6716 msgstr "I<liovcnt> か I<riovcnt> が大きすぎる。"
6719 #: build/C/man2/process_vm_readv.2:256
6721 "The memory described by I<local_iov> is outside the caller's accessible "
6724 "I<local_iov> が示すメモリが呼び出し側がアクセス可能な\n"
6728 #: build/C/man2/process_vm_readv.2:262
6730 "The memory described by I<remote_iov> is outside the accessible address "
6731 "space of the process I<pid>."
6735 #: build/C/man2/process_vm_readv.2:267
6737 "Could not allocate memory for internal copies of the I<iovec> structures."
6741 #: build/C/man2/process_vm_readv.2:271
6743 "The caller does not have permission to access the address space of the "
6746 "呼び出し側がプロセス I<pid> のアドレス空間に対するアクセス許可を\n"
6750 #: build/C/man2/process_vm_readv.2:276
6751 msgid "No process with ID I<pid> exists."
6752 msgstr "ID が I<pid> のプロセスが存在しない。"
6755 #: build/C/man2/process_vm_readv.2:279
6757 "These system calls were added in Linux 3.2. Support is provided in glibc "
6758 "since version 2.15."
6760 "これらのシステムコールは Linux 3.2 で追加された。ライブラリによる\n"
6761 "サポートは glibc バージョン 2.15 以降で提供されている。"
6764 #: build/C/man2/process_vm_readv.2:281
6765 msgid "These system calls are nonstandard Linux extensions."
6766 msgstr "これらのシステムコールは非標準で Linux による拡張である。"
6769 #: build/C/man2/process_vm_readv.2:287
6771 "The data transfers performed by B<process_vm_readv>() and "
6772 "B<process_vm_writev>() are not guaranteed to be atomic in any way."
6775 #. Original user is MPI, http://www.mcs.anl.gov/research/projects/mpi/
6776 #. See also some benchmarks at http://lwn.net/Articles/405284/
6777 #. and http://marc.info/?l=linux-mm&m=130105930902915&w=2
6779 #: build/C/man2/process_vm_readv.2:295
6781 "These system calls were designed to permit fast message passing by allowing "
6782 "messages to be exchanged with a single copy operation (rather than the "
6783 "double copy that would be required when using, for example, shared memory or "
6788 #: build/C/man2/process_vm_readv.2:303
6790 "The following code sample demonstrates the use of B<process_vm_readv>(). It "
6791 "reads 20 bytes at the address 0x10000 from the process with PID 10 and "
6792 "writes the first 10 bytes into I<buf1> and the second 10 bytes into I<buf2>."
6796 #: build/C/man2/process_vm_readv.2:306
6798 msgid "#include E<lt>sys/uio.hE<gt>\n"
6799 msgstr "#include E<lt>sys/uio.hE<gt>\n"
6802 #: build/C/man2/process_vm_readv.2:316
6808 " struct iovec local[2];\n"
6809 " struct iovec remote[1];\n"
6813 " pid_t pid = 10; /* PID of remote process */\n"
6818 " struct iovec local[2];\n"
6819 " struct iovec remote[1];\n"
6823 " pid_t pid = 10; /* PID of remote process */\n"
6826 #: build/C/man2/process_vm_readv.2:323
6829 " local[0].iov_base = buf1;\n"
6830 " local[0].iov_len = 10;\n"
6831 " local[1].iov_base = buf2;\n"
6832 " local[1].iov_len = 10;\n"
6833 " remote[0].iov_base = (void *) 0x10000;\n"
6834 " remote[1].iov_len = 20;\n"
6836 " local[0].iov_base = buf1;\n"
6837 " local[0].iov_len = 10;\n"
6838 " local[1].iov_base = buf2;\n"
6839 " local[1].iov_len = 10;\n"
6840 " remote[0].iov_base = (void *) 0x10000;\n"
6841 " remote[1].iov_len = 20;\n"
6844 #: build/C/man2/process_vm_readv.2:330
6847 " nread = process_vm_readv(pid, local, 2, remote, 1, 0);\n"
6848 " if (nread != 20)\n"
6854 " nread = process_vm_readv(pid, local, 2, remote, 1, 0);\n"
6855 " if (nread != 20)\n"
6862 #: build/C/man2/process_vm_readv.2:334
6863 msgid "B<readv>(2), B<writev>(2)"
6864 msgstr "B<readv>(2), B<writev>(2)"
6867 #: build/C/man2/ptrace.2:44
6873 #: build/C/man2/ptrace.2:44
6875 #| msgid "2009-02-20"
6880 #: build/C/man2/ptrace.2:47
6881 msgid "ptrace - process trace"
6882 msgstr "ptrace - プロセスのトレース"
6885 #: build/C/man2/ptrace.2:50
6887 msgid "B<#include E<lt>sys/ptrace.hE<gt>>\n"
6888 msgstr "B<#include E<lt>sys/ptrace.hE<gt>>\n"
6891 #: build/C/man2/ptrace.2:53
6894 "B<long ptrace(enum __ptrace_request >I<request>B<, pid_t >I<pid>B<, >\n"
6895 "B< void *>I<addr>B<, void *>I<data>B<);>\n"
6897 "B<long ptrace(enum __ptrace_request >I<request>B<, pid_t >I<pid>B<, >\n"
6898 "B< void *>I<addr>B<, void *>I<data>B<);>\n"
6901 #: build/C/man2/ptrace.2:62
6904 #| "The B<ptrace>() system call provides a means by which a parent process "
6905 #| "may observe and control the execution of another process, and examine and "
6906 #| "change its core image and registers. It is primarily used to implement "
6907 #| "breakpoint debugging and system call tracing."
6909 "The B<ptrace>() system call provides a means by which one process (the "
6910 "\"tracer\") may observe and control the execution of another process (the "
6911 "\"tracee\"), and examine and change the tracee's memory and registers. It "
6912 "is primarily used to implement breakpoint debugging and system call tracing."
6914 "B<ptrace>() システムコールは、親プロセスが、別のプロセスの実行の監視/制御を "
6915 "行ったり、コアイメージ (core image) やレジスタの調査/変更を 行ったりする手段"
6916 "を提供する。 B<ptrace>() は、主にブレークポイントによるデバッグやシステム"
6917 "コールのトレースを 実装するのに用いられる。"
6920 #: build/C/man2/ptrace.2:73
6922 "A tracee first needs to be attached to the tracer. Attachment and "
6923 "subsequent commands are per thread: in a multithreaded process, every thread "
6924 "can be individually attached to a (potentially different) tracer, or left "
6925 "not attached and thus not debugged. Therefore, \"tracee\" always means "
6926 "\"(one) thread\", never \"a (possibly multithreaded) process\". Ptrace "
6927 "commands are always sent to a specific tracee using a call of the form"
6931 #: build/C/man2/ptrace.2:75
6933 msgid " ptrace(PTRACE_foo, pid, ...)\n"
6937 #: build/C/man2/ptrace.2:79
6938 msgid "where I<pid> is the thread ID of the corresponding Linux thread."
6942 #: build/C/man2/ptrace.2:85
6944 "(Note that in this page, a \"multithreaded process\" means a thread group "
6945 "consisting of threads created using the B<clone>(2) B<CLONE_THREAD> flag.)"
6949 #: build/C/man2/ptrace.2:96
6952 #| "The parent can initiate a trace by calling B<fork>(2) and having the "
6953 #| "resulting child do a B<PTRACE_TRACEME>, followed (typically) by an B<exec>"
6954 #| "(3). Alternatively, the parent may commence trace of an existing process "
6955 #| "using B<PTRACE_ATTACH>."
6957 "A process can initiate a trace by calling B<fork>(2) and having the "
6958 "resulting child do a B<PTRACE_TRACEME>, followed (typically) by an B<execve>"
6959 "(2). Alternatively, one process may commence tracing another process using "
6960 "B<PTRACE_ATTACH> or B<PTRACE_SEIZE>."
6962 "トレースを開始するには、まず親プロセスで B<fork>(2) を呼び出す。生成された子"
6963 "プロセスで B<PTRACE_TRACEME> を行い、続いて (典型的には) B<exec>(3) を行な"
6964 "う。 別の方法としては、 親プロセスが既存のプロセスに対して B<PTRACE_ATTACH> "
6968 #: build/C/man2/ptrace.2:113
6971 #| "While being traced, the child will stop each time a signal is delivered, "
6972 #| "even if the signal is being ignored. (The exception is B<SIGKILL>, which "
6973 #| "has its usual effect.) The parent will be notified at its next B<wait>"
6974 #| "(2) and may inspect and modify the child process while it is stopped. "
6975 #| "The parent then causes the child to continue, optionally ignoring the "
6976 #| "delivered signal (or even delivering a different signal instead)."
6978 "While being traced, the tracee will stop each time a signal is delivered, "
6979 "even if the signal is being ignored. (An exception is B<SIGKILL>, which has "
6980 "its usual effect.) The tracer will be notified at its next call to "
6981 "B<waitpid>(2) (or one of the related \"wait\" system calls); that call will "
6982 "return a I<status> value containing information that indicates the cause of "
6983 "the stop in the tracee. While the tracee is stopped, the tracer can use "
6984 "various ptrace requests to inspect and modify the tracee. The tracer then "
6985 "causes the tracee to continue, optionally ignoring the delivered signal (or "
6986 "even delivering a different signal instead)."
6988 "トレースの実行中、子プロセスはシグナルが配送されるたびに、 たとえそのシグナル"
6989 "が無視すべきものであっても停止する (B<SIGKILL> は例外で、通常どおりの効果をも"
6990 "たらす)。 親プロセスには次の B<wait>(2) で通知され、停止している間に子プロセ"
6991 "スを調べたり修正したりすることができる。 そして親プロセスは子プロセスの実行を"
6992 "再開させるが、配送された シグナルを無視することもできる (あるいは代わりに別の"
6993 "シグナルを 配送することもできる) 。"
6996 #: build/C/man2/ptrace.2:123
6998 "If the B<PTRACE_O_TRACEEXEC> option is not in effect, all successful calls "
6999 "to B<execve>(2) by the traced process will cause it to be sent a B<SIGTRAP> "
7000 "signal, giving the parent a chance to gain control before the new program "
7005 #: build/C/man2/ptrace.2:127
7008 #| "When the parent is finished tracing, it can terminate the child with "
7009 #| "B<PTRACE_KILL> or cause it to continue executing in a normal, untraced "
7010 #| "mode via B<PTRACE_DETACH>."
7012 "When the tracer is finished tracing, it can cause the tracee to continue "
7013 "executing in a normal, untraced mode via B<PTRACE_DETACH>."
7015 "親プロセスがトレースを終了する際には、 B<PTRACE_KILL> を使用して子プロセスを"
7016 "終了させることもできるし、 B<PTRACE_DETACH> を用いて通常のトレースなしのモー"
7017 "ドにして、 実行を継続させることもできる。"
7020 #: build/C/man2/ptrace.2:131
7021 msgid "The value of I<request> determines the action to be performed:"
7022 msgstr "I<request> の値がこのシステムコールの動作を決定する:"
7025 #: build/C/man2/ptrace.2:131
7027 msgid "B<PTRACE_TRACEME>"
7028 msgstr "B<PTRACE_TRACEME>"
7031 #: build/C/man2/ptrace.2:141
7033 "Indicate that this process is to be traced by its parent. A process "
7034 "probably shouldn't make this request if its parent isn't expecting to trace "
7035 "it. (I<pid>, I<addr>, and I<data> are ignored.)"
7039 #: build/C/man2/ptrace.2:156
7042 #| "The above request is used only by the child process; the rest are used "
7043 #| "only by the parent. In the following requests, I<pid> specifies the "
7044 #| "child process to be acted on. For requests other than B<PTRACE_KILL>, "
7045 #| "the child process must be stopped."
7047 "The B<PTRACE_TRACEME> request is used only by the tracee; the remaining "
7048 "requests are used only by the tracer. In the following requests, I<pid> "
7049 "specifies the thread ID of the tracee to be acted on. For requests other "
7050 "than B<PTRACE_ATTACH>, B<PTRACE_SEIZE>, B<PTRACE_INTERRUPT> and "
7051 "B<PTRACE_KILL>, the tracee must be stopped."
7053 "上記の要求は子プロセスだけが行なうものである。 残りは親プロセスだけが行なうも"
7054 "のである。 以下の要求では、I<pid> で操作の対象となる 子プロセスを指定する。 "
7055 "B<PTRACE_KILL> を除き、要求を行なうためには 子プロセスは停止していなければな"
7059 #: build/C/man2/ptrace.2:156
7061 msgid "B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>"
7062 msgstr "B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>"
7065 #: build/C/man2/ptrace.2:167
7068 #| "Reads a word at the location I<addr> in the child's memory, returning the "
7069 #| "word as the result of the B<ptrace>() call. Linux does not have "
7070 #| "separate text and data address spaces, so the two requests are currently "
7071 #| "equivalent. (The argument I<data> is ignored.)"
7073 "Read a word at the address I<addr> in the tracee's memory, returning the "
7074 "word as the result of the B<ptrace>() call. Linux does not have separate "
7075 "text and data address spaces, so these two requests are currently "
7076 "equivalent. (I<data> is ignored.)"
7078 "子プロセスのメモリの I<addr> の位置から 1 ワードを読み出す。読み出したワード"
7079 "は B<ptrace>() の返り値として返される。 Linux ではテキスト (text) とデータ "
7080 "(data) で 同じアドレス空間を使用するため、この 2 つの要求は現在のところ 同じ"
7081 "ものである。 (引き数 I<data> は無視される。)"
7084 #: build/C/man2/ptrace.2:167
7086 msgid "B<PTRACE_PEEKUSER>"
7087 msgstr "B<PTRACE_PEEKUSER>"
7089 #. PTRACE_PEEKUSR in kernel source, but glibc uses PTRACE_PEEKUSER,
7090 #. and that is the name that seems common on other systems.
7092 #: build/C/man2/ptrace.2:185
7095 #| "Reads a word at offset I<addr> in the child's USER area, which holds the "
7096 #| "registers and other information about the process (see I<E<lt>sys/user."
7097 #| "hE<gt>>). The word is returned as the result of the B<ptrace>() call. "
7098 #| "Typically the offset must be word-aligned, though this might vary by "
7099 #| "architecture. See NOTES. (I<data> is ignored.)"
7101 "Read a word at offset I<addr> in the tracee's USER area, which holds the "
7102 "registers and other information about the process (see I<E<lt>sys/user."
7103 "hE<gt>>). The word is returned as the result of the B<ptrace>() call. "
7104 "Typically, the offset must be word-aligned, though this might vary by "
7105 "architecture. See NOTES. (I<data> is ignored.)"
7107 "子プロセスの USER 領域のオフセット I<addr> の位置から 1 ワードを読み込む。"
7108 "USER 領域にはそのプロセスの レジスタ (registers) などの情報が保持されている "
7109 "(I<E<lt>sys/user.hE<gt>> を参照)。読み込んだワードは B<ptrace>() コールの結"
7110 "果として返される。 たいていはオフセットはワード境界になければならないが、 "
7111 "アーキテクチャによってはその必要はない。 「注意」の節を参照。 (I<data> は無視"
7115 #: build/C/man2/ptrace.2:185
7117 msgid "B<PTRACE_POKETEXT>, B<PTRACE_POKEDATA>"
7118 msgstr "B<PTRACE_POKETEXT>, B<PTRACE_POKEDATA>"
7121 #: build/C/man2/ptrace.2:197
7124 #| "Copies the word I<data> to location I<addr> in the child's memory. As "
7125 #| "above, the two requests are currently equivalent."
7127 "Copy the word I<data> to the address I<addr> in the tracee's memory. As for "
7128 "B<PTRACE_PEEKTEXT> and B<PTRACE_PEEKDATA>, these two requests are currently "
7131 "ワード I<data> を子プロセスのメモリの I<addr> の位置へコピーする。上と同様"
7132 "に、現在のところ二つの 要求は同じものである。"
7135 #: build/C/man2/ptrace.2:197
7137 msgid "B<PTRACE_POKEUSER>"
7138 msgstr "B<PTRACE_POKEUSER>"
7140 #. PTRACE_POKEUSR in kernel source, but glibc uses PTRACE_POKEUSER,
7141 #. and that is the name that seems common on other systems.
7142 #. FIXME In the preceding sentence, which modifications are disallowed,
7143 #. and when they are disallowed, how does user space discover that fact?
7145 #: build/C/man2/ptrace.2:213
7148 #| "Copies the word I<data> to offset I<addr> in the child's USER area. As "
7149 #| "above, the offset must typically be word-aligned. In order to maintain "
7150 #| "the integrity of the kernel, some modifications to the USER area are "
7153 "Copy the word I<data> to offset I<addr> in the tracee's USER area. As for "
7154 "B<PTRACE_PEEKUSER>, the offset must typically be word-aligned. In order to "
7155 "maintain the integrity of the kernel, some modifications to the USER area "
7158 "ワード I<data> を子プロセスの USER 領域のオフセット I<addr> の位置にコピーす"
7159 "る。 上と同様に、通常、オフセットはワード境界になければならない。 カーネルの"
7160 "完全性 (integrity) を維持するため、 変更内容によっては USER 領域の変更は禁止"
7164 #: build/C/man2/ptrace.2:213
7166 msgid "B<PTRACE_GETREGS>, B<PTRACE_GETFPREGS>"
7167 msgstr "B<PTRACE_GETREGS>, B<PTRACE_GETFPREGS>"
7170 #: build/C/man2/ptrace.2:236
7173 #| "Copies the child's general purpose or floating-point registers, "
7174 #| "respectively, to location I<data> in the parent. See I<E<lt>sys/user."
7175 #| "hE<gt>> for information on the format of this data. (I<addr> is ignored.)"
7177 "Copy the tracee's general-purpose or floating-point registers, respectively, "
7178 "to the address I<data> in the tracer. See I<E<lt>sys/user.hE<gt>> for "
7179 "information on the format of this data. (I<addr> is ignored.) Note that "
7180 "SPARC systems have the meaning of I<data> and I<addr> reversed; that is, "
7181 "I<data> is ignored and the registers are copied to the address I<addr>. "
7182 "B<PTRACE_GETREGS> and B<PTRACE_GETFPREGS> are not present on all "
7185 "それぞれ、子プロセスの汎用レジスタ、浮動小数点レジスタを親プロセスの I<data> "
7186 "の位置にコピーする。この data の書式に関しては I<E<lt>sys/user.hE<gt>> を参照"
7187 "すること。(I<addr> は無視される。)"
7190 #: build/C/man2/ptrace.2:236
7192 #| msgid "B<PTRACE_GETEVENTMSG> (since Linux 2.5.46)"
7193 msgid "B<PTRACE_GETREGSET> (since Linux 2.6.34)"
7194 msgstr "B<PTRACE_GETEVENTMSG> (Linux 2.5.46 以降)"
7197 #: build/C/man2/ptrace.2:257
7199 "Read the tracee's registers. I<addr> specifies, in an architecture-"
7200 "dependent way, the type of registers to be read. B<NT_PRSTATUS> (with "
7201 "numerical value 1) usually results in reading of general-purpose "
7202 "registers. If the CPU has, for example, floating-point and/or vector "
7203 "registers, they can be retrieved by setting I<addr> to the corresponding "
7204 "B<NT_foo> constant. I<data> points to a B<struct iovec>, which describes "
7205 "the destination buffer's location and length. On return, the kernel "
7206 "modifies B<iov.len> to indicate the actual number of bytes returned."
7210 #: build/C/man2/ptrace.2:257
7212 msgid "B<PTRACE_GETSIGINFO> (since Linux 2.3.99-pre6)"
7213 msgstr "B<PTRACE_GETSIGINFO> (Linux 2.3.99-pre6 以降)"
7216 #: build/C/man2/ptrace.2:269
7219 #| "Retrieve information about the signal that caused the stop. Copies a "
7220 #| "I<siginfo_t> structure (see B<sigaction>(2)) from the child to location "
7221 #| "I<data> in the parent. (I<addr> is ignored.)"
7223 "Retrieve information about the signal that caused the stop. Copy a "
7224 "I<siginfo_t> structure (see B<sigaction>(2)) from the tracee to the address "
7225 "I<data> in the tracer. (I<addr> is ignored.)"
7227 "停止の原因となったシグナルに関する情報を取得する。 I<siginfo_t> 構造体 "
7228 "(B<sigaction>(2) 参照) を子プロセスから親プロセスの I<data> の位置にコピーす"
7229 "る。 (I<addr> は無視される。)"
7232 #: build/C/man2/ptrace.2:269
7234 msgid "B<PTRACE_SETREGS>, B<PTRACE_SETFPREGS>"
7235 msgstr "B<PTRACE_SETREGS>, B<PTRACE_SETFPREGS>"
7237 #. FIXME In the preceding sentence, which modifications are disallowed,
7238 #. and when they are disallowed, how does user space discover that fact?
7240 #: build/C/man2/ptrace.2:294
7243 #| "Copies the child's general purpose or floating-point registers, "
7244 #| "respectively, from location I<data> in the parent. As for "
7245 #| "B<PTRACE_POKEUSER>, some general purpose register modifications may be "
7246 #| "disallowed. (I<addr> is ignored.)"
7248 "Modify the tracee's general-purpose or floating-point registers, "
7249 "respectively, from the address I<data> in the tracer. As for "
7250 "B<PTRACE_POKEUSER>, some general-purpose register modifications may be "
7251 "disallowed. (I<addr> is ignored.) Note that SPARC systems have the meaning "
7252 "of I<data> and I<addr> reversed; that is, I<data> is ignored and the "
7253 "registers are copied from the address I<addr>. B<PTRACE_SETREGS> and "
7254 "B<PTRACE_SETFPREGS> are not present on all architectures."
7256 "それぞれ、子プロセスの汎用レジスタ、浮動小数点レジスタに 親プロセスの "
7257 "I<date> の位置からコピーする。 B<PTRACE_POKEUSER> と同様に、汎用レジスタに"
7258 "よっては 変更が禁止されている場合がある。 (I<addr> は無視される。)"
7261 #: build/C/man2/ptrace.2:294
7263 #| msgid "B<PTRACE_GETEVENTMSG> (since Linux 2.5.46)"
7264 msgid "B<PTRACE_SETREGSET> (since Linux 2.6.34)"
7265 msgstr "B<PTRACE_GETEVENTMSG> (Linux 2.5.46 以降)"
7268 #: build/C/man2/ptrace.2:303
7270 "Modify the tracee's registers. The meaning of I<addr> and I<data> is "
7271 "analogous to B<PTRACE_GETREGSET>."
7275 #: build/C/man2/ptrace.2:303
7277 msgid "B<PTRACE_SETSIGINFO> (since Linux 2.3.99-pre6)"
7278 msgstr "B<PTRACE_SETSIGINFO> (Linux 2.3.99-pre6 以降)"
7281 #: build/C/man2/ptrace.2:319
7284 #| "Set signal information. Copies a I<siginfo_t> structure from location "
7285 #| "I<data> in the parent to the child. This will only affect signals that "
7286 #| "would normally be delivered to the child and were caught by the tracer. "
7287 #| "It may be difficult to tell these normal signals from synthetic signals "
7288 #| "generated by B<ptrace>() itself. (I<addr> is ignored.)"
7290 "Set signal information: copy a I<siginfo_t> structure from the address "
7291 "I<data> in the tracer to the tracee. This will affect only signals that "
7292 "would normally be delivered to the tracee and were caught by the tracer. It "
7293 "may be difficult to tell these normal signals from synthetic signals "
7294 "generated by B<ptrace>() itself. (I<addr> is ignored.)"
7296 "シグナル情報を設定する。 I<siginfo_t> 構造体を親プロセスのデータ I<data> の位"
7297 "置から 子プロセスにコピーする。 この処理を行うことができるのは、子プロセスに"
7298 "通常は配送されるはずで トレーサに捕捉されたシグナルについてだけである。 これ"
7299 "らの通常のシグナルと B<ptrace>() 自身が発生するシグナルを見分けるのは難しい"
7300 "かもしれない。 (I<addr> は無視される。)"
7303 #: build/C/man2/ptrace.2:319
7305 msgid "B<PTRACE_SETOPTIONS> (since Linux 2.4.6; see BUGS for caveats)"
7306 msgstr "B<PTRACE_SETOPTIONS> (Linux 2.4.6 以降; バグの章にある警告も参照)"
7309 #: build/C/man2/ptrace.2:328
7312 #| "Sets ptrace options from I<data> in the parent. (I<addr> is ignored.) "
7313 #| "I<data> is interpreted as a bit mask of options, which are specified by "
7314 #| "the following flags:"
7316 "Set ptrace options from I<data>. (I<addr> is ignored.) I<data> is "
7317 "interpreted as a bit mask of options, which are specified by the following "
7320 "親プロセスの I<data> に基づいて ptrace のオプションを設定する (I<addr> は無視"
7321 "される)。 I<data> はオプションのビットマスクとして解釈され、 オプションには以"
7325 #: build/C/man2/ptrace.2:329
7327 #| msgid "B<PTRACE_O_TRACEEXIT> (since Linux 2.5.60)"
7328 msgid "B<PTRACE_O_EXITKILL> (since Linux 3.8)"
7329 msgstr "B<PTRACE_O_TRACEEXIT> (Linux 2.5.60 以降)"
7331 #. commit 992fb6e170639b0849bace8e49bf31bd37c4123
7333 #: build/C/man2/ptrace.2:337
7335 "If a tracer sets this flag, a B<SIGKILL> signal will be sent to every tracee "
7336 "if the tracer exits. This option is useful for ptrace jailers that want to "
7337 "ensure that tracees can never escape the tracer's control."
7341 #: build/C/man2/ptrace.2:337
7343 msgid "B<PTRACE_O_TRACECLONE> (since Linux 2.5.46)"
7344 msgstr "B<PTRACE_O_TRACECLONE> (Linux 2.5.46 以降)"
7347 #: build/C/man2/ptrace.2:349
7350 #| "Stop the child at the next B<fork>(2) call with I<SIGTRAP | "
7351 #| "PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
7352 #| "newly forked process, which will start with a B<SIGSTOP>. The PID for "
7353 #| "the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
7355 "Stop the tracee at the next B<clone>(2) and automatically start tracing the "
7356 "newly cloned process, which will start with a B<SIGSTOP>. A B<waitpid>(2) "
7357 "by the tracer will return a I<status> value such that"
7359 "次の B<fork>(2) 呼び出し時に I<SIGTRAP | PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ "
7360 "8> で 子プロセスの動作を停止させ、 新たに fork されたプロセスのトレースを自動"
7361 "的に開始し、 B<SIGSTOP> でそのプロセスの実行を開始する。 新しいプロセスの "
7362 "PID は B<PTRACE_GETEVENTMSG> で取得できる。"
7365 #: build/C/man2/ptrace.2:352
7367 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_CLONEE<lt>E<lt>8))\n"
7371 #: build/C/man2/ptrace.2:356 build/C/man2/ptrace.2:437
7372 #: build/C/man2/ptrace.2:465
7373 msgid "The PID of the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
7377 #: build/C/man2/ptrace.2:377
7380 #| "Stop the child at the next B<clone>(2) call with I<SIGTRAP | "
7381 #| "PTRACE_EVENT_CLONE\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
7382 #| "newly cloned process, which will start with a B<SIGSTOP>. The PID for "
7383 #| "the new process can be retrieved with B<PTRACE_GETEVENTMSG>. This option "
7384 #| "may not catch B<clone>(2) calls in all cases. If the child calls "
7385 #| "B<clone>(2) with the B<CLONE_VFORK> flag, B<PTRACE_EVENT_VFORK> will be "
7386 #| "delivered instead if B<PTRACE_O_TRACEVFORK> is set; otherwise if the "
7387 #| "child calls B<clone>(2) with the exit signal set to B<SIGCHLD>, "
7388 #| "B<PTRACE_EVENT_FORK> will be delivered if B<PTRACE_O_TRACEFORK> is set."
7390 "This option may not catch B<clone>(2) calls in all cases. If the tracee "
7391 "calls B<clone>(2) with the B<CLONE_VFORK> flag, B<PTRACE_EVENT_VFORK> will "
7392 "be delivered instead if B<PTRACE_O_TRACEVFORK> is set; otherwise if the "
7393 "tracee calls B<clone>(2) with the exit signal set to B<SIGCHLD>, "
7394 "B<PTRACE_EVENT_FORK> will be delivered if B<PTRACE_O_TRACEFORK> is set."
7396 "次の B<clone>(2) 呼び出し時に I<SIGTRAP | PTRACE_EVENT_CLONE\\ E<lt>E<lt> "
7397 "\\8> で 子プロセスの動作を停止させ、 新たに clone で作成されたプロセスのト"
7398 "レースを自動的に開始し、 B<SIGSTOP> でプロセスの実行を開始する。 新しいプロセ"
7399 "スの PID は B<PTRACE_GETEVENTMSG> で取得できる。 このオプションで全ての "
7400 "B<clone>(2) コールを捕まえられるわけではない。 子プロセスが B<CLONE_VFORK> "
7401 "フラグ付きで B<clone>(2) を呼び出した場合、 B<PTRACE_O_TRACEVFORK> が設定さ"
7402 "れていれば代わりに B<PTRACE_EVENT_VFORK> が配送される。 また、子プロセスが終"
7403 "了シグナルを B<SIGCHLD> に設定して B<clone>(2) を呼び出した場合は、 "
7404 "B<PTRACE_O_TRACEFORK> が設定されていれば B<PTRACE_EVENT_FORK> が配送される。"
7407 #: build/C/man2/ptrace.2:377
7409 msgid "B<PTRACE_O_TRACEEXEC> (since Linux 2.5.46)"
7410 msgstr "B<PTRACE_O_TRACEEXEC> (Linux 2.5.46 以降)"
7413 #: build/C/man2/ptrace.2:386
7415 "Stop the tracee at the next B<execve>(2). A B<waitpid>(2) by the tracer "
7416 "will return a I<status> value such that"
7420 #: build/C/man2/ptrace.2:389
7422 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXECE<lt>E<lt>8))\n"
7426 #: build/C/man2/ptrace.2:395
7428 "If the execing thread is not a thread group leader, the thread ID is reset "
7429 "to thread group leader's ID before this stop. Since Linux 3.0, the former "
7430 "thread ID can be retrieved with B<PTRACE_GETEVENTMSG>."
7434 #: build/C/man2/ptrace.2:395
7436 msgid "B<PTRACE_O_TRACEEXIT> (since Linux 2.5.60)"
7437 msgstr "B<PTRACE_O_TRACEEXIT> (Linux 2.5.60 以降)"
7440 #: build/C/man2/ptrace.2:403
7442 "Stop the tracee at exit. A B<waitpid>(2) by the tracer will return a "
7443 "I<status> value such that"
7447 #: build/C/man2/ptrace.2:406
7449 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXITE<lt>E<lt>8))\n"
7453 #: build/C/man2/ptrace.2:410
7454 msgid "The tracee's exit status can be retrieved with B<PTRACE_GETEVENTMSG>."
7458 #: build/C/man2/ptrace.2:418
7461 #| "Stop the child at exit with I<SIGTRAP | PTRACE_EVENT_EXIT\\ E<lt>E<lt>\\ "
7462 #| "8>. The child's exit status can be retrieved with "
7463 #| "B<PTRACE_GETEVENTMSG>. This stop will be done early during process exit "
7464 #| "when registers are still available, allowing the tracer to see where the "
7465 #| "exit occurred, whereas the normal exit notification is done after the "
7466 #| "process is finished exiting. Even though context is available, the "
7467 #| "tracer cannot prevent the exit from happening at this point."
7469 "The tracee is stopped early during process exit, when registers are still "
7470 "available, allowing the tracer to see where the exit occurred, whereas the "
7471 "normal exit notification is done after the process is finished exiting. "
7472 "Even though context is available, the tracer cannot prevent the exit from "
7473 "happening at this point."
7475 "終了 (exit) 時に I<SIGTRAP | PTRACE_EVENT_EXIT\\ E<lt>E<lt>\\ 8> で子プロセス"
7476 "の動作を停止させる。子プロセスの終了ステータスは B<PTRACE_GETEVENTMSG> で取得"
7477 "できる。 この停止はレジスタがまだ参照可能であるプロセス終了処理の初期に行わ"
7478 "れ、 トレーサはどこで終了が発生したかを知ることができる。 通常の終了通知 "
7479 "(exit notification) はプロセスの終了処理が完了した後に 行われる。コンテキスト"
7480 "を参照することはできるにも関わらず、 トレーサはこの時点から終了を止めることは"
7484 #: build/C/man2/ptrace.2:418
7486 msgid "B<PTRACE_O_TRACEFORK> (since Linux 2.5.46)"
7487 msgstr "B<PTRACE_O_TRACEFORK> (Linux 2.5.46 以降)"
7490 #: build/C/man2/ptrace.2:430
7493 #| "Stop the child at the next B<fork>(2) call with I<SIGTRAP | "
7494 #| "PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
7495 #| "newly forked process, which will start with a B<SIGSTOP>. The PID for "
7496 #| "the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
7498 "Stop the tracee at the next B<fork>(2) and automatically start tracing the "
7499 "newly forked process, which will start with a B<SIGSTOP>. A B<waitpid>(2) "
7500 "by the tracer will return a I<status> value such that"
7502 "次の B<fork>(2) 呼び出し時に I<SIGTRAP | PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ "
7503 "8> で 子プロセスの動作を停止させ、 新たに fork されたプロセスのトレースを自動"
7504 "的に開始し、 B<SIGSTOP> でそのプロセスの実行を開始する。 新しいプロセスの "
7505 "PID は B<PTRACE_GETEVENTMSG> で取得できる。"
7508 #: build/C/man2/ptrace.2:433
7510 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_FORKE<lt>E<lt>8))\n"
7514 #: build/C/man2/ptrace.2:437
7516 msgid "B<PTRACE_O_TRACESYSGOOD> (since Linux 2.4.6)"
7517 msgstr "B<PTRACE_O_TRACESYSGOOD> (Linux 2.4.6 以降)"
7520 #: build/C/man2/ptrace.2:446
7523 #| "When delivering syscall traps, set bit 7 in the signal number (i.e., "
7524 #| "deliver I<SIGTRAP | 0x80>). This makes it easy for the tracer to tell "
7525 #| "the difference between normal traps and those caused by a syscall. "
7526 #| "(B<PTRACE_O_TRACESYSGOOD> may not work on all architectures.)"
7528 "When delivering system call traps, set bit 7 in the signal number (i.e., "
7529 "deliver I<SIGTRAP|0x80>). This makes it easy for the tracer to distinguish "
7530 "normal traps from those caused by a system call. (B<PTRACE_O_TRACESYSGOOD> "
7531 "may not work on all architectures.)"
7533 "システムコールのトラップが配送されたときに、シグナル番号のビット 7 を設定す"
7534 "る (すなわち、I<SIGTRAP | 0x80> を配送する)。 これにより、トレーサが通常のト"
7535 "ラップとシステムコールによるトラップを 区別しやすくなる。 "
7536 "(B<PTRACE_O_TRACESYSGOOD> はどのアーキテクチャでも動作しない可能性がある。)"
7539 #: build/C/man2/ptrace.2:446
7541 msgid "B<PTRACE_O_TRACEVFORK> (since Linux 2.5.46)"
7542 msgstr "B<PTRACE_O_TRACEVFORK> (Linux 2.5.46 以降)"
7545 #: build/C/man2/ptrace.2:458
7548 #| "Stop the child at the next B<vfork>(2) call with I<SIGTRAP | "
7549 #| "PTRACE_EVENT_VFORK\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
7550 #| "newly vforked process, which will start with a B<SIGSTOP>. The PID for "
7551 #| "the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
7553 "Stop the tracee at the next B<vfork>(2) and automatically start tracing the "
7554 "newly vforked process, which will start with a B<SIGSTOP>. A B<waitpid>(2) "
7555 "by the tracer will return a I<status> value such that"
7557 "次の B<vfork>(2) 呼び出し時に I<SIGTRAP | PTRACE_EVENT_VFORK\\ E<lt>E<lt>\\ "
7558 "8> で 子プロセスの動作を停止させ、 新たに vfork されたプロセスのトレースを自"
7559 "動的に開始し、 B<SIGSTOP> でそのプロセスの実行を開始する。 新しいプロセスの "
7560 "PID は B<PTRACE_GETEVENTMSG> で取得できる。"
7563 #: build/C/man2/ptrace.2:461
7565 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORKE<lt>E<lt>8))\n"
7569 #: build/C/man2/ptrace.2:465
7571 msgid "B<PTRACE_O_TRACEVFORKDONE> (since Linux 2.5.60)"
7572 msgstr "B<PTRACE_O_TRACEVFORKDONE> (Linux 2.5.60 以降)"
7575 #: build/C/man2/ptrace.2:474
7577 "Stop the tracee at the completion of the next B<vfork>(2). A B<waitpid>(2) "
7578 "by the tracer will return a I<status> value such that"
7582 #: build/C/man2/ptrace.2:477
7584 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORK_DONEE<lt>E<lt>8))\n"
7588 #: build/C/man2/ptrace.2:481
7590 "The PID of the new process can (since Linux 2.6.18) be retrieved with "
7591 "B<PTRACE_GETEVENTMSG>."
7595 #: build/C/man2/ptrace.2:482
7597 msgid "B<PTRACE_GETEVENTMSG> (since Linux 2.5.46)"
7598 msgstr "B<PTRACE_GETEVENTMSG> (Linux 2.5.46 以降)"
7601 #: build/C/man2/ptrace.2:502
7604 #| "Retrieve a message (as an I<unsigned long>) about the ptrace event that "
7605 #| "just happened, placing it in the location I<data> in the parent. For "
7606 #| "B<PTRACE_EVENT_EXIT> this is the child's exit status. For "
7607 #| "B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK> and B<PTRACE_EVENT_CLONE> "
7608 #| "this is the PID of the new process. Since Linux 2.6.18, the PID of the "
7609 #| "new process is also available for B<PTRACE_EVENT_VFORK_DONE>. (I<addr> "
7612 "Retrieve a message (as an I<unsigned long>) about the ptrace event that "
7613 "just happened, placing it at the address I<data> in the tracer. For "
7614 "B<PTRACE_EVENT_EXIT>, this is the tracee's exit status. For "
7615 "B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK>, B<PTRACE_EVENT_VFORK_DONE>, and "
7616 "B<PTRACE_EVENT_CLONE>, this is the PID of the new process. (I<addr> is "
7619 "発生したばかりの ptrace イベントに関するメッセージを (I<unsigned long> 型で) "
7620 "取得する。 取得したメッセージは親プロセスの I<data> の位置に格納される。 得ら"
7621 "れる内容は、 B<PTRACE_EVENT_EXIT> の場合は子プロセスの終了ステータスであり、 "
7622 "B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK>, B<PTRACE_EVENT_CLONE> の場合は新"
7623 "しいプロセスの PID である。 Linux 2.6.18 以降では、新しいプロセスの PID は "
7624 "B<PTRACE_EVENT_VFORK_DONE> で入手できる。 (I<addr> は無視される。)"
7627 #: build/C/man2/ptrace.2:502
7629 msgid "B<PTRACE_CONT>"
7630 msgstr "B<PTRACE_CONT>"
7633 #: build/C/man2/ptrace.2:514
7636 #| "Restarts the stopped child process. If I<data> is nonzero and not "
7637 #| "B<SIGSTOP>, it is interpreted as a signal to be delivered to the child; "
7638 #| "otherwise, no signal is delivered. Thus, for example, the parent can "
7639 #| "control whether a signal sent to the child is delivered or not. (I<addr> "
7642 "Restart the stopped tracee process. If I<data> is nonzero, it is "
7643 "interpreted as the number of a signal to be delivered to the tracee; "
7644 "otherwise, no signal is delivered. Thus, for example, the tracer can "
7645 "control whether a signal sent to the tracee is delivered or not. (I<addr> "
7648 "停止した子プロセスの実行を再開させる。 I<data> がゼロでなく、 B<SIGSTOP> でも"
7649 "なければ、 子プロセスに配送されるシグナルと解釈される。 ゼロや B<SIGSTOP> の"
7650 "場合はシグナルは配送されない。 これを使うと、例えば、親プロセスは 子プロセス"
7651 "に送られたシグナルを実際に配送するかどうかを 制御することができる。(I<addr> "
7655 #: build/C/man2/ptrace.2:514
7657 msgid "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>"
7658 msgstr "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>"
7661 #: build/C/man2/ptrace.2:538
7664 #| "Restarts the stopped child as for B<PTRACE_CONT>, but arranges for the "
7665 #| "child to be stopped at the next entry to or exit from a system call, or "
7666 #| "after execution of a single instruction, respectively. (The child will "
7667 #| "also, as usual, be stopped upon receipt of a signal.) From the parent's "
7668 #| "perspective, the child will appear to have been stopped by receipt of a "
7669 #| "B<SIGTRAP>. So, for B<PTRACE_SYSCALL>, for example, the idea is to "
7670 #| "inspect the arguments to the system call at the first stop, then do "
7671 #| "another B<PTRACE_SYSCALL> and inspect the return value of the system call "
7672 #| "at the second stop. The I<data> argument is treated as for "
7673 #| "B<PTRACE_CONT>. (I<addr> is ignored.)"
7675 "Restart the stopped tracee as for B<PTRACE_CONT>, but arrange for the tracee "
7676 "to be stopped at the next entry to or exit from a system call, or after "
7677 "execution of a single instruction, respectively. (The tracee will also, as "
7678 "usual, be stopped upon receipt of a signal.) From the tracer's perspective, "
7679 "the tracee will appear to have been stopped by receipt of a B<SIGTRAP>. So, "
7680 "for B<PTRACE_SYSCALL>, for example, the idea is to inspect the arguments to "
7681 "the system call at the first stop, then do another B<PTRACE_SYSCALL> and "
7682 "inspect the return value of the system call at the second stop. The I<data> "
7683 "argument is treated as for B<PTRACE_CONT>. (I<addr> is ignored.)"
7685 "B<PTRACE_CONT> と同様に停止した子プロセスを再開する。ただし、 "
7686 "B<PTRACE_SYSCALL> の場合は子プロセスが 次にシステムコールに入るかシステムコー"
7687 "ルから抜けるかする時に、 B<PTRACE_SINGLESTEP> の場合は 1 命令 (instruction) "
7688 "実行した後に停止させる (通常どおり、子プロセスはシグナルを受け取った場合にも"
7689 "停止する)。 親プロセスから見ると、子プロセスは B<SIGTRAP> を受信して停止した"
7690 "ように見える。そのため、例えば B<PTRACE_SYSCALL> を使うと、1回目の停止で引き"
7691 "数を調べて B<PTRACE_SYSCALL> を実行し、 2回目の停止でシステムコールの返り値を"
7692 "調べる、 というようなことができる。 引き数 I<data> は B<PTRACE_CONT> の場合と"
7693 "同じ様に解釈される。 (I<addr> は無視される。)"
7696 #: build/C/man2/ptrace.2:538
7698 msgid "B<PTRACE_SYSEMU>, B<PTRACE_SYSEMU_SINGLESTEP> (since Linux 2.6.14)"
7699 msgstr "B<PTRACE_SYSEMU>, B<PTRACE_SYSEMU_SINGLESTEP> (Linux 2.6.14 以降)"
7703 #: build/C/man2/ptrace.2:559
7706 #| "For B<PTRACE_SYSEMU>, continue and stop on entry to the next syscall, "
7707 #| "which will not be executed. For B<PTRACE_SYSEMU_SINGLESTEP>, do the same "
7708 #| "but also singlestep if not a syscall. This call is used by programs like "
7709 #| "User Mode Linux that want to emulate all the child's system calls. The "
7710 #| "I<data> argument is treated as for B<PTRACE_CONT>. (I<addr> is ignored; "
7711 #| "not supported on all architectures.)"
7713 "For B<PTRACE_SYSEMU>, continue and stop on entry to the next system call, "
7714 "which will not be executed. For B<PTRACE_SYSEMU_SINGLESTEP>, do the same "
7715 "but also singlestep if not a system call. This call is used by programs "
7716 "like User Mode Linux that want to emulate all the tracee's system calls. "
7717 "The I<data> argument is treated as for B<PTRACE_CONT>. The I<addr> argument "
7718 "is ignored. These requests are currently supported only on x86."
7720 "B<PTRACE_SYSEMU> は、実行を再開し、次のシステムコールに入る時に停止させる。 "
7721 "システムコールは実行されない。 B<PTRACE_SYSEMU_SINGLESTEP> も同様だが、システ"
7722 "ムコールでない場合には 1 命令 (singlestep) だけ実行した時点でも停止させる。 "
7723 "このコールは User Mode Linux のように子プロセスのシステムコールを全て エミュ"
7724 "レートしようとするプログラムで使用される。 引き数 I<data> は B<PTRACE_CONT> "
7725 "の場合と同じ様に解釈される。 (I<addr> は無視される。 全てのアーキテクチャでサ"
7729 #: build/C/man2/ptrace.2:559
7731 #| msgid "B<PTRACE_GETEVENTMSG> (since Linux 2.5.46)"
7732 msgid "B<PTRACE_LISTEN> (since Linux 3.4)"
7733 msgstr "B<PTRACE_GETEVENTMSG> (Linux 2.5.46 以降)"
7736 #: build/C/man2/ptrace.2:570
7738 "Restart the stopped tracee, but prevent it from executing. The resulting "
7739 "state of the tracee is similar to a process which has been stopped by a "
7740 "B<SIGSTOP> (or other stopping signal). See the \"group-stop\" subsection "
7741 "for additional information. B<PTRACE_LISTEN> only works on tracees attached "
7742 "by B<PTRACE_SEIZE>."
7746 #: build/C/man2/ptrace.2:570
7748 msgid "B<PTRACE_KILL>"
7749 msgstr "B<PTRACE_KILL>"
7752 #: build/C/man2/ptrace.2:579
7755 #| "Sends the child a B<SIGKILL> to terminate it. (I<addr> and I<data> are "
7758 "Send the tracee a B<SIGKILL> to terminate it. (I<addr> and I<data> are "
7761 "子プロセスに B<SIGKILL> を送り終了させる。(I<addr> と I<data> は無視される。)"
7763 #. [Note from Denys Vlasenko:
7764 #. deprecation suggested by Oleg Nesterov. He prefers to deprecate it
7765 #. instead of describing (and needing to support) PTRACE_KILL's quirks.]
7767 #: build/C/man2/ptrace.2:598
7769 "I<This operation is deprecated; do not use it!> Instead, send a B<SIGKILL> "
7770 "directly using B<kill>(2) or B<tgkill>(2). The problem with B<PTRACE_KILL> "
7771 "is that it requires the tracee to be in signal-delivery-stop, otherwise it "
7772 "may not work (i.e., may complete successfully but won't kill the tracee). "
7773 "By contrast, sending a B<SIGKILL> directly has no such limitation."
7777 #: build/C/man2/ptrace.2:598
7779 #| msgid "B<PTRACE_O_TRACEFORK> (since Linux 2.5.46)"
7780 msgid "B<PTRACE_INTERRUPT> (since Linux 3.4)"
7781 msgstr "B<PTRACE_O_TRACEFORK> (Linux 2.5.46 以降)"
7784 #: build/C/man2/ptrace.2:612
7786 "Stop a tracee. If the tracee is running, it will stop with "
7787 "B<PTRACE_EVENT_STOP>. If the tracee is already stopped by a signal, or "
7788 "receives a signal in parallel with B<PTRACE_INTERRUPT>, it may report a "
7789 "group-stop or a signal-delivery-stop instead of B<PTRACE_EVENT_STOP>. "
7790 "B<PTRACE_INTERRUPT> only works on tracees attached by B<PTRACE_SEIZE>."
7794 #: build/C/man2/ptrace.2:612
7796 msgid "B<PTRACE_ATTACH>"
7797 msgstr "B<PTRACE_ATTACH>"
7799 #. No longer true (removed by Denys Vlasenko, 2011, who remarks:
7800 #. "I think it isn't true in non-ancient 2.4 and in 2.6/3.x.
7801 #. Basically, it's not true for any Linux in practical use.
7802 #. ; the behavior of the tracee is as if it had done a
7803 #. .BR PTRACE_TRACEME .
7804 #. The calling process actually becomes the parent of the tracee
7805 #. process for most purposes (e.g., it will receive
7806 #. notification of tracee events and appears in
7808 #. output as the tracee's parent), but a
7810 #. by the tracee will still return the PID of the original parent.
7812 #: build/C/man2/ptrace.2:640
7814 "Attach to the process specified in I<pid>, making it a tracee of the calling "
7815 "process. The tracee is sent a B<SIGSTOP>, but will not necessarily have "
7816 "stopped by the completion of this call; use B<waitpid>(2) to wait for the "
7817 "tracee to stop. See the \"Attaching and detaching\" subsection for "
7818 "additional information. (I<addr> and I<data> are ignored.)"
7822 #: build/C/man2/ptrace.2:640
7824 #| msgid "B<PTRACE_O_TRACEEXEC> (since Linux 2.5.46)"
7825 msgid "B<PTRACE_SEIZE> (since Linux 3.4)"
7826 msgstr "B<PTRACE_O_TRACEEXEC> (Linux 2.5.46 以降)"
7829 #: build/C/man2/ptrace.2:660
7831 "Attach to the process specified in I<pid>, making it a tracee of the calling "
7832 "process. Unlike B<PTRACE_ATTACH>, B<PTRACE_SEIZE> does not stop the "
7833 "process. Only a B<PTRACE_SEIZE>d process can accept B<PTRACE_INTERRUPT> and "
7834 "B<PTRACE_LISTEN> commands. I<addr> must be zero. I<data> contains a bit "
7835 "mask of ptrace options to activate immediately."
7839 #: build/C/man2/ptrace.2:660
7841 msgid "B<PTRACE_DETACH>"
7842 msgstr "B<PTRACE_DETACH>"
7845 #: build/C/man2/ptrace.2:669
7848 #| "Restarts the stopped child as for B<PTRACE_CONT>, but first detaches from "
7849 #| "the process, undoing the reparenting effect of B<PTRACE_ATTACH>, and the "
7850 #| "effects of B<PTRACE_TRACEME>. Although perhaps not intended, under Linux "
7851 #| "a traced child can be detached in this way regardless of which method was "
7852 #| "used to initiate tracing. (I<addr> is ignored.)"
7854 "Restart the stopped tracee as for B<PTRACE_CONT>, but first detach from it. "
7855 "Under Linux, a tracee can be detached in this way regardless of which method "
7856 "was used to initiate tracing. (I<addr> is ignored.)"
7858 "B<PTRACE_CONT> と同様に停止した子プロセスを再開する。ただし まずそのプロセス"
7859 "からの分離 (detach) を行い、 B<PTRACE_ATTACH> での親の切り換えによる効果と "
7860 "B<PTRACE_TRACEME> の効果を取り消す。意図したものではないだろうが、 Linux で"
7861 "は、トレースされている子プロセスはどのような方法でトレースを 開始されたとして"
7862 "も、この方法で分離 (detach) することができる。 (I<addr> は無視される。)"
7865 #: build/C/man2/ptrace.2:669
7867 msgid "Death under ptrace"
7871 #: build/C/man2/ptrace.2:678
7873 "When a (possibly multithreaded) process receives a killing signal (one whose "
7874 "disposition is set to B<SIG_DFL> and whose default action is to kill the "
7875 "process), all threads exit. Tracees report their death to their tracer(s). "
7876 "Notification of this event is delivered via B<waitpid>(2)."
7880 #: build/C/man2/ptrace.2:687
7882 "Note that the killing signal will first cause signal-delivery-stop (on one "
7883 "tracee only), and only after it is injected by the tracer (or after it was "
7884 "dispatched to a thread which isn't traced), will death from the signal "
7885 "happen on I<all> tracees within a multithreaded process. (The term \"signal-"
7886 "delivery-stop\" is explained below.)"
7890 #: build/C/man2/ptrace.2:699
7892 "B<SIGKILL> does not generate signal-delivery-stop and therefore the tracer "
7893 "can't suppress it. B<SIGKILL> kills even within system calls (syscall-exit-"
7894 "stop is not generated prior to death by B<SIGKILL>). The net effect is that "
7895 "B<SIGKILL> always kills the process (all its threads), even if some threads "
7896 "of the process are ptraced."
7900 #: build/C/man2/ptrace.2:704
7902 "When the tracee calls B<_exit>(2), it reports its death to its tracer. "
7903 "Other threads are not affected."
7907 #: build/C/man2/ptrace.2:708
7909 "When any thread executes B<exit_group>(2), every tracee in its thread group "
7910 "reports its death to its tracer."
7914 #: build/C/man2/ptrace.2:722
7916 "If the B<PTRACE_O_TRACEEXIT> option is on, B<PTRACE_EVENT_EXIT> will happen "
7917 "before actual death. This applies to exits via B<exit>(2), B<exit_group>"
7918 "(2), and signal deaths (except B<SIGKILL>), and when threads are torn down "
7919 "on B<execve>(2) in a multithreaded process."
7923 #: build/C/man2/ptrace.2:747
7925 "The tracer cannot assume that the ptrace-stopped tracee exists. There are "
7926 "many scenarios when the tracee may die while stopped (such as B<SIGKILL>). "
7927 "Therefore, the tracer must be prepared to handle an B<ESRCH> error on any "
7928 "ptrace operation. Unfortunately, the same error is returned if the tracee "
7929 "exists but is not ptrace-stopped (for commands which require a stopped "
7930 "tracee), or if it is not traced by the process which issued the ptrace "
7931 "call. The tracer needs to keep track of the stopped/running state of the "
7932 "tracee, and interpret B<ESRCH> as \"tracee died unexpectedly\" only if it "
7933 "knows that the tracee has been observed to enter ptrace-stop. Note that "
7934 "there is no guarantee that I<waitpid(WNOHANG)> will reliably report the "
7935 "tracee's death status if a ptrace operation returned B<ESRCH>. I<waitpid"
7936 "(WNOHANG)> may return 0 instead. In other words, the tracee may be \"not "
7937 "yet fully dead\", but already refusing ptrace requests."
7941 #: build/C/man2/ptrace.2:761
7943 "The tracer can't assume that the tracee I<always> ends its life by reporting "
7944 "I<WIFEXITED(status)> or I<WIFSIGNALED(status)>; there are cases where this "
7945 "does not occur. For example, if a thread other than thread group leader "
7946 "does an B<execve>(2), it disappears; its PID will never be seen again, and "
7947 "any subsequent ptrace stops will be reported under the thread group leader's "
7952 #: build/C/man2/ptrace.2:761
7954 msgid "Stopped states"
7958 #: build/C/man2/ptrace.2:763
7959 msgid "A tracee can be in two states: running or stopped."
7963 #: build/C/man2/ptrace.2:767
7965 "There are many kinds of states when the tracee is stopped, and in ptrace "
7966 "discussions they are often conflated. Therefore, it is important to use "
7971 #: build/C/man2/ptrace.2:778
7973 "In this manual page, any stopped state in which the tracee is ready to "
7974 "accept ptrace commands from the tracer is called I<ptrace-stop>. Ptrace-"
7975 "stops can be further subdivided into I<signal-delivery-stop>, I<group-stop>, "
7976 "I<syscall-stop>, and so on. These stopped states are described in detail "
7981 #: build/C/man2/ptrace.2:783
7983 "When the running tracee enters ptrace-stop, it notifies its tracer using "
7984 "B<waitpid>(2) (or one of the other \"wait\" system calls). Most of this "
7985 "manual page assumes that the tracer waits with:"
7989 #: build/C/man2/ptrace.2:785
7991 msgid " pid = waitpid(pid_or_minus_1, &status, __WALL);\n"
7995 #. Do we require __WALL usage, or will just using 0 be ok? (With 0,
7996 #. I am not 100% sure there aren't ugly corner cases.) Are the
7997 #. rules different if user wants to use waitid? Will waitid require
8000 #: build/C/man2/ptrace.2:797
8002 "Ptrace-stopped tracees are reported as returns with I<pid> greater than 0 "
8003 "and I<WIFSTOPPED(status)> true."
8007 #: build/C/man2/ptrace.2:805
8009 "The B<__WALL> flag does not include the B<WSTOPPED> and B<WEXITED> flags, "
8010 "but implies their functionality."
8014 #: build/C/man2/ptrace.2:812
8016 "Setting the B<WCONTINUED> flag when calling B<waitpid>(2) is not "
8017 "recommended: the \"continued\" state is per-process and consuming it can "
8018 "confuse the real parent of the tracee."
8022 #: build/C/man2/ptrace.2:820
8024 "Use of the B<WNOHANG> flag may cause B<waitpid>(2) to return 0 (\"no wait "
8025 "results available yet\") even if the tracer knows there should be a "
8026 "notification. Example:"
8030 #: build/C/man2/ptrace.2:829
8034 " ptrace(PTRACE_CONT, pid, 0L, 0L);\n"
8035 " if (errno == ESRCH) {\n"
8036 " /* tracee is dead */\n"
8037 " r = waitpid(tracee, &status, __WALL | WNOHANG);\n"
8038 " /* r can still be 0 here! */\n"
8043 #: build/C/man2/ptrace.2:852
8045 "The following kinds of ptrace-stops exist: signal-delivery-stops, group-"
8046 "stops, B<PTRACE_EVENT> stops, syscall-stops. They all are reported by "
8047 "B<waitpid>(2) with I<WIFSTOPPED(status)> true. They may be differentiated "
8048 "by examining the value I<statusE<gt>E<gt>8>, and if there is ambiguity in "
8049 "that value, by querying B<PTRACE_GETSIGINFO>. (Note: the I<WSTOPSIG(status)"
8050 "> macro can't be used to perform this examination, because it returns the "
8051 "value I<(statusE<gt>E<gt>8)\\ &\\ 0xff>.)"
8055 #: build/C/man2/ptrace.2:852
8057 msgid "Signal-delivery-stop"
8061 #: build/C/man2/ptrace.2:872
8063 "When a (possibly multithreaded) process receives any signal except "
8064 "B<SIGKILL>, the kernel selects an arbitrary thread which handles the "
8065 "signal. (If the signal is generated with B<tgkill>(2), the target thread "
8066 "can be explicitly selected by the caller.) If the selected thread is "
8067 "traced, it enters signal-delivery-stop. At this point, the signal is not "
8068 "yet delivered to the process, and can be suppressed by the tracer. If the "
8069 "tracer doesn't suppress the signal, it passes the signal to the tracee in "
8070 "the next ptrace restart request. This second step of signal delivery is "
8071 "called I<signal injection> in this manual page. Note that if the signal is "
8072 "blocked, signal-delivery-stop doesn't happen until the signal is unblocked, "
8073 "with the usual exception that B<SIGSTOP> can't be blocked."
8077 #: build/C/man2/ptrace.2:886
8079 "Signal-delivery-stop is observed by the tracer as B<waitpid>(2) returning "
8080 "with I<WIFSTOPPED(status)> true, with the signal returned by I<WSTOPSIG"
8081 "(status)>. If the signal is B<SIGTRAP>, this may be a different kind of "
8082 "ptrace-stop; see the \"Syscall-stops\" and \"execve\" sections below for "
8083 "details. If I<WSTOPSIG(status)> returns a stopping signal, this may be a "
8084 "group-stop; see below."
8088 #: build/C/man2/ptrace.2:886
8090 msgid "Signal injection and suppression"
8094 #: build/C/man2/ptrace.2:889
8096 "After signal-delivery-stop is observed by the tracer, the tracer should "
8097 "restart the tracee with the call"
8101 #: build/C/man2/ptrace.2:891
8103 msgid " ptrace(PTRACE_restart, pid, 0, sig)\n"
8107 #: build/C/man2/ptrace.2:904
8109 "where B<PTRACE_restart> is one of the restarting ptrace requests. If I<sig> "
8110 "is 0, then a signal is not delivered. Otherwise, the signal I<sig> is "
8111 "delivered. This operation is called I<signal injection> in this manual "
8112 "page, to distinguish it from signal-delivery-stop."
8116 #: build/C/man2/ptrace.2:910
8118 "The I<sig> value may be different from the I<WSTOPSIG(status)> value: the "
8119 "tracer can cause a different signal to be injected."
8123 #: build/C/man2/ptrace.2:926
8125 "Note that a suppressed signal still causes system calls to return "
8126 "prematurely. In this case system calls will be restarted: the tracer will "
8127 "observe the tracee to reexecute the interrupted system call (or "
8128 "B<restart_syscall>(2) system call for a few syscalls which use a different "
8129 "mechanism for restarting) if the tracer uses B<PTRACE_SYSCALL>. Even system "
8130 "calls (such as B<poll>(2)) which are not restartable after signal are "
8131 "restarted after signal is suppressed; however, kernel bugs exist which cause "
8132 "some syscalls to fail with B<EINTR> even though no observable signal is "
8133 "injected to the tracee."
8137 #: build/C/man2/ptrace.2:937
8139 "Restarting ptrace commands issued in ptrace-stops other than signal-delivery-"
8140 "stop are not guaranteed to inject a signal, even if I<sig> is nonzero. No "
8141 "error is reported; a nonzero I<sig> may simply be ignored. Ptrace users "
8142 "should not try to \"create a new signal\" this way: use B<tgkill>(2) "
8147 #: build/C/man2/ptrace.2:944
8149 "The fact that signal injection requests may be ignored when restarting the "
8150 "tracee after ptrace stops that are not signal-delivery-stops is a cause of "
8151 "confusion among ptrace users. One typical scenario is that the tracer "
8152 "observes group-stop, mistakes it for signal-delivery-stop, restarts the "
8157 #: build/C/man2/ptrace.2:946
8159 msgid " ptrace(PTRACE_restart, pid, 0, stopsig)\n"
8163 #: build/C/man2/ptrace.2:952
8165 "with the intention of injecting I<stopsig>, but I<stopsig> gets ignored and "
8166 "the tracee continues to run."
8170 #: build/C/man2/ptrace.2:972
8172 "The B<SIGCONT> signal has a side effect of waking up (all threads of) a "
8173 "group-stopped process. This side effect happens before signal-delivery-"
8174 "stop. The tracer can't suppress this side effect (it can only suppress "
8175 "signal injection, which only causes the B<SIGCONT> handler to not be "
8176 "executed in the tracee, if such a handler is installed). In fact, waking up "
8177 "from group-stop may be followed by signal-delivery-stop for signal(s) "
8178 "I<other than> B<SIGCONT>, if they were pending when B<SIGCONT> was "
8179 "delivered. In other words, B<SIGCONT> may be not the first signal observed "
8180 "by the tracee after it was sent."
8184 #: build/C/man2/ptrace.2:976
8186 "Stopping signals cause (all threads of) a process to enter group-stop. This "
8187 "side effect happens after signal injection, and therefore can be suppressed "
8192 #. In the Linux 2.4 sources, in arch/i386/kernel/signal.c::do_signal(),
8194 #. /* The debugger continued. Ignore SIGSTOP. */
8195 #. if (signr == SIGSTOP)
8198 #: build/C/man2/ptrace.2:986
8199 msgid "In Linux 2.4 and earlier, the B<SIGSTOP> signal can't be injected."
8203 #: build/C/man2/ptrace.2:1003
8205 "B<PTRACE_GETSIGINFO> can be used to retrieve a I<siginfo_t> structure which "
8206 "corresponds to the delivered signal. B<PTRACE_SETSIGINFO> may be used to "
8207 "modify it. If B<PTRACE_SETSIGINFO> has been used to alter I<siginfo_t>, the "
8208 "I<si_signo> field and the I<sig> parameter in the restarting command must "
8209 "match, otherwise the result is undefined."
8213 #: build/C/man2/ptrace.2:1003
8219 #: build/C/man2/ptrace.2:1015
8221 "When a (possibly multithreaded) process receives a stopping signal, all "
8222 "threads stop. If some threads are traced, they enter a group-stop. Note "
8223 "that the stopping signal will first cause signal-delivery-stop (on one "
8224 "tracee only), and only after it is injected by the tracer (or after it was "
8225 "dispatched to a thread which isn't traced), will group-stop be initiated on "
8226 "I<all> tracees within the multithreaded process. As usual, every tracee "
8227 "reports its group-stop separately to the corresponding tracer."
8231 #: build/C/man2/ptrace.2:1024
8233 "Group-stop is observed by the tracer as B<waitpid>(2) returning with "
8234 "I<WIFSTOPPED(status)> true, with the stopping signal available via I<WSTOPSIG"
8235 "(status)>. The same result is returned by some other classes of ptrace-"
8236 "stops, therefore the recommended practice is to perform the call"
8240 #: build/C/man2/ptrace.2:1026
8242 msgid " ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo)\n"
8246 #: build/C/man2/ptrace.2:1047
8248 "The call can be avoided if the signal is not B<SIGSTOP>, B<SIGTSTP>, "
8249 "B<SIGTTIN>, or B<SIGTTOU>; only these four signals are stopping signals. If "
8250 "the tracer sees something else, it can't be a group-stop. Otherwise, the "
8251 "tracer needs to call B<PTRACE_GETSIGINFO>. If B<PTRACE_GETSIGINFO> fails "
8252 "with B<EINVAL>, then it is definitely a group-stop. (Other failure codes "
8253 "are possible, such as B<ESRCH> (\"no such process\") if a B<SIGKILL> killed "
8258 #: build/C/man2/ptrace.2:1056
8260 "As of Linux 2.6.38, after the tracer sees the tracee ptrace-stop and until "
8261 "it restarts or kills it, the tracee will not run, and will not send "
8262 "notifications (except B<SIGKILL> death) to the tracer, even if the tracer "
8263 "enters into another B<waitpid>(2) call."
8267 #: build/C/man2/ptrace.2:1070
8269 "The kernel behavior described in the previous paragraph causes a problem "
8270 "with transparent handling of stopping signals. If the tracer restarts the "
8271 "tracee after group-stop, the stopping signal is effectively ignored\\(emthe "
8272 "tracee doesn't remain stopped, it runs. If the tracer doesn't restart the "
8273 "tracee before entering into the next B<waitpid>(2), future B<SIGCONT> "
8274 "signals will not be reported to the tracer; this would cause the B<SIGCONT> "
8275 "signals to have no effect on the tracee."
8279 #: build/C/man2/ptrace.2:1081
8281 "Since Linux 3.4, there is a method to overcome this problem: instead of "
8282 "B<PTRACE_CONT>, a B<PTRACE_LISTEN> command can be used to restart a tracee "
8283 "in a way where it does not execute, but waits for a new event which it can "
8284 "report via B<waitpid>(2) (such as when it is restarted by a B<SIGCONT>)."
8288 #: build/C/man2/ptrace.2:1081
8290 msgid "PTRACE_EVENT stops"
8294 #: build/C/man2/ptrace.2:1087
8296 "If the tracer sets B<PTRACE_O_TRACE_*> options, the tracee will enter ptrace-"
8297 "stops called B<PTRACE_EVENT> stops."
8301 #: build/C/man2/ptrace.2:1101
8303 "B<PTRACE_EVENT> stops are observed by the tracer as B<waitpid>(2) returning "
8304 "with I<WIFSTOPPED(status)>, and I<WSTOPSIG(status)> returns B<SIGTRAP>. An "
8305 "additional bit is set in the higher byte of the status word: the value "
8306 "I<statusE<gt>E<gt>8> will be"
8310 #: build/C/man2/ptrace.2:1103
8312 msgid " (SIGTRAP | PTRACE_EVENT_foo E<lt>E<lt> 8).\n"
8316 #: build/C/man2/ptrace.2:1105
8317 msgid "The following events exist:"
8321 #: build/C/man2/ptrace.2:1105
8323 msgid "B<PTRACE_EVENT_VFORK>"
8324 msgstr "B<PTRACE_EVENT_VFORK>"
8327 #: build/C/man2/ptrace.2:1118
8329 "Stop before return from B<vfork>(2) or B<clone>(2) with the B<CLONE_VFORK> "
8330 "flag. When the tracee is continued after this stop, it will wait for child "
8331 "to exit/exec before continuing its execution (in other words, the usual "
8332 "behavior on B<vfork>(2))."
8336 #: build/C/man2/ptrace.2:1118
8338 msgid "B<PTRACE_EVENT_FORK>"
8339 msgstr "B<PTRACE_EVENT_FORK>"
8342 #: build/C/man2/ptrace.2:1126
8344 "Stop before return from B<fork>(2) or B<clone>(2) with the exit signal set "
8349 #: build/C/man2/ptrace.2:1126
8351 msgid "B<PTRACE_EVENT_CLONE>"
8352 msgstr "B<PTRACE_EVENT_CLONE>"
8355 #: build/C/man2/ptrace.2:1130
8356 msgid "Stop before return from B<clone>(2)."
8360 #: build/C/man2/ptrace.2:1130
8362 msgid "B<PTRACE_EVENT_VFORK_DONE>"
8363 msgstr "B<PTRACE_EVENT_VFORK_DONE>"
8366 #: build/C/man2/ptrace.2:1140
8368 "Stop before return from B<vfork>(2) or B<clone>(2) with the B<CLONE_VFORK> "
8369 "flag, but after the child unblocked this tracee by exiting or execing."
8373 #: build/C/man2/ptrace.2:1146
8375 "For all four stops described above, the stop occurs in the parent (i.e., the "
8376 "tracee), not in the newly created thread. B<PTRACE_GETEVENTMSG> can be used "
8377 "to retrieve the new thread's ID."
8381 #: build/C/man2/ptrace.2:1146
8383 msgid "B<PTRACE_EVENT_EXEC>"
8384 msgstr "B<PTRACE_EVENT_EXEC>"
8387 #: build/C/man2/ptrace.2:1153
8389 "Stop before return from B<execve>(2). Since Linux 3.0, "
8390 "B<PTRACE_GETEVENTMSG> returns the former thread ID."
8394 #: build/C/man2/ptrace.2:1153
8396 msgid "B<PTRACE_EVENT_EXIT>"
8397 msgstr "B<PTRACE_EVENT_EXIT>"
8400 #: build/C/man2/ptrace.2:1169
8402 "Stop before exit (including death from B<exit_group>(2)), signal death, or "
8403 "exit caused by B<execve>(2) in a multithreaded process. "
8404 "B<PTRACE_GETEVENTMSG> returns the exit status. Registers can be examined "
8405 "(unlike when \"real\" exit happens). The tracee is still alive; it needs to "
8406 "be B<PTRACE_CONT>ed or B<PTRACE_DETACH>ed to finish exiting."
8410 #: build/C/man2/ptrace.2:1169
8412 #| msgid "B<PTRACE_EVENT_FORK>"
8413 msgid "B<PTRACE_EVENT_STOP>"
8414 msgstr "B<PTRACE_EVENT_FORK>"
8417 #: build/C/man2/ptrace.2:1174
8418 msgid "Stop induced by B<PTRACE_INTERRUPT> command."
8422 #: build/C/man2/ptrace.2:1186
8424 "B<PTRACE_GETSIGINFO> on B<PTRACE_EVENT> stops returns B<SIGTRAP> in "
8425 "I<si_signo>, with I<si_code> set to I<(eventE<lt>E<lt>8)\\ |\\ SIGTRAP>."
8429 #: build/C/man2/ptrace.2:1186
8431 msgid "Syscall-stops"
8435 #: build/C/man2/ptrace.2:1199
8437 "If the tracee was restarted by B<PTRACE_SYSCALL>, the tracee enters syscall-"
8438 "enter-stop just prior to entering any system call. If the tracer restarts "
8439 "the tracee with B<PTRACE_SYSCALL>, the tracee enters syscall-exit-stop when "
8440 "the system call is finished, or if it is interrupted by a signal. (That is, "
8441 "signal-delivery-stop never happens between syscall-enter-stop and syscall-"
8442 "exit-stop; it happens I<after> syscall-exit-stop.)"
8446 #: build/C/man2/ptrace.2:1213
8448 "Other possibilities are that the tracee may stop in a B<PTRACE_EVENT> stop, "
8449 "exit (if it entered B<_exit>(2) or B<exit_group>(2)), be killed by "
8450 "B<SIGKILL>, or die silently (if it is a thread group leader, the B<execve>"
8451 "(2) happened in another thread, and that thread is not traced by the same "
8452 "tracer; this situation is discussed later)."
8456 #: build/C/man2/ptrace.2:1228
8458 "Syscall-enter-stop and syscall-exit-stop are observed by the tracer as "
8459 "B<waitpid>(2) returning with I<WIFSTOPPED(status)> true, and I<WSTOPSIG"
8460 "(status)> giving B<SIGTRAP>. If the B<PTRACE_O_TRACESYSGOOD> option was set "
8461 "by the tracer, then I<WSTOPSIG(status)> will give the value I<(SIGTRAP\\ |\\ "
8466 #: build/C/man2/ptrace.2:1234
8468 "Syscall-stops can be distinguished from signal-delivery-stop with B<SIGTRAP> "
8469 "by querying B<PTRACE_GETSIGINFO> for the following cases:"
8473 #: build/C/man2/ptrace.2:1234
8475 msgid "I<si_code> E<lt>= 0"
8479 #: build/C/man2/ptrace.2:1246
8481 "B<SIGTRAP> was delivered as a result of a user-space action, for example, a "
8482 "system call (B<tgkill>(2), B<kill>(2), B<sigqueue>(3), etc.), expiration of "
8483 "a POSIX timer, change of state on a POSIX message queue, or completion of an "
8484 "asynchronous I/O request."
8488 #: build/C/man2/ptrace.2:1246
8490 msgid "I<si_code> == SI_KERNEL (0x80)"
8494 #: build/C/man2/ptrace.2:1250
8495 msgid "B<SIGTRAP> was sent by the kernel."
8499 #: build/C/man2/ptrace.2:1250
8501 msgid "I<si_code> == SIGTRAP or I<si_code> == (SIGTRAP|0x80)"
8505 #: build/C/man2/ptrace.2:1253
8506 msgid "This is a syscall-stop."
8510 #: build/C/man2/ptrace.2:1258
8512 "However, syscall-stops happen very often (twice per system call), and "
8513 "performing B<PTRACE_GETSIGINFO> for every syscall-stop may be somewhat "
8518 #: build/C/man2/ptrace.2:1281
8520 "Some architectures allow the cases to be distinguished by examining "
8521 "registers. For example, on x86, I<rax> == -B<ENOSYS> in syscall-enter-"
8522 "stop. Since B<SIGTRAP> (like any other signal) always happens I<after> "
8523 "syscall-exit-stop, and at this point I<rax> almost never contains -"
8524 "B<ENOSYS>, the B<SIGTRAP> looks like \"syscall-stop which is not syscall-"
8525 "enter-stop\"; in other words, it looks like a \"stray syscall-exit-stop\" "
8526 "and can be detected this way. But such detection is fragile and is best "
8531 #: build/C/man2/ptrace.2:1287
8533 "Using the B<PTRACE_O_TRACESYSGOOD> option is the recommended method to "
8534 "distinguish syscall-stops from other kinds of ptrace-stops, since it is "
8535 "reliable and does not incur a performance penalty."
8539 #: build/C/man2/ptrace.2:1298
8541 "Syscall-enter-stop and syscall-exit-stop are indistinguishable from each "
8542 "other by the tracer. The tracer needs to keep track of the sequence of "
8543 "ptrace-stops in order to not misinterpret syscall-enter-stop as syscall-exit-"
8544 "stop or vice versa. The rule is that syscall-enter-stop is always followed "
8545 "by syscall-exit-stop, B<PTRACE_EVENT> stop or the tracee's death; no other "
8546 "kinds of ptrace-stop can occur in between."
8550 #: build/C/man2/ptrace.2:1303
8552 "If after syscall-enter-stop, the tracer uses a restarting command other than "
8553 "B<PTRACE_SYSCALL>, syscall-exit-stop is not generated."
8557 #: build/C/man2/ptrace.2:1315
8559 "B<PTRACE_GETSIGINFO> on syscall-stops returns B<SIGTRAP> in I<si_signo>, "
8560 "with I<si_code> set to B<SIGTRAP> or I<(SIGTRAP|0x80)>."
8564 #: build/C/man2/ptrace.2:1315
8566 msgid "PTRACE_SINGLESTEP, PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP stops"
8571 #. document stops occurring with PTRACE_SINGLESTEP, PTRACE_SYSEMU,
8572 #. PTRACE_SYSEMU_SINGLESTEP
8574 #: build/C/man2/ptrace.2:1321
8575 msgid "[Details of these kinds of stops are yet to be documented.]"
8579 #: build/C/man2/ptrace.2:1321
8581 msgid "Informational and restarting ptrace commands"
8585 #: build/C/man2/ptrace.2:1331
8587 "Most ptrace commands (all except B<PTRACE_ATTACH>, B<PTRACE_SEIZE>, "
8588 "B<PTRACE_TRACEME>, B<PTRACE_INTERRUPT>, and B<PTRACE_KILL>) require the "
8589 "tracee to be in a ptrace-stop, otherwise they fail with B<ESRCH>."
8593 #: build/C/man2/ptrace.2:1336
8595 "When the tracee is in ptrace-stop, the tracer can read and write data to the "
8596 "tracee using informational commands. These commands leave the tracee in "
8597 "ptrace-stopped state:"
8601 #: build/C/man2/ptrace.2:1348
8604 " ptrace(PTRACE_PEEKTEXT/PEEKDATA/PEEKUSER, pid, addr, 0);\n"
8605 " ptrace(PTRACE_POKETEXT/POKEDATA/POKEUSER, pid, addr, long_val);\n"
8606 " ptrace(PTRACE_GETREGS/GETFPREGS, pid, 0, &struct);\n"
8607 " ptrace(PTRACE_SETREGS/SETFPREGS, pid, 0, &struct);\n"
8608 " ptrace(PTRACE_GETREGSET, pid, NT_foo, &iov);\n"
8609 " ptrace(PTRACE_SETREGSET, pid, NT_foo, &iov);\n"
8610 " ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo);\n"
8611 " ptrace(PTRACE_SETSIGINFO, pid, 0, &siginfo);\n"
8612 " ptrace(PTRACE_GETEVENTMSG, pid, 0, &long_var);\n"
8613 " ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
8617 #: build/C/man2/ptrace.2:1360
8619 "Note that some errors are not reported. For example, setting signal "
8620 "information (I<siginfo>) may have no effect in some ptrace-stops, yet the "
8621 "call may succeed (return 0 and not set I<errno>); querying "
8622 "B<PTRACE_GETEVENTMSG> may succeed and return some random value if current "
8623 "ptrace-stop is not documented as returning a meaningful event message."
8627 #: build/C/man2/ptrace.2:1362
8632 #: build/C/man2/ptrace.2:1364
8634 msgid " ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
8638 #: build/C/man2/ptrace.2:1373
8640 "affects one tracee. The tracee's current flags are replaced. Flags are "
8641 "inherited by new tracees created and \"auto-attached\" via active "
8642 "B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or B<PTRACE_O_TRACECLONE> "
8647 #: build/C/man2/ptrace.2:1376
8649 "Another group of commands makes the ptrace-stopped tracee run. They have "
8654 #: build/C/man2/ptrace.2:1378
8656 msgid " ptrace(cmd, pid, 0, sig);\n"
8660 #: build/C/man2/ptrace.2:1399
8662 "where I<cmd> is B<PTRACE_CONT>, B<PTRACE_LISTEN>, B<PTRACE_DETACH>, "
8663 "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>, B<PTRACE_SYSEMU>, or "
8664 "B<PTRACE_SYSEMU_SINGLESTEP>. If the tracee is in signal-delivery-stop, "
8665 "I<sig> is the signal to be injected (if it is nonzero). Otherwise, I<sig> "
8666 "may be ignored. (When restarting a tracee from a ptrace-stop other than "
8667 "signal-delivery-stop, recommended practice is to always pass 0 in I<sig>.)"
8671 #: build/C/man2/ptrace.2:1399
8673 msgid "Attaching and detaching"
8677 #: build/C/man2/ptrace.2:1401
8678 msgid "A thread can be attached to the tracer using the call"
8682 #: build/C/man2/ptrace.2:1403
8684 msgid " ptrace(PTRACE_ATTACH, pid, 0, 0);\n"
8688 #: build/C/man2/ptrace.2:1405 build/C/man2/ptrace.2:1894
8693 #: build/C/man2/ptrace.2:1407
8695 msgid " ptrace(PTRACE_SEIZE, pid, 0, PTRACE_O_flags);\n"
8699 #. FIXME: Describe how to attach to a thread which is already
8702 #: build/C/man2/ptrace.2:1432
8704 "B<PTRACE_ATTACH> sends B<SIGSTOP> to this thread. If the tracer wants this "
8705 "B<SIGSTOP> to have no effect, it needs to suppress it. Note that if other "
8706 "signals are concurrently sent to this thread during attach, the tracer may "
8707 "see the tracee enter signal-delivery-stop with other signal(s) first! The "
8708 "usual practice is to reinject these signals until B<SIGSTOP> is seen, then "
8709 "suppress B<SIGSTOP> injection. The design bug here is that a ptrace attach "
8710 "and a concurrently delivered B<SIGSTOP> may race and the concurrent "
8711 "B<SIGSTOP> may be lost."
8715 #: build/C/man2/ptrace.2:1439
8717 "Since attaching sends B<SIGSTOP> and the tracer usually suppresses it, this "
8718 "may cause a stray B<EINTR> return from the currently executing system call "
8719 "in the tracee, as described in the \"Signal injection and suppression\" "
8724 #: build/C/man2/ptrace.2:1450
8726 "Since Linux 3.4, B<PTRACE_SEIZE> can be used instead of B<PTRACE_ATTACH>. "
8727 "B<PTRACE_SEIZE> does not stop the attached process. If you need to stop it "
8728 "after attach (or at any other time) without sending it any signals, use "
8729 "B<PTRACE_INTERRUPT> command."
8733 #: build/C/man2/ptrace.2:1452
8738 #: build/C/man2/ptrace.2:1454
8740 msgid " ptrace(PTRACE_TRACEME, 0, 0, 0);\n"
8744 #: build/C/man2/ptrace.2:1460
8746 "turns the calling thread into a tracee. The thread continues to run "
8747 "(doesn't enter ptrace-stop). A common practice is to follow the "
8748 "B<PTRACE_TRACEME> with"
8752 #: build/C/man2/ptrace.2:1462
8754 msgid " raise(SIGSTOP);\n"
8758 #: build/C/man2/ptrace.2:1465
8760 "and allow the parent (which is our tracer now) to observe our signal-"
8765 #: build/C/man2/ptrace.2:1489
8767 "If the B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or "
8768 "B<PTRACE_O_TRACECLONE> options are in effect, then children created by, "
8769 "respectively, B<vfork>(2) or B<clone>(2) with the B<CLONE_VFORK> flag, "
8770 "B<fork>(2) or B<clone>(2) with the exit signal set to B<SIGCHLD>, and "
8771 "other kinds of B<clone>(2), are automatically attached to the same tracer "
8772 "which traced their parent. B<SIGSTOP> is delivered to the children, causing "
8773 "them to enter signal-delivery-stop after they exit the system call which "
8778 #: build/C/man2/ptrace.2:1491
8779 msgid "Detaching of the tracee is performed by:"
8783 #: build/C/man2/ptrace.2:1493
8785 msgid " ptrace(PTRACE_DETACH, pid, 0, sig);\n"
8789 #: build/C/man2/ptrace.2:1501
8791 "B<PTRACE_DETACH> is a restarting operation; therefore it requires the tracee "
8792 "to be in ptrace-stop. If the tracee is in signal-delivery-stop, a signal "
8793 "can be injected. Otherwise, the I<sig> parameter may be silently ignored."
8796 #. FIXME: Describe how to detach from a group-stopped tracee so that it
8797 #. doesn't run, but continues to wait for SIGCONT.
8799 #: build/C/man2/ptrace.2:1525
8801 "If the tracee is running when the tracer wants to detach it, the usual "
8802 "solution is to send B<SIGSTOP> (using B<tgkill>(2), to make sure it goes to "
8803 "the correct thread), wait for the tracee to stop in signal-delivery-stop for "
8804 "B<SIGSTOP> and then detach it (suppressing B<SIGSTOP> injection). A design "
8805 "bug is that this can race with concurrent B<SIGSTOP>s. Another complication "
8806 "is that the tracee may enter other ptrace-stops and needs to be restarted "
8807 "and waited for again, until B<SIGSTOP> is seen. Yet another complication is "
8808 "to be sure that the tracee is not already ptrace-stopped, because no signal "
8809 "delivery happens while it is\\(emnot even B<SIGSTOP>."
8813 #: build/C/man2/ptrace.2:1533
8815 "If the tracer dies, all tracees are automatically detached and restarted, "
8816 "unless they were in group-stop. Handling of restart from group-stop is "
8817 "currently buggy, but the \"as planned\" behavior is to leave tracee stopped "
8818 "and waiting for B<SIGCONT>. If the tracee is restarted from signal-delivery-"
8819 "stop, the pending signal is injected."
8823 #: build/C/man2/ptrace.2:1533
8825 msgid "execve(2) under ptrace"
8829 #. clone(2) CLONE_THREAD says:
8830 #. If any of the threads in a thread group performs an execve(2),
8831 #. then all threads other than the thread group leader are terminated,
8832 #. and the new program is executed in the thread group leader.
8833 #. In kernel 3.1 sources, see fs/exec.c::de_thread()
8835 #: build/C/man2/ptrace.2:1552
8837 "When one thread in a multithreaded process calls B<execve>(2), the kernel "
8838 "destroys all other threads in the process, and resets the thread ID of the "
8839 "execing thread to the thread group ID (process ID). (Or, to put things "
8840 "another way, when a multithreaded process does an B<execve>(2), at "
8841 "completion of the call, it appears as though the B<execve>(2) occurred in "
8842 "the thread group leader, regardless of which thread did the B<execve>(2).) "
8843 "This resetting of the thread ID looks very confusing to tracers:"
8847 #: build/C/man2/ptrace.2:1562
8849 "All other threads stop in B<PTRACE_EVENT_EXIT> stop, if the "
8850 "B<PTRACE_O_TRACEEXIT> option was turned on. Then all other threads except "
8851 "the thread group leader report death as if they exited via B<_exit>(2) with "
8856 #: build/C/man2/ptrace.2:1570
8858 "The execing tracee changes its thread ID while it is in the B<execve>(2). "
8859 "(Remember, under ptrace, the \"pid\" returned from B<waitpid>(2), or fed "
8860 "into ptrace calls, is the tracee's thread ID.) That is, the tracee's thread "
8861 "ID is reset to be the same as its process ID, which is the same as the "
8862 "thread group leader's thread ID."
8866 #: build/C/man2/ptrace.2:1576
8868 "Then a B<PTRACE_EVENT_EXEC> stop happens, if the B<PTRACE_O_TRACEEXEC> "
8869 "option was turned on."
8873 #: build/C/man2/ptrace.2:1597
8875 "If the thread group leader has reported its B<PTRACE_EVENT_EXIT> stop by "
8876 "this time, it appears to the tracer that the dead thread leader \"reappears "
8877 "from nowhere\". (Note: the thread group leader does not report death via "
8878 "I<WIFEXITED(status)> until there is at least one other live thread. This "
8879 "eliminates the possibility that the tracer will see it dying and then "
8880 "reappearing.) If the thread group leader was still alive, for the tracer "
8881 "this may look as if thread group leader returns from a different system call "
8882 "than it entered, or even \"returned from a system call even though it was "
8883 "not in any system call\". If the thread group leader was not traced (or was "
8884 "traced by a different tracer), then during B<execve>(2) it will appear as "
8885 "if it has become a tracee of the tracer of the execing tracee."
8889 #: build/C/man2/ptrace.2:1600
8891 "All of the above effects are the artifacts of the thread ID change in the "
8896 #: build/C/man2/ptrace.2:1620
8898 "The B<PTRACE_O_TRACEEXEC> option is the recommended tool for dealing with "
8899 "this situation. First, it enables B<PTRACE_EVENT_EXEC> stop, which occurs "
8900 "before B<execve>(2) returns. In this stop, the tracer can use "
8901 "B<PTRACE_GETEVENTMSG> to retrieve the tracee's former thread ID. (This "
8902 "feature was introduced in Linux 3.0). Second, the B<PTRACE_O_TRACEEXEC> "
8903 "option disables legacy B<SIGTRAP> generation on B<execve>(2)."
8907 #: build/C/man2/ptrace.2:1626
8909 "When the tracer receives B<PTRACE_EVENT_EXEC> stop notification, it is "
8910 "guaranteed that except this tracee and the thread group leader, no other "
8911 "threads from the process are alive."
8915 #: build/C/man2/ptrace.2:1634
8917 "On receiving the B<PTRACE_EVENT_EXEC> stop notification, the tracer should "
8918 "clean up all its internal data structures describing the threads of this "
8919 "process, and retain only one data structure\\(emone which describes the "
8920 "single still running tracee, with"
8924 #: build/C/man2/ptrace.2:1636
8926 msgid " thread ID == thread group ID == process ID.\n"
8930 #: build/C/man2/ptrace.2:1640
8931 msgid "Example: two threads call B<execve>(2) at the same time:"
8935 #: build/C/man2/ptrace.2:1651
8938 "*** we get syscall-enter-stop in thread 1: **\n"
8939 "PID1 execve(\"/bin/foo\", \"foo\" E<lt>unfinished ...E<gt>\n"
8940 "*** we issue PTRACE_SYSCALL for thread 1 **\n"
8941 "*** we get syscall-enter-stop in thread 2: **\n"
8942 "PID2 execve(\"/bin/bar\", \"bar\" E<lt>unfinished ...E<gt>\n"
8943 "*** we issue PTRACE_SYSCALL for thread 2 **\n"
8944 "*** we get PTRACE_EVENT_EXEC for PID0, we issue PTRACE_SYSCALL **\n"
8945 "*** we get syscall-exit-stop for PID0: **\n"
8946 "PID0 E<lt>... execve resumedE<gt> ) = 0\n"
8950 #: build/C/man2/ptrace.2:1674
8952 "If the B<PTRACE_O_TRACEEXEC> option is I<not> in effect for the execing "
8953 "tracee, the kernel delivers an extra B<SIGTRAP> to the tracee after B<execve>"
8954 "(2) returns. This is an ordinary signal (similar to one which can be "
8955 "generated by I<kill -TRAP>), not a special kind of ptrace-stop. Employing "
8956 "B<PTRACE_GETSIGINFO> for this signal returns I<si_code> set to 0 "
8957 "(I<SI_USER>). This signal may be blocked by signal mask, and thus may be "
8958 "delivered (much) later."
8962 #: build/C/man2/ptrace.2:1693
8964 "Usually, the tracer (for example, B<strace>(1)) would not want to show this "
8965 "extra post-execve B<SIGTRAP> signal to the user, and would suppress its "
8966 "delivery to the tracee (if B<SIGTRAP> is set to B<SIG_DFL>, it is a killing "
8967 "signal). However, determining I<which> B<SIGTRAP> to suppress is not easy. "
8968 "Setting the B<PTRACE_O_TRACEEXEC> option and thus suppressing this extra "
8969 "B<SIGTRAP> is the recommended approach."
8973 #: build/C/man2/ptrace.2:1693
8979 #: build/C/man2/ptrace.2:1700
8981 "The ptrace API (ab)uses the standard UNIX parent/child signaling over "
8982 "B<waitpid>(2). This used to cause the real parent of the process to stop "
8983 "receiving several kinds of B<waitpid>(2) notifications when the child "
8984 "process is traced by some other process."
8988 #: build/C/man2/ptrace.2:1703
8990 "Many of these bugs have been fixed, but as of Linux 2.6.38 several still "
8991 "exist; see BUGS below."
8995 #: build/C/man2/ptrace.2:1705
8996 msgid "As of Linux 2.6.38, the following is believed to work correctly:"
9000 #: build/C/man2/ptrace.2:1713
9002 "exit/death by signal is reported first to the tracer, then, when the tracer "
9003 "consumes the B<waitpid>(2) result, to the real parent (to the real parent "
9004 "only when the whole multithreaded process exits). If the tracer and the "
9005 "real parent are the same process, the report is sent only once."
9009 #: build/C/man2/ptrace.2:1727
9012 #| "On success, B<PTRACE_PEEK*> requests return the requested data, while "
9013 #| "other requests return zero. On error, all requests return -1, and "
9014 #| "I<errno> is set appropriately. Since the value returned by a successful "
9015 #| "B<PTRACE_PEEK*> request may be -1, the caller must check I<errno> after "
9016 #| "such requests to determine whether or not an error occurred."
9018 "On success, B<PTRACE_PEEK*> requests return the requested data, while other "
9019 "requests return zero. On error, all requests return -1, and I<errno> is set "
9020 "appropriately. Since the value returned by a successful B<PTRACE_PEEK*> "
9021 "request may be -1, the caller must clear I<errno> before the call, and then "
9022 "check it afterward to determine whether or not an error occurred."
9024 "成功すると、 B<PTRACE_PEEK*> の場合は要求したデータを返し、 それ以外の場合は "
9025 "0 を返す。 エラーの場合は -1 を返し、 I<errno> が適切に設定される。 "
9026 "B<PTRACE_PEEK*> が成功して返す値も -1 になることがあるため、 そのような要求"
9027 "の場合には、呼び出し元は I<errno> を調べ、エラーか発生したのかどうかを判断し"
9031 #: build/C/man2/ptrace.2:1731
9033 "(i386 only) There was an error with allocating or freeing a debug register."
9034 msgstr "(i386 のみ) デバッグレジスタの確保または解放でエラーが発生した。"
9037 #: build/C/man2/ptrace.2:1742
9040 #| "There was an attempt to read from or write to an invalid area in the "
9041 #| "parent's or child's memory, probably because the area wasn't mapped or "
9042 #| "accessible. Unfortunately, under Linux, different variations of this "
9043 #| "fault will return B<EIO> or B<EFAULT> more or less arbitrarily."
9045 "There was an attempt to read from or write to an invalid area in the "
9046 "tracer's or the tracee's memory, probably because the area wasn't mapped or "
9047 "accessible. Unfortunately, under Linux, different variations of this fault "
9048 "will return B<EIO> or B<EFAULT> more or less arbitrarily."
9050 "親プロセスまたは子プロセスのメモリの不正な領域に読み書きしようとした。 おそら"
9051 "くその領域がマッピングされていないか、 その領域へのアクセスが許されていないか"
9052 "である。 不運なことに、Linux ではこのようなエラーの場合、多かれ少なかれ 恣意"
9053 "的に B<EIO> を返したり B<EFAULT> を返したりすることがある。"
9056 #: build/C/man2/ptrace.2:1745
9057 msgid "An attempt was made to set an invalid option."
9058 msgstr "不正なオプションを設定しようとした。"
9061 #: build/C/man2/ptrace.2:1752
9064 #| "I<request> is invalid, or an attempt was made to read from or write to an "
9065 #| "invalid area in the parent's or child's memory, or there was a word-"
9066 #| "alignment violation, or an invalid signal was specified during a restart "
9069 "I<request> is invalid, or an attempt was made to read from or write to an "
9070 "invalid area in the tracer's or the tracee's memory, or there was a word-"
9071 "alignment violation, or an invalid signal was specified during a restart "
9074 "I<request> が不正である。 または、親プロセスまたは子プロセスのメモリの 不正な"
9075 "領域に読み書きしようとした。 または、ワード境界違反があった。 または、実行再"
9076 "開の要求で不正なシグナルを指定した。"
9079 #: build/C/man2/ptrace.2:1765
9082 #| "The specified process cannot be traced. This could be because the parent "
9083 #| "has insufficient privileges (the required capability is "
9084 #| "B<CAP_SYS_PTRACE>); unprivileged processes cannot trace processes that "
9085 #| "they cannot send signals to or those running set-user-ID/set-group-ID "
9086 #| "programs, for obvious reasons. Alternatively, the process may already be "
9087 #| "being traced, or be B<init>(8) (PID 1)."
9089 "The specified process cannot be traced. This could be because the tracer "
9090 "has insufficient privileges (the required capability is B<CAP_SYS_PTRACE>); "
9091 "unprivileged processes cannot trace processes that they cannot send signals "
9092 "to or those running set-user-ID/set-group-ID programs, for obvious reasons. "
9093 "Alternatively, the process may already be being traced, or (on kernels "
9094 "before 2.6.26) be B<init>(8) (PID 1)."
9096 "指定したプロセスをトレースすることができない。これは親プロセスが 必要な権限 "
9097 "(必要なケーパビリティは B<CAP_SYS_PTRACE>) を持っていないことが原因の場合が"
9098 "ある。 分かりやすい理由を挙げるなら、 非特権プロセスはシグナルを送ることがで"
9099 "きないプロセスをトレースできないし、 set-user-ID/set-group-ID プログラムを実"
9100 "行しているプロセスはトレースできない。 または、プロセスはすでにトレース中であ"
9101 "る、 または B<init>(8) プロセス (PID が 1) である。"
9104 #: build/C/man2/ptrace.2:1770
9107 #| "The specified process does not exist, or is not currently being traced by "
9108 #| "the caller, or is not stopped (for requests that require that)."
9110 "The specified process does not exist, or is not currently being traced by "
9111 "the caller, or is not stopped (for requests that require a stopped tracee)."
9113 "指定したプロセスが存在しない。 または、指定したプロセスは呼び出したプロセス"
9114 "が 現在トレース中の子プロセスではない。 または、指定したプロセスが停止してい"
9115 "ない (停止していることが必要な要求の場合)。"
9118 #: build/C/man2/ptrace.2:1772
9119 msgid "SVr4, 4.3BSD."
9120 msgstr "SVr4, 4.3BSD."
9123 #: build/C/man2/ptrace.2:1787
9126 #| "Although arguments to B<ptrace>() are interpreted according to the "
9127 #| "prototype given, glibc currently declares B<ptrace>() as a variadic "
9128 #| "function with only the I<request> argument fixed. This means that "
9129 #| "unneeded trailing arguments may be omitted, though doing so makes use of "
9130 #| "undocumented B<gcc>(1) behavior."
9132 "Although arguments to B<ptrace>() are interpreted according to the "
9133 "prototype given, glibc currently declares B<ptrace>() as a variadic "
9134 "function with only the I<request> argument fixed. It is recommended to "
9135 "always supply four arguments, even if the requested operation does not use "
9136 "them, setting unused/ignored arguments to I<0L> or I<(void\\ *)\\ 0>."
9138 "B<ptrace>() の引き数は上のようなプロトタイプに基づいて解釈されるが、 glibc "
9139 "では、現在のところ B<ptrace>() は I<request> 引き数だけが固定の可変長引き数"
9140 "関数として 宣言されている。 これは必要なければ残りの引き数は省略可能であるこ"
9141 "とを意味するが、 それは B<gcc>(1) の明文化されていない動作を利用していること"
9144 #. See commit 00cd5c37afd5f431ac186dd131705048c0a11fdb
9146 #: build/C/man2/ptrace.2:1792
9148 #| msgid "B<init>(8), the process with PID 1, may not be traced."
9150 "In Linux kernels before 2.6.26, B<init>(8), the process with PID 1, may not "
9152 msgstr "B<init>(8) すなわち PID が 1 のプロセスはトレースすることができない。"
9154 #. See http://lkml.org/lkml/2008/5/8/375
9156 #: build/C/man2/ptrace.2:1799
9159 #| "The layout of the contents of memory and the USER area are quite OS- and "
9160 #| "architecture-specific. The offset supplied, and the data returned, might "
9161 #| "not entirely match with the definition of I<struct user>."
9163 "The layout of the contents of memory and the USER area are quite operating-"
9164 "system- and architecture-specific. The offset supplied, and the data "
9165 "returned, might not entirely match with the definition of I<struct user>."
9167 "メモリや USER 領域の内容や配置は OS ごと、アーキテクチャごとに 非常に依存す"
9168 "る。 オフセットが指定された場合、返されるデータは I<struct user> の定義と完全"
9172 #: build/C/man2/ptrace.2:1802
9175 #| "The size of a \"word\" is determined by the OS variant (e.g., for 32-bit "
9176 #| "Linux it is 32 bits, etc.)."
9178 "The size of a \"word\" is determined by the operating-system variant (e.g., "
9179 "for 32-bit Linux it is 32 bits)."
9181 "「ワード (word) 」の大きさは OS によって決まる。 (例えば、32 ビットの Linux "
9185 #: build/C/man2/ptrace.2:1810
9188 #| "This page documents the way the B<ptrace>() call works currently in "
9189 #| "Linux. Its behavior differs noticeably on other flavors of UNIX. In any "
9190 #| "case, use of B<ptrace>() is highly OS- and architecture-specific."
9192 "This page documents the way the B<ptrace>() call works currently in Linux. "
9193 "Its behavior differs noticeably on other flavors of UNIX. In any case, use "
9194 "of B<ptrace>() is highly specific to the operating system and architecture."
9196 "このマニュアルは現在の Linux における B<ptrace>() コールの動作について記述し"
9197 "ている。他の UNIX では その動作は著しく異なる。 いかなる場合も B<ptrace>() "
9198 "を使うと OS やアーキテクチャに非常に依存したものになる。"
9201 #: build/C/man2/ptrace.2:1821
9204 #| "On hosts with 2.6 kernel headers, B<PTRACE_SETOPTIONS> is declared with a "
9205 #| "different value than the one for 2.4. This leads to applications "
9206 #| "compiled with such headers failing when run on 2.4 kernels. This can be "
9207 #| "worked around by redefining B<PTRACE_SETOPTIONS> to "
9208 #| "B<PTRACE_OLDSETOPTIONS>, if that is defined."
9210 "On hosts with 2.6 kernel headers, B<PTRACE_SETOPTIONS> is declared with a "
9211 "different value than the one for 2.4. This leads to applications compiled "
9212 "with 2.6 kernel headers failing when run on 2.4 kernels. This can be worked "
9213 "around by redefining B<PTRACE_SETOPTIONS> to B<PTRACE_OLDSETOPTIONS>, if "
9216 "カーネル 2.6 のヘッダがインストールされたホストでは、 B<PTRACE_SETOPTIONS> は"
9217 "カーネル 2.4 のヘッダとは異なる値で宣言される。 このため、カーネル 2.6 のヘッ"
9218 "ダでコンパイルされたアプリケーションは カーネル 2.4 では正しく動作しない。 こ"
9219 "の問題は、 B<PTRACE_SETOPTIONS> が定義されていた際は、 B<PTRACE_SETOPTIONS> "
9220 "を B<PTRACE_OLDSETOPTIONS> に定義し直すことで対処できる。"
9223 #: build/C/man2/ptrace.2:1824
9225 "Group-stop notifications are sent to the tracer, but not to real parent. "
9226 "Last confirmed on 2.6.38.6."
9229 #. Note from Denys Vlasenko:
9230 #. Here "exits" means any kind of death - _exit, exit_group,
9231 #. signal death. Signal death and exit_group cases are trivial,
9232 #. though: since signal death and exit_group kill all other threads
9233 #. too, "until all other threads exit" thing happens rather soon
9234 #. in these cases. Therefore, only _exit presents observably
9235 #. puzzling behavior to ptrace users: thread leader _exit's,
9236 #. but WIFEXITED isn't reported! We are trying to explain here
9238 #. FIXME: ^^^ need to test/verify this scenario
9240 #: build/C/man2/ptrace.2:1855
9242 "If a thread group leader is traced and exits by calling B<_exit>(2), a "
9243 "B<PTRACE_EVENT_EXIT> stop will happen for it (if requested), but the "
9244 "subsequent B<WIFEXITED> notification will not be delivered until all other "
9245 "threads exit. As explained above, if one of other threads calls B<execve>"
9246 "(2), the death of the thread group leader will I<never> be reported. If the "
9247 "execed thread is not traced by this tracer, the tracer will never know that "
9248 "B<execve>(2) happened. One possible workaround is to B<PTRACE_DETACH> the "
9249 "thread group leader instead of restarting it in this case. Last confirmed "
9254 #: build/C/man2/ptrace.2:1865
9256 "A B<SIGKILL> signal may still cause a B<PTRACE_EVENT_EXIT> stop before "
9257 "actual signal death. This may be changed in the future; B<SIGKILL> is meant "
9258 "to always immediately kill tasks even under ptrace. Last confirmed on "
9263 #: build/C/man2/ptrace.2:1883
9265 "Some system calls return with B<EINTR> if a signal was sent to a tracee, but "
9266 "delivery was suppressed by the tracer. (This is very typical operation: it "
9267 "is usually done by debuggers on every attach, in order to not introduce a "
9268 "bogus B<SIGSTOP>). As of Linux 3.2.9, the following system calls are "
9269 "affected (this list is likely incomplete): B<epoll_wait>(2), and B<read>(2) "
9270 "from an B<inotify>(7) file descriptor. The usual symptom of this bug is "
9271 "that when you attach to a quiescent process with the command"
9275 #: build/C/man2/ptrace.2:1885
9277 msgid " strace -p E<lt>process-IDE<gt>\n"
9281 #: build/C/man2/ptrace.2:1888
9282 msgid "then, instead of the usual and expected one-line output such as"
9286 #: build/C/man2/ptrace.2:1891
9288 msgid " restart_syscall(E<lt>... resuming interrupted call ...E<gt>_\n"
9292 #: build/C/man2/ptrace.2:1897
9294 msgid " select(6, [5], NULL, [5], NULL_\n"
9298 #: build/C/man2/ptrace.2:1901
9300 "('_' denotes the cursor position), you observe more than one line. For "
9305 #: build/C/man2/ptrace.2:1905
9308 " clock_gettime(CLOCK_MONOTONIC, {15370, 690928118}) = 0\n"
9313 #: build/C/man2/ptrace.2:1926
9315 "What is not visible here is that the process was blocked in B<epoll_wait>"
9316 "(2) before B<strace>(1) has attached to it. Attaching caused B<epoll_wait>"
9317 "(2) to return to user space with the error B<EINTR>. In this particular "
9318 "case, the program reacted to B<EINTR> by checking the current time, and then "
9319 "executing B<epoll_wait>(2) again. (Programs which do not expect such "
9320 "\"stray\" B<EINTR> errors may behave in an unintended way upon an B<strace>"
9325 #: build/C/man2/ptrace.2:1940
9327 "B<gdb>(1), B<strace>(1), B<clone>(2), B<execve>(2), B<fork>(2), B<gettid>"
9328 "(2), B<sigaction>(2), B<tgkill>(2), B<vfork>(2), B<waitpid>(2), B<exec>(3), "
9329 "B<capabilities>(7), B<signal>(7)"
9331 "B<gdb>(1), B<strace>(1), B<clone>(2), B<execve>(2), B<fork>(2),\n"
9332 "B<gettid>(2), B<sigaction>(2), B<tgkill>(2), B<vfork>(2),\n"
9333 "B<waitpid>(2), B<exec>(3), B<capabilities>(7), B<signal>(7)"
9336 #: build/C/man2/quotactl.2:27
9342 #: build/C/man2/quotactl.2:27
9348 #: build/C/man2/quotactl.2:30
9349 msgid "quotactl - manipulate disk quotas"
9350 msgstr "quotactl - ディスク quota を操作する"
9353 #: build/C/man2/quotactl.2:34
9356 "B<#include E<lt>sys/quota.hE<gt>>\n"
9357 "B<#include E<lt>xfs/xqm.hE<gt>>\n"
9359 "B<#include E<lt>sys/quota.hE<gt>>\n"
9360 "B<#include E<lt>xfs/xqm.hE<gt>>\n"
9363 #: build/C/man2/quotactl.2:37
9365 msgid "B<int quotactl(int >I<cmd>B<, const char *>I<special>B<, int >I<id>B<, caddr_t >I<addr>B<);>\n"
9366 msgstr "B<int quotactl(int >I<cmd>B<, const char *>I<special>B<, int >I<id>B<, caddr_t >I<addr>B<);>\n"
9369 #: build/C/man2/quotactl.2:49
9372 #| "The quota system defines for each user and/or group a soft limit and a "
9373 #| "hard limit bounding the amount of disk space that can be used on a given "
9374 #| "file system. The hard limit cannot be crossed. The soft limit can be "
9375 #| "crossed, but warnings will ensue. Moreover, the user cannot be above the "
9376 #| "soft limit for more than one week (by default) at a time: after this "
9377 #| "week the soft limit counts as hard limit."
9379 "The quota system can be used to set per-user and per-group limits on the "
9380 "amount of disk space used on a file system. For each user and/or group, a "
9381 "soft limit and a hard limit can be set for each file system. The hard limit "
9382 "can't be exceeded. The soft limit can be exceeded, but warnings will "
9383 "ensue. Moreover, the user can't exceed the soft limit for more than one "
9384 "week (by default) at a time; after this time, the soft limit counts as a "
9387 "quota システムは、各々のユーザ及び/またはグループに対して、 ソフト・リミット"
9388 "及びハード・リミットを定める。これはあるファイル・システムで 使用する事が出来"
9389 "るディスク容量を制限する。 ハード・リミットは超過することは出来ない。 ソフ"
9390 "ト・リミットは超過する事が出来るが、警告が発せられる。 更に、(デフォルトで"
9391 "は) 一週間以上ソフト・リミットを超過したままに しておく事はできない: 一週間経"
9392 "過した後はハード・リミットを超過したと みなされる。"
9395 #: build/C/man2/quotactl.2:74
9398 #| "The B<quotactl>() system call manipulates these quota. Its first "
9399 #| "argument is of the form B<QCMD(>I<subcmd>B<,>I<type>B<)> where I<type> is "
9400 #| "either B<USRQUOTA> or B<GRPQUOTA> (for user quota and group quota, "
9401 #| "respectively), and I<subcmd> is described below."
9403 "The B<quotactl>() call manipulates disk quotas. The I<cmd> argument "
9404 "indicates a command to be applied to the user or group ID specified in "
9405 "I<id>. To initialize the I<cmd> argument, use the I<QCMD(subcmd, type)> "
9406 "macro. The I<type> value is either B<USRQUOTA>, for user quotas, or "
9407 "B<GRPQUOTA>, for group quotas. The I<subcmd> value is described below."
9409 "B<quotactl>() システムコールはこれらの quota に対する操作を行なう。 最初の引"
9410 "き数は B<QCMD(>I<subcmd>B<,>I<type>B<)> という形式である。 I<type> には、ユー"
9411 "ザー quota については B<USRQUOTA> を、グループ quota については B<GRPQUOTA> "
9412 "を指定する。 I<subcmd> は以下で説明する。"
9415 #: build/C/man2/quotactl.2:79
9417 "The I<special> argument is a pointer to a null-terminated string containing "
9418 "the pathname of the (mounted) block special device for the file system being "
9423 #: build/C/man2/quotactl.2:87
9425 "The I<addr> argument is the address of an optional, command-specific, data "
9426 "structure that is copied in or out of the system. The interpretation of "
9427 "I<addr> is given with each command below."
9431 #: build/C/man2/quotactl.2:91
9432 msgid "The I<subcmd> value is one of the following:"
9433 msgstr "I<subcmd> の値は以下のいずれかである"
9436 #: build/C/man2/quotactl.2:91
9438 msgid "B<Q_QUOTAON>"
9439 msgstr "B<Q_QUOTAON>"
9442 #: build/C/man2/quotactl.2:98
9444 "Turn on quotas for a file system. The I<id> argument is the identification "
9445 "number of the quota format to be used. Currently, there are three supported "
9450 #: build/C/man2/quotactl.2:99
9452 msgid "B<QFMT_VFS_OLD>"
9456 #: build/C/man2/quotactl.2:102
9457 msgid "The original quota format."
9461 #: build/C/man2/quotactl.2:102
9463 msgid "B<QFMT_VFS_V0>"
9467 #: build/C/man2/quotactl.2:106
9469 "The standard VFS v0 quota format, which can handle 32-bit UIDs and GIDs and "
9470 "quota limits up to 2^42 bytes and 2^32 inodes."
9474 #: build/C/man2/quotactl.2:106
9476 msgid "B<QFMT_VFS_V1>"
9480 #: build/C/man2/quotactl.2:110
9482 "A quota format that can handle 32-bit UIDs and GIDs and quota limits of 2^64 "
9483 "bytes and 2^64 inodes."
9487 #: build/C/man2/quotactl.2:121
9489 "The I<addr> argument points to the pathname of a file containing the quotas "
9490 "for the file system. The quota file must exist; it is normally created with "
9491 "the B<quotacheck>(8) program. This operation requires privilege "
9492 "(B<CAP_SYS_ADMIN>)."
9496 #: build/C/man2/quotactl.2:121
9498 msgid "B<Q_QUOTAOFF>"
9499 msgstr "B<Q_QUOTAOFF>"
9502 #: build/C/man2/quotactl.2:131
9504 "Turn off quotas for a file system. The I<addr> and I<id> arguments are "
9505 "ignored. This operation requires privilege (B<CAP_SYS_ADMIN>)."
9509 #: build/C/man2/quotactl.2:131
9511 msgid "B<Q_GETQUOTA>"
9512 msgstr "B<Q_GETQUOTA>"
9515 #: build/C/man2/quotactl.2:142
9518 #| "Get limits and current usage of disk space. The I<addr> argument is a "
9519 #| "pointer to a dqblk structure (defined in I<E<lt>sys/quota.hE<gt>>)."
9521 "Get disk quota limits and current usage for user or group I<id>. The "
9522 "I<addr> argument is a pointer to a I<dqblk> structure defined in I<E<lt>sys/"
9523 "quota.hE<gt>> as follows:"
9525 "ディスク使用量の制限値と現在の使用量を得る。 I<addr> 引き数は (I<E<lt>sys/"
9526 "quota.hE<gt>> で定義された) dqblk 構造体を指すポインタである。"
9529 #: build/C/man2/quotactl.2:147 build/C/man2/quotactl.2:234
9532 "/* uint64_t is an unsigned 64-bit integer;\n"
9533 " uint32_t is an unsigned 32-bit integer */\n"
9537 #: build/C/man2/quotactl.2:167
9540 "struct dqblk { /* Definition since Linux 2.4.22 */\n"
9541 " uint64_t dqb_bhardlimit; /* absolute limit on disk\n"
9542 " quota blocks alloc */\n"
9543 " uint64_t dqb_bsoftlimit; /* preferred limit on\n"
9544 " disk quota blocks */\n"
9545 " uint64_t dqb_curspace; /* current quota block\n"
9547 " uint64_t dqb_ihardlimit; /* maximum number of\n"
9548 " allocated inodes */\n"
9549 " uint64_t dqb_isoftlimit; /* preferred inode limit */\n"
9550 " uint64_t dqb_curinodes; /* current number of\n"
9551 " allocated inodes */\n"
9552 " uint64_t dqb_btime; /* time limit for excessive\n"
9554 " uint64_t dqb_itime; /* time limit for excessive\n"
9556 " uint32_t dqb_valid; /* bit mask of QIF_*\n"
9562 #: build/C/man2/quotactl.2:170
9565 "/* Flags in dqb_valid that indicate which fields in\n"
9566 " dqblk structure are valid. */\n"
9570 #: build/C/man2/quotactl.2:181
9573 "#define QIF_BLIMITS 1\n"
9574 "#define QIF_SPACE 2\n"
9575 "#define QIF_ILIMITS 4\n"
9576 "#define QIF_INODES 8\n"
9577 "#define QIF_BTIME 16\n"
9578 "#define QIF_ITIME 32\n"
9579 "#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS)\n"
9580 "#define QIF_USAGE (QIF_SPACE | QIF_INODES)\n"
9581 "#define QIF_TIMES (QIF_BTIME | QIF_ITIME)\n"
9582 "#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES)\n"
9586 #: build/C/man2/quotactl.2:198
9588 "The I<dqb_valid> field is a bit mask that is set to indicate the entries in "
9589 "the I<dqblk> structure that are valid. Currently, the kernel fills in all "
9590 "entries of the I<dqblk> structure and marks them as valid in the "
9591 "I<dqb_valid> field. Unprivileged users may retrieve only their own quotas; "
9592 "a privileged user (B<CAP_SYS_ADMIN>) can retrieve the quotas of any user."
9596 #: build/C/man2/quotactl.2:198
9598 msgid "B<Q_SETQUOTA>"
9599 msgstr "B<Q_SETQUOTA>"
9602 #: build/C/man2/quotactl.2:218
9604 "Set quota information for user or group I<id>, using the information "
9605 "supplied in the I<dqblk> structure pointed to by I<addr>. The I<dqb_valid> "
9606 "field of the I<dqblk> structure indicates which entries in the structure "
9607 "have been set by the caller. This operation supersedes the B<Q_SETQLIM> and "
9608 "B<Q_SETUSE> operations in the previous quota interfaces. This operation "
9609 "requires privilege (B<CAP_SYS_ADMIN>)."
9613 #: build/C/man2/quotactl.2:218
9615 msgid "B<Q_GETINFO>"
9616 msgstr "B<Q_GETINFO>"
9619 #: build/C/man2/quotactl.2:229
9622 #| "Get limits and current usage of disk space. The I<addr> argument is a "
9623 #| "pointer to a dqblk structure (defined in I<E<lt>sys/quota.hE<gt>>)."
9625 "Get information (like grace times) about quotafile. The I<addr> argument "
9626 "should be a pointer to a I<dqinfo> structure. This structure is defined in "
9627 "I<E<lt>sys/quota.hE<gt>> as follows:"
9629 "ディスク使用量の制限値と現在の使用量を得る。 I<addr> 引き数は (I<E<lt>sys/"
9630 "quota.hE<gt>> で定義された) dqblk 構造体を指すポインタである。"
9633 #: build/C/man2/quotactl.2:238
9636 "struct dqinfo { /* Defined since kernel 2.4.22 */\n"
9637 " uint64_t dqi_bgrace; /* Time before block soft limit\n"
9638 " becomes hard limit */\n"
9642 #: build/C/man2/quotactl.2:245
9645 " uint64_t dqi_igrace; /* Time before inode soft limit\n"
9646 " becomes hard limit */\n"
9647 " uint32_t dqi_flags; /* Flags for quotafile\n"
9649 " uint32_t dqi_valid;\n"
9654 #: build/C/man2/quotactl.2:247
9656 msgid "/* Bits for dqi_flags */\n"
9660 #: build/C/man2/quotactl.2:249
9662 msgid "/* Quota format QFMT_VFS_OLD */\n"
9666 #: build/C/man2/quotactl.2:251
9668 msgid "#define V1_DQF_RSQUASH\t1 /* Root squash enabled */\n"
9672 #: build/C/man2/quotactl.2:253
9674 msgid "/* Other quota formats have no dqi_flags bits defined */\n"
9678 #: build/C/man2/quotactl.2:256
9681 "/* Flags in dqi_valid that indicate which fields in\n"
9682 " dqinfo structure are valid. */\n"
9686 #: build/C/man2/quotactl.2:261
9689 "# define IIF_BGRACE\t1\n"
9690 "# define IIF_IGRACE\t2\n"
9691 "# define IIF_FLAGS\t4\n"
9692 "# define IIF_ALL\t(IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)\n"
9696 #: build/C/man2/quotactl.2:277
9698 "The I<dqi_valid> field in the I<dqinfo> structure indicates the entries in "
9699 "the structure that are valid. Currently, the kernel fills in all entries of "
9700 "the I<dqinfo> structure and marks them all as valid in the I<dqi_valid> "
9701 "field. The I<id> argument is ignored."
9705 #: build/C/man2/quotactl.2:277
9707 msgid "B<Q_SETINFO>"
9708 msgstr "B<Q_SETINFO>"
9711 #: build/C/man2/quotactl.2:301
9713 "Set information about quotafile. The I<addr> argument should be a pointer "
9714 "to a I<dqinfo> structure. The I<dqi_valid> field of the I<dqinfo> structure "
9715 "indicates the entries in the structure that have been set by the caller. "
9716 "This operation supersedes the B<Q_SETGRACE> and B<Q_SETFLAGS> operations in "
9717 "the previous quota interfaces. The I<id> argument is ignored. This "
9718 "operation requires privilege (B<CAP_SYS_ADMIN>)."
9722 #: build/C/man2/quotactl.2:301
9725 msgstr "B<Q_GETFMT>"
9728 #: build/C/man2/quotactl.2:308
9730 "Get quota format used on the specified file system. The I<addr> argument "
9731 "should be a pointer to a 4-byte buffer where the format number will be "
9736 #: build/C/man2/quotactl.2:308
9742 #: build/C/man2/quotactl.2:319
9744 "Update the on-disk copy of quota usages for a file system. If I<special> is "
9745 "NULL, then all file systems with active quotas are sync'ed. The I<addr> and "
9746 "I<id> arguments are ignored."
9750 #: build/C/man2/quotactl.2:319
9752 msgid "B<Q_GETSTATS>"
9753 msgstr "B<Q_GETSTATS>"
9755 #. Q_GETSTATS was removed in kernel 2.4.22.
9757 #: build/C/man2/quotactl.2:339
9759 "Get statistics and other generic information about the quota subsystem. The "
9760 "I<addr> argument should be a pointer to a I<dqstats> structure in which data "
9761 "should be stored. This structure is defined in I<E<lt>sys/quota.hE<gt>.> "
9762 "The I<special> and I<id> arguments are ignored. This operation is obsolete "
9763 "and not supported by recent kernels. Files in I</proc/sys/fs/quota/> carry "
9764 "the information instead."
9768 #: build/C/man2/quotactl.2:342
9770 "For XFS file systems making use of the XFS Quota Manager (XQM), the above "
9771 "commands are bypassed and the following commands are used:"
9775 #: build/C/man2/quotactl.2:342
9777 msgid "B<Q_XQUOTAON>"
9778 msgstr "B<Q_XQUOTAON>"
9781 #: build/C/man2/quotactl.2:363
9783 "Turn on quotas for an XFS file system. XFS provides the ability to turn on/"
9784 "off quota limit enforcement with quota accounting. Therefore, XFS expects "
9785 "I<addr> to be a pointer to an I<unsigned int> that contains either the flags "
9786 "B<XFS_QUOTA_UDQ_ACCT> and/or B<XFS_QUOTA_UDQ_ENFD> (for user quota), or "
9787 "B<XFS_QUOTA_GDQ_ACCT> and/or B<XFS_QUOTA_GDQ_ENFD> (for group quota), as "
9788 "defined in I<E<lt>xfs/xqm.hE<gt>>. This operation requires privilege "
9789 "(B<CAP_SYS_ADMIN>)."
9793 #: build/C/man2/quotactl.2:363
9795 msgid "B<Q_XQUOTAOFF>"
9796 msgstr "B<Q_XQUOTAOFF>"
9799 #: build/C/man2/quotactl.2:374
9801 "Turn off quotas for an XFS file system. As with B<Q_QUOTAON>, XFS file "
9802 "systems expect a pointer to an I<unsigned int> that specifies whether quota "
9803 "accounting and/or limit enforcement need to be turned off. This operation "
9804 "requires privilege (B<CAP_SYS_ADMIN>)."
9808 #: build/C/man2/quotactl.2:374
9810 msgid "B<Q_XGETQUOTA>"
9811 msgstr "B<Q_XGETQUOTA>"
9814 #: build/C/man2/quotactl.2:388
9816 "Get disk quota limits and current usage for user I<id>. The I<addr> "
9817 "argument is a pointer to an I<fs_disk_quota> structure (defined in "
9818 "I<E<lt>xfs/xqm.hE<gt>>). Unprivileged users may retrieve only their own "
9819 "quotas; a privileged user (B<CAP_SYS_ADMIN>) may retrieve the quotas of any "
9824 #: build/C/man2/quotactl.2:388
9826 msgid "B<Q_XSETQLIM>"
9827 msgstr "B<Q_XSETQLIM>"
9830 #: build/C/man2/quotactl.2:400
9832 "Set disk quota limits for user I<id>. The I<addr> argument is a pointer to "
9833 "an I<fs_disk_quota> structure (defined in I<E<lt>xfs/xqm.hE<gt>>). This "
9834 "operation requires privilege (B<CAP_SYS_ADMIN>)."
9838 #: build/C/man2/quotactl.2:400
9840 msgid "B<Q_XGETQSTAT>"
9841 msgstr "B<Q_XGETQSTAT>"
9844 #: build/C/man2/quotactl.2:408
9846 "Returns an I<fs_quota_stat> structure containing XFS file system specific "
9847 "quota information. This is useful for finding out how much space is used to "
9848 "store quota information, and also to get quotaon/off status of a given local "
9853 #: build/C/man2/quotactl.2:408
9855 msgid "B<Q_XQUOTARM>"
9856 msgstr "B<Q_XQUOTARM>"
9859 #: build/C/man2/quotactl.2:412
9861 "Free the disk space taken by disk quotas. Quotas must have already been "
9866 #: build/C/man2/quotactl.2:419
9868 "There is no command equivalent to B<Q_SYNC> for XFS since B<sync>(1) writes "
9869 "quota information to disk (in addition to the other file system metadata "
9870 "that it writes out)."
9874 #: build/C/man2/quotactl.2:419
9876 msgid "RETURN VALUES"
9880 #: build/C/man2/quotactl.2:427
9882 "On success, B<quotactl>() returns 0; on error -1 is returned, and I<errno> "
9883 "is set to indicate the error."
9885 "成功すると、 B<quotactl>() は 0 を返す。\n"
9886 "エラーの場合、-1 を返し、 I<errno> をエラーを示す値に設定する。"
9889 #: build/C/man2/quotactl.2:434
9890 msgid "I<addr> or I<special> is invalid."
9894 #: build/C/man2/quotactl.2:440
9895 msgid "I<cmd> or I<type> is invalid."
9899 #: build/C/man2/quotactl.2:440
9905 #: build/C/man2/quotactl.2:447
9906 msgid "The file specified by I<special> or I<addr> does not exist."
9910 #: build/C/man2/quotactl.2:452
9911 msgid "The kernel has not been compiled with the B<CONFIG_QUOTA> option."
9915 #: build/C/man2/quotactl.2:452
9921 #: build/C/man2/quotactl.2:456
9922 msgid "I<special> is not a block device."
9923 msgstr "I<special> がブロックデバイスではない。"
9926 #: build/C/man2/quotactl.2:461
9928 "The caller lacked the required privilege (B<CAP_SYS_ADMIN>) for the "
9929 "specified operation."
9933 #: build/C/man2/quotactl.2:465
9935 "No disk quota is found for the indicated user. Quotas have not been turned "
9936 "on for this file system."
9940 #: build/C/man2/quotactl.2:474
9941 msgid "If I<cmd> is B<Q_SETQUOTA>, B<quotactl>() may also set I<errno> to:"
9945 #: build/C/man2/quotactl.2:477
9946 msgid "Specified limits are out of range allowed by quota format."
9950 #: build/C/man2/quotactl.2:486
9951 msgid "If I<cmd> is B<Q_QUOTAON>, B<quotactl>() may also set I<errno> to:"
9955 #: build/C/man2/quotactl.2:495
9957 "The quota file pointed to by I<addr> exists, but is not a regular file; or, "
9958 "the quota file pointed to by I<addr> exists, but is not on the file system "
9959 "pointed to by I<special>."
9963 #: build/C/man2/quotactl.2:501
9965 "B<Q_QUOTAON> attempted, but another B<Q_QUOTAON> had already been performed."
9969 #: build/C/man2/quotactl.2:504
9970 msgid "The quota file is corrupted."
9971 msgstr "quota ファイルが壊れている。"
9974 #: build/C/man2/quotactl.2:507
9975 msgid "Specified quota format was not found."
9979 #: build/C/man2/quotactl.2:512
9980 msgid "B<quota>(1), B<getrlimit>(2), B<quotacheck>(8), B<quotaon>(8)"
9981 msgstr "B<quota>(1), B<getrlimit>(2), B<quotacheck>(8), B<quotaon>(8)"
9984 #: build/C/man2/sendfile.2:19
9990 #: build/C/man2/sendfile.2:19
9996 #: build/C/man2/sendfile.2:22
9997 msgid "sendfile - transfer data between file descriptors"
9998 msgstr "sendfile - ファイル・ディスクリプタ間でデータを転送する"
10000 #. type: Plain text
10001 #: build/C/man2/sendfile.2:24
10002 msgid "B<#include E<lt>sys/sendfile.hE<gt>>"
10003 msgstr "B<#include E<lt>sys/sendfile.hE<gt>>"
10005 #. The below is too ugly. Comments about glibc versions belong
10006 #. in the notes, not in the header.
10007 #. .B #include <features.h>
10009 #. .B #if (__GLIBC__==2 && __GLIBC_MINOR__>=1) || __GLIBC__>2
10011 #. .B #include <sys/sendfile.h>
10015 #. .B #include <sys/types.h>
10017 #. .B /* No system prototype before glibc 2.1. */
10019 #. .BI "ssize_t sendfile(int" " out_fd" ", int" " in_fd" ", off_t *" #. offset ", size_t" " count" )
10022 #. type: Plain text
10023 #: build/C/man2/sendfile.2:47
10025 "B<ssize_t sendfile(int>I< out_fd>B<, int>I< in_fd>B<, off_t *>I<offset>B<, "
10026 "size_t>I< count>B<);>"
10028 "B<ssize_t sendfile(int>I< out_fd>B<, int>I< in_fd>B<, off_t *>I<offset>B<, "
10029 "size_t>I< count>B<);>"
10031 #. type: Plain text
10032 #: build/C/man2/sendfile.2:57
10034 "B<sendfile>() copies data between one file descriptor and another. Because "
10035 "this copying is done within the kernel, B<sendfile>() is more efficient "
10036 "than the combination of B<read>(2) and B<write>(2), which would require "
10037 "transferring data to and from user space."
10039 "B<sendfile>() は、あるファイル・ディスクリプタから別の ファイル・ディスクリ"
10040 "プタへのデータのコピーを行う。 このコピーはカーネル内で行われるので、 "
10041 "B<sendfile>() は、 B<read>(2) と B<write>(2) を組み合わせるよりも効率がよ"
10042 "い。 B<read>(2) や B<write>(2) ではユーザ空間との間でデータの転送が必要とな"
10045 #. type: Plain text
10046 #: build/C/man2/sendfile.2:62
10048 "I<in_fd> should be a file descriptor opened for reading and I<out_fd> should "
10049 "be a descriptor opened for writing."
10051 "I<in_fd> は読み込みのためにオープンされたファイル・ディスクリプタ、 "
10052 "I<out_fd> は書き込みのためにオープンされたディスクリプタでなければならない。"
10054 #. type: Plain text
10055 #: build/C/man2/sendfile.2:83
10057 "If I<offset> is not NULL, then it points to a variable holding the file "
10058 "offset from which B<sendfile>() will start reading data from I<in_fd>. "
10059 "When B<sendfile>() returns, this variable will be set to the offset of the "
10060 "byte following the last byte that was read. If I<offset> is not NULL, then "
10061 "B<sendfile>() does not modify the current file offset of I<in_fd>; "
10062 "otherwise the current file offset is adjusted to reflect the number of bytes "
10063 "read from I<in_fd>."
10065 "I<offset> が NULL でない場合、 I<offset> は B<sendfile>() が I<in_fd> のどこ"
10066 "からデータを読み始めるかを示すファイル・オフセットを保持する変数への ポインタ"
10067 "である。 B<sendfile>() は復帰する時、この変数に最後に読み込んだバイトの 次の"
10068 "バイトのオフセットを書き込む。 I<offset> が NULL でない場合、 B<sendfile>() "
10069 "は I<in_fd> のファイル・オフセットの現在値を変更しない。 NULL の場合は、ファ"
10070 "イル・オフセットの現在値を I<in_fd> から読み込んだバイト数を反映した位置に調"
10073 #. type: Plain text
10074 #: build/C/man2/sendfile.2:90
10076 "If I<offset> is NULL, then data will be read from I<in_fd> starting at the "
10077 "current file offset, and the file offset will be updated by the call."
10079 "I<offset> が NULL の場合、データは I<in_fd> の現在のファイル・オフセットから"
10080 "読み出され、 ファイル・オフセットはこの呼び出しで更新される。"
10082 #. type: Plain text
10083 #: build/C/man2/sendfile.2:93
10084 msgid "I<count> is the number of bytes to copy between the file descriptors."
10085 msgstr "I<count> は、ファイル・ディスクリプタ間でコピーするバイト数である。"
10087 #. type: Plain text
10088 #: build/C/man2/sendfile.2:100
10090 "The I<in_fd> argument must correspond to a file which supports B<mmap>(2)-"
10091 "like operations (i.e., it cannot be a socket)."
10093 "I<in_fd> 引き数は B<mmap>(2) 風の操作ができるファイルを指していなければなら"
10095 "い (ソケットを指定することはできない)。"
10097 #. type: Plain text
10098 #: build/C/man2/sendfile.2:108
10100 "In Linux kernels before 2.6.33, I<out_fd> must refer to a socket. Since "
10101 "Linux 2.6.33 it can be any file. If it is a regular file, then B<sendfile>"
10102 "() changes the file offset appropriately."
10104 "2.6.33 より前の Linux カーネルでは I<out_fd> はソケットを参照していなければ"
10106 "らない。Linux 2.6.33 以降では、任意のファイルを参照することができる。\n"
10107 "通常のファイルの場合には B<sendfile>() はファイルオフセットを適切に変更する。"
10109 #. type: Plain text
10110 #: build/C/man2/sendfile.2:115
10112 "If the transfer was successful, the number of bytes written to I<out_fd> is "
10113 "returned. On error, -1 is returned, and I<errno> is set appropriately."
10115 "転送に成功した場合、 I<out_fd> に書き込まれたバイト数を返す。エラーの場"
10116 "合、-1 を返し、 I<errno> に適切な値を設定する。"
10118 #. type: Plain text
10119 #: build/C/man2/sendfile.2:121
10121 "Nonblocking I/O has been selected using B<O_NONBLOCK> and the write would "
10124 "B<O_NONBLOCK> を用いて非ブロック I/O が選択されたが、書き込みがブロックされ"
10128 #: build/C/man2/sendfile.2:121 build/C/man2/splice.2:143
10129 #: build/C/man2/vmsplice.2:123
10134 #. type: Plain text
10135 #: build/C/man2/sendfile.2:125
10137 "The input file was not opened for reading or the output file was not opened "
10140 "入力ファイルが読み込みのためにオープンされていないか、 出力ファイルが書き込み"
10143 #. type: Plain text
10144 #: build/C/man2/sendfile.2:128
10145 msgid "Bad address."
10146 msgstr "アドレスがおかしい。"
10148 #. type: Plain text
10149 #: build/C/man2/sendfile.2:134
10151 "Descriptor is not valid or locked, or an B<mmap>(2)-like operation is not "
10152 "available for I<in_fd>."
10154 "ディスクリプタが有効でないか、ロックされている。もしくは B<mmap>(2) 風の操作"
10155 "が I<in_fd> では利用できない。"
10157 #. type: Plain text
10158 #: build/C/man2/sendfile.2:138
10159 msgid "Unspecified error while reading from I<in_fd>."
10160 msgstr "I<in_fd> から読み込んでいるうちに予期しないエラーが起こった。"
10162 #. type: Plain text
10163 #: build/C/man2/sendfile.2:142
10164 msgid "Insufficient memory to read from I<in_fd>."
10165 msgstr "I<in_fd> から読み込むための十分なメモリがない。"
10167 #. type: Plain text
10168 #: build/C/man2/sendfile.2:148
10170 "B<sendfile>() is a new feature in Linux 2.2. The include file I<E<lt>sys/"
10171 "sendfile.hE<gt>> is present since glibc 2.1."
10173 "B<sendfile> は Linux 2.2 の新しい機能である。 インクルードファイル "
10174 "I<E<lt>sys/sendfile.hE<gt>> は glibc 2.1 から存在している。"
10176 #. type: Plain text
10177 #: build/C/man2/sendfile.2:150
10178 msgid "Not specified in POSIX.1-2001, or other standards."
10179 msgstr "POSIX.1-2001 や他の標準では規定されていない。"
10181 #. type: Plain text
10182 #: build/C/man2/sendfile.2:155
10184 "Other UNIX systems implement B<sendfile>() with different semantics and "
10185 "prototypes. It should not be used in portable programs."
10187 "他の UNIX システムでは、異なった方式やプロトタイプで B<sendfile>() を実装し"
10188 "ている。移植性を考慮したプログラムでは使用すべきではない。"
10190 #. type: Plain text
10191 #: build/C/man2/sendfile.2:165
10193 "If you plan to use B<sendfile>() for sending files to a TCP socket, but "
10194 "need to send some header data in front of the file contents, you will find "
10195 "it useful to employ the B<TCP_CORK> option, described in B<tcp>(7), to "
10196 "minimize the number of packets and to tune performance."
10198 "B<sendfile>() を使って TCP ソケットにファイルを送ろうとしていて、 ファイルの"
10199 "内容の前にヘッダ・データを付け加える必要がある場合は、 パケット数を最小にして"
10200 "性能を上げるために B<tcp>(7) に記述されている B<TCP_CORK> オプションを使うと"
10203 #. type: Plain text
10204 #: build/C/man2/sendfile.2:171
10206 "In Linux 2.4 and earlier, I<out_fd> could also refer to a regular file, and "
10207 "B<sendfile>() changed the current offset of that file."
10209 "Linux 2.4 とそれ以前のバージョンでも、 I<out_fd> は通常のファイルを参照で"
10211 "B<sendfile>() はそのファイルのオフセットの現在値を変更していた。"
10213 #. type: Plain text
10214 #: build/C/man2/sendfile.2:183
10216 "The original Linux B<sendfile>() system call was not designed to handle "
10217 "large file offsets. Consequently, Linux 2.4 added B<sendfile64>(), with a "
10218 "wider type for the I<offset> argument. The glibc B<sendfile>() wrapper "
10219 "function transparently deals with the kernel differences."
10221 "元々の Linux B<sendfile>() システムコールは大きなファイルオフセットを\n"
10222 "扱えるように設計されていなかった。その結果、Linux 2.4 で、\n"
10223 "ビット幅の大きな I<offset> 引き数を持った B<sendfile64>() が追加された。\n"
10224 "glibc の B<sendfile>() のラッパー関数はカーネルによるこの違いを吸収している。"
10226 #. type: Plain text
10227 #: build/C/man2/sendfile.2:192
10229 "Applications may wish to fall back to B<read>(2)/B<write>(2) in the case "
10230 "where B<sendfile>() fails with B<EINVAL> or B<ENOSYS>."
10232 "B<sendfile>() が B<EINVAL> や B<ENOSYS> で失敗するような場合は、 アプリケー"
10233 "ションは B<read>(2)/B<write>(2) に戻すことを考えてもよいかもしれない。"
10235 #. type: Plain text
10236 #: build/C/man2/sendfile.2:197
10238 "The Linux-specific B<splice>(2) call supports transferring data between "
10239 "arbitrary files (e.g., a pair of sockets)."
10241 "Linux 固有の B<splice>(2) システムコールは、任意のファイル間 (例えば、\n"
10242 "ソケット同士) でのデータ転送をサポートしている。"
10244 #. type: Plain text
10245 #: build/C/man2/sendfile.2:202
10246 msgid "B<mmap>(2), B<open>(2), B<socket>(2), B<splice>(2)"
10247 msgstr "B<mmap>(2), B<open>(2), B<socket>(2), B<splice>(2)"
10250 #: build/C/man2/set_tid_address.2:25
10252 msgid "SET_TID_ADDRESS"
10253 msgstr "SET_TID_ADDRESS"
10256 #: build/C/man2/set_tid_address.2:25
10258 #| msgid "2012-05-03"
10260 msgstr "2012-05-03"
10262 #. type: Plain text
10263 #: build/C/man2/set_tid_address.2:28
10264 msgid "set_tid_address - set pointer to thread ID"
10265 msgstr "set_tid_address - スレッド ID へのポインタを設定する"
10267 #. type: Plain text
10268 #: build/C/man2/set_tid_address.2:31
10270 msgid "B<#include E<lt>linux/unistd.hE<gt>>\n"
10271 msgstr "B<#include E<lt>linux/unistd.hE<gt>>\n"
10273 #. type: Plain text
10274 #: build/C/man2/set_tid_address.2:33
10276 msgid "B<long set_tid_address(int *>I<tidptr>B<);>\n"
10277 msgstr "B<long set_tid_address(int *>I<tidptr>B<);>\n"
10279 #. type: Plain text
10280 #: build/C/man2/set_tid_address.2:40
10283 #| "The kernel keeps for each process two values called I<set_child_tid> and "
10284 #| "I<clear_child_tid> that are NULL by default."
10286 "For each process, the kernel maintains two attributes (addresses) called "
10287 "I<set_child_tid> and I<clear_child_tid>. These two attributes contain the "
10288 "value NULL by default."
10290 "カーネルは各プロセスについて I<set_child_tid> と I<clear_child_tid> という 2 "
10291 "つの値を保持する。 これらはデフォルトでは NULL である。"
10294 #: build/C/man2/set_tid_address.2:40
10296 #| msgid "set_child_tid"
10297 msgid "I<set_child_tid>"
10298 msgstr "set_child_tid"
10300 #. type: Plain text
10301 #: build/C/man2/set_tid_address.2:51
10304 #| "If a process is started using B<clone>(2) with the B<CLONE_CHILD_SETTID> "
10305 #| "flag, I<set_child_tid> is set to I<child_tidptr>, the fifth argument of "
10306 #| "that system call."
10308 "If a process is started using B<clone>(2) with the B<CLONE_CHILD_SETTID> "
10309 "flag, I<set_child_tid> is set to the value passed in the I<ctid> argument of "
10310 "that system call."
10312 "プロセスが B<CLONE_CHILD_SETTID> フラグを指定した B<clone>(2) によって開始さ"
10313 "れた場合、 I<set_child_tid> は I<child_tidptr> に設定される。 これは B<clone>"
10314 "(2) のシステムコールの 5 番目の引き数である。"
10316 #. type: Plain text
10317 #: build/C/man2/set_tid_address.2:56
10319 "When I<set_child_tid> is set, the very first thing the new process does is "
10320 "writing its PID at this address."
10322 "I<set_child_tid> が設定された場合、一番最初に新しいプロセスが行うことは、 こ"
10323 "のアドレスに自身の PID を書き込むことである。"
10326 #: build/C/man2/set_tid_address.2:56
10328 #| msgid "clear_child_tid"
10329 msgid "I<clear_child_tid>"
10330 msgstr "clear_child_tid"
10332 #. type: Plain text
10333 #: build/C/man2/set_tid_address.2:67
10336 #| "If a process is started using B<clone>(2) with the "
10337 #| "B<CLONE_CHILD_CLEARTID> flag, I<clear_child_tid> is set to "
10338 #| "I<child_tidptr>, the fifth argument of that system call."
10340 "If a process is started using B<clone>(2) with the B<CLONE_CHILD_CLEARTID> "
10341 "flag, I<clear_child_tid> is set to the value passed in the I<ctid> argument "
10342 "of that system call."
10344 "プロセスが B<CLONE_CHILD_CLEARTID> フラグを指定した B<clone>(2) によって開始"
10345 "された場合、 I<clear_child_tid> は I<child_tidptr> に設定される。 これは "
10346 "B<clone>(2) のシステムコールの 5 番目の引き数である。"
10348 #. type: Plain text
10349 #: build/C/man2/set_tid_address.2:74
10351 "The system call B<set_tid_address>() sets the I<clear_child_tid> value for "
10352 "the calling process to I<tidptr>."
10354 "システムコール B<set_tid_address>() は呼び出し元プロセスの "
10355 "I<clear_child_tid> の値を I<tidptr> に設定する。"
10357 #. type: Plain text
10358 #: build/C/man2/set_tid_address.2:82
10361 #| "When I<clear_child_tid> is set, and the process exits, and the process "
10362 #| "was sharing memory with other processes or threads, then 0 is written at "
10363 #| "this address, and a I<futex(child_tidptr, FUTEX_WAKE, 1, NULL, NULL, 0);> "
10364 #| "call is done. (That is, wake a single process waiting on this futex.) "
10365 #| "Errors are ignored."
10367 "When a process whose I<clear_child_tid> is not NULL terminates, then, if the "
10368 "process is sharing memory with other processes or threads, then 0 is written "
10369 "at the address specified in I<clear_child_tid> and the kernel performs the "
10370 "following operation:"
10372 "I<clear_child_tid> が設定されているときにプロセスが終了すると、 そのプロセス"
10373 "は他のプロセスまたはスレッドとメモリを共有しているので、 このアドレスに 0 が"
10374 "書き込まれ、 I<futex(child_tidptr, FUTEX_WAKE, 1, NULL, NULL, 0);> の呼び出し"
10375 "が実行される (つまり、この futex で待っている 1 つのプロセスを起こす "
10376 "(wake))。 エラーは無視される。"
10378 #. type: Plain text
10379 #: build/C/man2/set_tid_address.2:84
10381 msgid " futex(clear_child_tid, FUTEX_WAKE, 1, NULL, NULL, 0);\n"
10384 #. type: Plain text
10385 #: build/C/man2/set_tid_address.2:88
10387 "The effect of this operation is to wake a single process that is performing "
10388 "a futex wait on the memory location. Errors from the futex wake operation "
10392 #. type: Plain text
10393 #: build/C/man2/set_tid_address.2:91
10394 msgid "B<set_tid_address>() always returns the PID of the calling process."
10395 msgstr "B<set_tid_address>() は常に現在のプロセスの PID を返す。"
10397 #. type: Plain text
10398 #: build/C/man2/set_tid_address.2:94
10399 msgid "B<set_tid_address>() always succeeds."
10400 msgstr "B<set_tid_address>() は常に成功する。"
10402 #. type: Plain text
10403 #: build/C/man2/set_tid_address.2:97
10405 "This call is present since Linux 2.5.48. Details as given here are valid "
10406 "since Linux 2.5.49."
10408 "この呼び出しは Linux 2.5.48 以降で存在する。 ここで書かれた詳細は Linux "
10411 #. type: Plain text
10412 #: build/C/man2/set_tid_address.2:102
10413 msgid "B<clone>(2), B<futex>(2)"
10414 msgstr "B<clone>(2), B<futex>(2)"
10417 #: build/C/man2/splice.2:26
10423 #: build/C/man2/splice.2:26 build/C/man2/tee.2:26 build/C/man2/vmsplice.2:26
10426 msgstr "2012-05-04"
10428 #. type: Plain text
10429 #: build/C/man2/splice.2:29
10430 msgid "splice - splice data to/from a pipe"
10431 msgstr "splice - パイプとの間でデータを継ぎ合わせる"
10433 #. type: Plain text
10434 #: build/C/man2/splice.2:33 build/C/man2/tee.2:33
10437 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
10438 "B<#include E<lt>fcntl.hE<gt>>\n"
10440 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
10441 "B<#include E<lt>fcntl.hE<gt>>\n"
10443 #. Return type was long before glibc 2.7
10444 #. type: Plain text
10445 #: build/C/man2/splice.2:38
10448 "B<ssize_t splice(int >I<fd_in>B<, loff_t *>I<off_in>B<, int >I<fd_out>B<,>\n"
10449 "B< loff_t *>I<off_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
10451 "B<ssize_t splice(int >I<fd_in>B<, loff_t *>I<off_in>B<, int >I<fd_out>B<,>\n"
10452 "B< loff_t *>I<off_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
10454 #. type: Plain text
10455 #: build/C/man2/splice.2:50
10457 "B<splice>() moves data between two file descriptors without copying between "
10458 "kernel address space and user address space. It transfers up to I<len> "
10459 "bytes of data from the file descriptor I<fd_in> to the file descriptor "
10460 "I<fd_out>, where one of the descriptors must refer to a pipe."
10462 "B<splice>() は、カーネルアドレス空間とユーザアドレス空間との間のコピーを伴わ"
10463 "ずに、 2 つのファイルディスクリプタ間でデータの移動を行う。 ファイルディスク"
10464 "リプタ I<fd_in> からファイルディスクリプタ I<fd_out> へ最大 I<len> バイトを転"
10465 "送する。 2 つのファイルディスクリプタのうち一つは パイプを参照していなければ"
10468 #. type: Plain text
10469 #: build/C/man2/splice.2:80
10471 "If I<fd_in> refers to a pipe, then I<off_in> must be NULL. If I<fd_in> does "
10472 "not refer to a pipe and I<off_in> is NULL, then bytes are read from I<fd_in> "
10473 "starting from the current file offset, and the current file offset is "
10474 "adjusted appropriately. If I<fd_in> does not refer to a pipe and I<off_in> "
10475 "is not NULL, then I<off_in> must point to a buffer which specifies the "
10476 "starting offset from which bytes will be read from I<fd_in>; in this case, "
10477 "the current file offset of I<fd_in> is not changed. Analogous statements "
10478 "apply for I<fd_out> and I<off_out>."
10480 "I<fd_in> がパイプを参照している場合、 I<off_in> は NULL でなければならない。 "
10481 "I<fd_in> がパイプを参照しておらず、 I<off_in> が NULL の場合、 I<fd_in> の現"
10482 "在のファイルオフセットから始まるバイトを読み出す。 現在のファイルオフセットは"
10483 "適切に調整される。 I<fd_in> がパイプを参照しておらず、 I<off_in> が NULL でな"
10484 "い場合、 I<off_in> は I<fd_in> からのデータ読み出しを開始する先頭オフセットを"
10485 "格納したバッファ へのポインタでなければならない。この場合、 I<fd_in> の現在の"
10486 "ファイルオフセットは変更されない。 I<fd_out> と I<off_out> に関しても同様であ"
10489 #. type: Plain text
10490 #: build/C/man2/splice.2:85 build/C/man2/vmsplice.2:78
10492 "The I<flags> argument is a bit mask that is composed by ORing together zero "
10493 "or more of the following values:"
10495 "I<flags> 引き数には、以下の値の 0 個以上をビット毎の論理和の形で指定する。"
10498 #: build/C/man2/splice.2:85 build/C/man2/tee.2:62 build/C/man2/vmsplice.2:78
10500 msgid "B<SPLICE_F_MOVE>"
10501 msgstr "B<SPLICE_F_MOVE>"
10503 #. type: Plain text
10504 #: build/C/man2/splice.2:98
10506 "Attempt to move pages instead of copying. This is only a hint to the "
10507 "kernel: pages may still be copied if the kernel cannot move the pages from "
10508 "the pipe, or if the pipe buffers don't refer to full pages. The initial "
10509 "implementation of this flag was buggy: therefore starting in Linux 2.6.21 it "
10510 "is a no-op (but is still permitted in a B<splice>() call); in the future, a "
10511 "correct implementation may be restored."
10513 "ページのコピーでなく移動を試みる。 これはカーネルに対するヒントでしかない。 "
10514 "つまり、カーネルがパイプからページを移動できない場合や、 パイプバッファがペー"
10515 "ジ全部を参照していない場合は、 ページのコピーが行われることもある。 このフラ"
10516 "グの最初の実装にはバグがあった。そのため、 Linux 2.6.21 以降ではこのフラグの"
10517 "操作はできないようになっている (ただし、 B<splice>() コールでこのフラグを指"
10518 "定することは今も認められている)。 将来、正しい実装が行われることだろう。"
10521 #: build/C/man2/splice.2:98 build/C/man2/tee.2:68 build/C/man2/vmsplice.2:84
10523 msgid "B<SPLICE_F_NONBLOCK>"
10524 msgstr "B<SPLICE_F_NONBLOCK>"
10526 #. type: Plain text
10527 #: build/C/man2/splice.2:107
10529 "Do not block on I/O. This makes the splice pipe operations nonblocking, but "
10530 "B<splice>() may nevertheless block because the file descriptors that are "
10531 "spliced to/from may block (unless they have the B<O_NONBLOCK> flag set)."
10533 "入出力時に停止 (block) しない。 このフラグを指定すると、 splice によるパイプ"
10534 "操作を非停止モード (nonblocking) で 行おうとするが、その場合でも B<splice>"
10535 "() は停止することもある。なぜなら、データのやり取りを行う ファイルディスクリ"
10536 "プタは (B<O_NONBLOCK> フラグをセットされていない場合) 停止する可能性があるか"
10540 #: build/C/man2/splice.2:107 build/C/man2/tee.2:73 build/C/man2/vmsplice.2:91
10542 msgid "B<SPLICE_F_MORE>"
10543 msgstr "B<SPLICE_F_MORE>"
10545 #. type: Plain text
10546 #: build/C/man2/splice.2:121
10548 "More data will be coming in a subsequent splice. This is a helpful hint "
10549 "when the I<fd_out> refers to a socket (see also the description of "
10550 "B<MSG_MORE> in B<send>(2), and the description of B<TCP_CORK> in B<tcp>(7))"
10552 "この後の splice でさらに転送されるデータがあることを示す。 このフラグは "
10553 "I<fd_out> がソケットを参照している場合に有用なヒントとなる (B<send>(2) の "
10554 "B<MSG_MORE> や B<tcp>(7) の B<TCP_CORK> の説明も参照)。"
10557 #: build/C/man2/splice.2:121 build/C/man2/tee.2:79 build/C/man2/vmsplice.2:97
10559 msgid "B<SPLICE_F_GIFT>"
10560 msgstr "B<SPLICE_F_GIFT>"
10562 #. type: Plain text
10563 #: build/C/man2/splice.2:127
10564 msgid "Unused for B<splice>(); see B<vmsplice>(2)."
10565 msgstr "B<splice>() では使用しない。 B<vmsplice>(2) 参照。"
10567 #. type: Plain text
10568 #: build/C/man2/splice.2:136
10570 "Upon successful completion, B<splice>() returns the number of bytes spliced "
10571 "to or from the pipe. A return value of 0 means that there was no data to "
10572 "transfer, and it would not make sense to block, because there are no writers "
10573 "connected to the write end of the pipe referred to by I<fd_in>."
10575 "成功して完了すると、 B<splice>() はパイプから出し入れしたバイト数を返す。 返"
10576 "り値 0 はデータの転送が行わなかったことを示す。 この場合、処理を停止 (block) "
10577 "しても無意味である。 なぜなら、 I<fd_in> が参照するパイプの書き込み側に接続さ"
10580 #. type: Plain text
10581 #: build/C/man2/splice.2:142
10583 "On error, B<splice>() returns -1 and I<errno> is set to indicate the error."
10585 "エラーの場合、 B<splice>() は -1 を返し、 I<errno> にエラーを示す値を設定す"
10588 #. type: Plain text
10589 #: build/C/man2/splice.2:147
10591 "One or both file descriptors are not valid, or do not have proper read-write "
10594 "ファイルディスクリプタの一方または両方が有効ではない、 もしくは適切な read-"
10597 #. The append-mode error is given since 2.6.27; in earlier kernels,
10598 #. splice() in append mode was broken
10599 #. type: Plain text
10600 #: build/C/man2/splice.2:155
10602 "Target file system doesn't support splicing; target file is opened in append "
10603 "mode; neither of the descriptors refers to a pipe; or offset given for "
10604 "nonseekable device."
10606 "対象のファイルシステムが splice に対応していない、 または対象のファイルが追記"
10607 "モードでオープンされている、 またはディスクリプタのどちらもパイプを参照してい"
10608 "ない、 または seek できないデバイスに対してオフセットが指定された。"
10610 #. type: Plain text
10611 #: build/C/man2/splice.2:158 build/C/man2/tee.2:114
10612 #: build/C/man2/vmsplice.2:138
10613 msgid "Out of memory."
10617 #: build/C/man2/splice.2:158
10622 #. type: Plain text
10623 #: build/C/man2/splice.2:165
10625 "Either I<off_in> or I<off_out> was not NULL, but the corresponding file "
10626 "descriptor refers to a pipe."
10628 "I<off_in> か I<off_out> のいずれかが NULL ではないが、対応するファイルディス"
10629 "クリプタが パイプを参照している。"
10631 #. type: Plain text
10632 #: build/C/man2/splice.2:170
10634 "The B<splice>() system call first appeared in Linux 2.6.17; library support "
10635 "was added to glibc in version 2.5."
10637 "B<splice>() システムコールは Linux 2.6.17 で初めて登場した。\n"
10638 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
10640 #. type: Plain text
10641 #: build/C/man2/splice.2:182
10644 #| "The three system calls B<splice>(), B<vmsplice>(2), and B<tee>(2), "
10645 #| "provide userspace programs with full control over an arbitrary kernel "
10646 #| "buffer, implemented within the kernel using the same type of buffer that "
10647 #| "is used for a pipe. In overview, these system calls perform the "
10648 #| "following tasks:"
10650 "The three system calls B<splice>(), B<vmsplice>(2), and B<tee>(2), provide "
10651 "user-space programs with full control over an arbitrary kernel buffer, "
10652 "implemented within the kernel using the same type of buffer that is used for "
10653 "a pipe. In overview, these system calls perform the following tasks:"
10655 "3 つのシステムコール (B<splice>(), B<vmsplice>(2), B<tee>(2)) を使うと、ユー"
10656 "ザ空間プログラムは任意のカーネルバッファに対する 完全な制御ができる。カーネル"
10657 "バッファは、パイプに使用されているのと 同種のバッファを使ってカーネル内に実装"
10658 "されている。 大まかにいうと、これらのシステムコールは以下の仕事を行う:"
10661 #: build/C/man2/splice.2:182
10663 msgid "B<splice>()"
10664 msgstr "B<splice>()"
10666 #. type: Plain text
10667 #: build/C/man2/splice.2:186
10669 "moves data from the buffer to an arbitrary file descriptor, or vice versa, "
10670 "or from one buffer to another."
10672 "バッファから任意のファイルディスクリプタや、その逆方向、 もしくはあるバッファ"
10673 "から別のバッファへの、データ移動を行う。"
10676 #: build/C/man2/splice.2:186
10681 #. type: Plain text
10682 #: build/C/man2/splice.2:189
10683 msgid "\"copies\" the data from one buffer to another."
10684 msgstr "あるバッファから別のバッファへのデータ「コピー」を行う。"
10687 #: build/C/man2/splice.2:189
10689 msgid "B<vmsplice>(2)"
10690 msgstr "B<vmsplice>(2)"
10692 #. type: Plain text
10693 #: build/C/man2/splice.2:192
10694 msgid "\"copies\" data from user space into the buffer."
10695 msgstr "ユーザ空間からバッファへのデータ「コピー」を行う。"
10697 #. Linus: Now, imagine using the above in a media server, for example.
10698 #. Let's say that a year or two has passed, so that the video drivers
10699 #. have been updated to be able to do the splice thing, and what can
10700 #. you do? You can:
10701 #. - splice from the (mpeg or whatever - let's just assume that the video
10702 #. input is either digital or does the encoding on its own - like they
10703 #. pretty much all do) video input into a pipe (remember: no copies - the
10704 #. video input will just DMA directly into memory, and splice will just
10705 #. set up the pages in the pipe buffer)
10706 #. - tee that pipe to split it up
10707 #. - splice one end to a file (ie "save the compressed stream to disk")
10708 #. - splice the other end to a real-time video decoder window for your
10709 #. real-time viewing pleasure.
10710 #. Linus: Now, the advantage of splice()/tee() is that you can
10711 #. do zero-copy movement of data, and unlike sendfile() you can
10712 #. do it on _arbitrary_ data (and, as shown by "tee()", it's more
10713 #. than just sending the data to somebody else: you can duplicate
10714 #. the data and choose to forward it to two or more different
10715 #. users - for things like logging etc.).
10716 #. type: Plain text
10717 #: build/C/man2/splice.2:223
10719 "Though we talk of copying, actual copies are generally avoided. The kernel "
10720 "does this by implementing a pipe buffer as a set of reference-counted "
10721 "pointers to pages of kernel memory. The kernel creates \"copies\" of pages "
10722 "in a buffer by creating new pointers (for the output buffer) referring to "
10723 "the pages, and increasing the reference counts for the pages: only pointers "
10724 "are copied, not the pages of the buffer."
10726 "ここではコピーの話をしているが、実際のコピーは一般的に回避される。 カーネル"
10727 "は、パイプ・バッファをカーネルメモリのページへのポインタ集合として 実装し、"
10728 "ページへの参照回数を管理することで、これを実現している。 カーネルは、対象とな"
10729 "るページを参照する (出力バッファ用の) ポインタを 新規に作成することでバッファ"
10730 "内のページの「コピー」を作成し、 そのページの参照回数を増やす。つまり、ポイン"
10731 "タだけがコピーされ、 バッファのページはコピーされない。"
10733 #. type: Plain text
10734 #: build/C/man2/splice.2:226
10735 msgid "See B<tee>(2)."
10736 msgstr "B<tee>(2) 参照。"
10738 #. type: Plain text
10739 #: build/C/man2/splice.2:230
10740 msgid "B<sendfile>(2), B<tee>(2), B<vmsplice>(2)"
10741 msgstr "B<sendfile>(2), B<tee>(2), B<vmsplice>(2)"
10744 #: build/C/man2/tee.2:26
10749 #. type: Plain text
10750 #: build/C/man2/tee.2:29
10751 msgid "tee - duplicating pipe content"
10752 msgstr "tee - パイプの中身を複製する"
10754 #. type: Plain text
10755 #: build/C/man2/tee.2:36
10757 msgid "B<ssize_t tee(int >I<fd_in>B<, int >I<fd_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
10758 msgstr "B<ssize_t tee(int >I<fd_in>B<, int >I<fd_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
10760 #. Example programs http://brick.kernel.dk/snaps
10761 #. add a "tee(in, out1, out2)" system call that duplicates the pages
10762 #. (again, incrementing their reference count, not copying the data) from
10763 #. one pipe to two other pipes.
10764 #. type: Plain text
10765 #: build/C/man2/tee.2:56
10767 "B<tee>() duplicates up to I<len> bytes of data from the pipe referred to by "
10768 "the file descriptor I<fd_in> to the pipe referred to by the file descriptor "
10769 "I<fd_out>. It does not consume the data that is duplicated from I<fd_in>; "
10770 "therefore, that data can be copied by a subsequent B<splice>(2)."
10772 "B<tee>() は、ファイルディスクリプタ I<fd_in> が参照するパイプからファイル"
10773 "ディスクリプタ I<fd_out> が参照するパイプへ最大 I<len> バイトのデータを複製す"
10774 "る。 この操作では、複製されるデータは I<fd_in> からは消費されない。したがっ"
10775 "て、これらのデータをこの後の B<splice>(2) でコピーすることができる。"
10777 #. type: Plain text
10778 #: build/C/man2/tee.2:62
10780 "I<flags> is a series of modifier flags, which share the name space with "
10781 "B<splice>(2) and B<vmsplice>(2):"
10783 "I<flags> は一連の修飾フラグであり、 B<splice>(2) や B<vmsplice>(2) と共通の"
10786 #. type: Plain text
10787 #: build/C/man2/tee.2:68
10788 msgid "Currently has no effect for B<tee>(); see B<splice>(2)."
10789 msgstr "現在のところ B<tee>() では何の効果もない。 B<splice>(2) 参照。"
10791 #. Not used for vmsplice
10792 #. May be in the future -- therefore EAGAIN
10793 #. type: Plain text
10794 #: build/C/man2/tee.2:73 build/C/man2/vmsplice.2:91
10795 msgid "Do not block on I/O; see B<splice>(2) for further details."
10796 msgstr "入出力で停止 (block) しない。詳細は B<splice>(2) 参照。"
10798 #. type: Plain text
10799 #: build/C/man2/tee.2:79
10801 "Currently has no effect for B<tee>(), but may be implemented in the future; "
10802 "see B<splice>(2)."
10804 "現在のところ B<tee>() では何の効果もないが、将来的には実装される可能性があ"
10805 "る。 B<splice>(2) 参照。"
10807 #. type: Plain text
10808 #: build/C/man2/tee.2:85
10809 msgid "Unused for B<tee>(); see B<vmsplice>(2)."
10810 msgstr "B<tee>() では未使用。 B<vmsplice>(2) 参照。"
10812 #. type: Plain text
10813 #: build/C/man2/tee.2:94
10815 "Upon successful completion, B<tee>() returns the number of bytes that were "
10816 "duplicated between the input and output. A return value of 0 means that "
10817 "there was no data to transfer, and it would not make sense to block, because "
10818 "there are no writers connected to the write end of the pipe referred to by "
10821 "成功して完了すると、 B<tee>() は入出力間で複製されたバイト数を返す。 返り値 "
10822 "0 はデータの転送が行われなかったことを示す。 この場合、処理を停止 (block) し"
10823 "ても無意味である。 なぜなら、 I<fd_in> が参照するパイプの書き込み側に接続され"
10826 #. type: Plain text
10827 #: build/C/man2/tee.2:100
10829 "On error, B<tee>() returns -1 and I<errno> is set to indicate the error."
10831 "エラーの場合、 B<tee>() は -1 を返し、 I<errno> にエラーを示す値を設定する。"
10833 #. type: Plain text
10834 #: build/C/man2/tee.2:111
10836 "I<fd_in> or I<fd_out> does not refer to a pipe; or I<fd_in> and I<fd_out> "
10837 "refer to the same pipe."
10839 "I<fd_in> と I<fd_out> のどちらかがパイプを参照していない。もしくは I<fd_in> "
10840 "と I<fd_out> が同じパイプを参照している。"
10842 #. type: Plain text
10843 #: build/C/man2/tee.2:119
10845 "The B<tee>() system call first appeared in Linux 2.6.17; library support "
10846 "was added to glibc in version 2.5."
10848 "B<tee>() システムコールは Linux 2.6.17 で初めて登場した。\n"
10849 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
10851 #. type: Plain text
10852 #: build/C/man2/tee.2:130
10854 "Conceptually, B<tee>() copies the data between the two pipes. In reality "
10855 "no real data copying takes place though: under the covers, B<tee>() assigns "
10856 "data in the output by merely grabbing a reference to the input."
10858 "概念としては、 B<tee>() は二つのパイプ間でデータのコピーを行う。 しかし、実"
10859 "際には実データのコピーは行われない。 内部では、 B<tee>() は入力側に対する参"
10860 "照だけを作成することで出力側にデータを 追加する。"
10862 #. type: Plain text
10863 #: build/C/man2/tee.2:136
10865 "The following example implements a basic B<tee>(1) program using the B<tee>"
10868 "以下の例は、 B<tee>() システムコールを使って、 基本的な B<tee>(1) プログラ"
10871 #. type: Plain text
10872 #: build/C/man2/tee.2:145
10875 "#define _GNU_SOURCE\n"
10876 "#include E<lt>fcntl.hE<gt>\n"
10877 "#include E<lt>stdio.hE<gt>\n"
10878 "#include E<lt>stdlib.hE<gt>\n"
10879 "#include E<lt>unistd.hE<gt>\n"
10880 "#include E<lt>errno.hE<gt>\n"
10881 "#include E<lt>limits.hE<gt>\n"
10883 "#define _GNU_SOURCE\n"
10884 "#include E<lt>fcntl.hE<gt>\n"
10885 "#include E<lt>stdio.hE<gt>\n"
10886 "#include E<lt>stdlib.hE<gt>\n"
10887 "#include E<lt>unistd.hE<gt>\n"
10888 "#include E<lt>errno.hE<gt>\n"
10889 "#include E<lt>limits.hE<gt>\n"
10891 #. type: Plain text
10892 #: build/C/man2/tee.2:151
10896 "main(int argc, char *argv[])\n"
10899 " int len, slen;\n"
10902 "main(int argc, char *argv[])\n"
10905 " int len, slen;\n"
10907 #. type: Plain text
10908 #: build/C/man2/tee.2:156
10911 " if (argc != 2) {\n"
10912 " fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
10913 " exit(EXIT_FAILURE);\n"
10916 " if (argc != 2) {\n"
10917 " fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
10918 " exit(EXIT_FAILURE);\n"
10921 #. type: Plain text
10922 #: build/C/man2/tee.2:162
10925 " fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
10926 " if (fd == -1) {\n"
10927 " perror(\"open\");\n"
10928 " exit(EXIT_FAILURE);\n"
10931 " fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
10932 " if (fd == -1) {\n"
10933 " perror(\"open\");\n"
10934 " exit(EXIT_FAILURE);\n"
10937 #. type: Plain text
10938 #: build/C/man2/tee.2:169
10943 " * tee stdin to stdout.\n"
10945 " len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
10946 " INT_MAX, SPLICE_F_NONBLOCK);\n"
10950 " * tee stdin to stdout.\n"
10952 " len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
10953 " INT_MAX, SPLICE_F_NONBLOCK);\n"
10955 #. type: Plain text
10956 #: build/C/man2/tee.2:178
10959 " if (len E<lt> 0) {\n"
10960 " if (errno == EAGAIN)\n"
10962 " perror(\"tee\");\n"
10963 " exit(EXIT_FAILURE);\n"
10968 " if (len E<lt> 0) {\n"
10969 " if (errno == EAGAIN)\n"
10971 " perror(\"tee\");\n"
10972 " exit(EXIT_FAILURE);\n"
10977 #. type: Plain text
10978 #: build/C/man2/tee.2:192
10982 " * Consume stdin by splicing it to a file.\n"
10984 " while (len E<gt> 0) {\n"
10985 " slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
10986 " len, SPLICE_F_MOVE);\n"
10987 " if (slen E<lt> 0) {\n"
10988 " perror(\"splice\");\n"
10996 " * Consume stdin by splicing it to a file.\n"
10998 " while (len E<gt> 0) {\n"
10999 " slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
11000 " len, SPLICE_F_MOVE);\n"
11001 " if (slen E<lt> 0) {\n"
11002 " perror(\"splice\");\n"
11009 #. type: Plain text
11010 #: build/C/man2/tee.2:196
11014 " exit(EXIT_SUCCESS);\n"
11018 " exit(EXIT_SUCCESS);\n"
11021 #. type: Plain text
11022 #: build/C/man2/tee.2:200
11023 msgid "B<splice>(2), B<vmsplice>(2)"
11024 msgstr "B<splice>(2), B<vmsplice>(2)"
11027 #: build/C/man2/vm86.2:26
11033 #: build/C/man2/vm86.2:26
11036 msgstr "2009-02-20"
11038 #. type: Plain text
11039 #: build/C/man2/vm86.2:29
11040 msgid "vm86old, vm86 - enter virtual 8086 mode"
11041 msgstr "vm86old, vm86 - 仮想 8086 モードへ移行する"
11043 #. type: Plain text
11044 #: build/C/man2/vm86.2:31
11045 msgid "B<#include E<lt>sys/vm86.hE<gt>>"
11046 msgstr "B<#include E<lt>sys/vm86.hE<gt>>"
11048 #. type: Plain text
11049 #: build/C/man2/vm86.2:33
11050 msgid "B<int vm86old(struct vm86_struct *>I<info>B<);>"
11051 msgstr "B<int vm86old(struct vm86_struct *>I<info>B<);>"
11053 #. type: Plain text
11054 #: build/C/man2/vm86.2:35
11055 msgid "B<int vm86(unsigned long >I<fn>B<, struct vm86plus_struct *>I<v86>B<);>"
11057 "B<int vm86(unsigned long >I<fn>B<, struct vm86plus_struct *>I<v86>B<);>"
11059 #. type: Plain text
11060 #: build/C/man2/vm86.2:46
11062 "The system call B<vm86>() was introduced in Linux 0.97p2. In Linux 2.1.15 "
11063 "and 2.0.28 it was renamed to B<vm86old>(), and a new B<vm86>() was "
11064 "introduced. The definition of I<struct vm86_struct> was changed in 1.1.8 "
11067 "B<vm86>() システムコールは Linux 0.97p2 で導入された。 これは Linux 2.1.15 "
11068 "と 2.0.28 で B<vm86old>() に名前が変更され、 新しい B<vm86>() が導入され"
11069 "た。 I<struct vm86_struct> の定義は 1.1.8 と 1.1.9 で変更された。"
11071 #. type: Plain text
11072 #: build/C/man2/vm86.2:50
11074 "These calls cause the process to enter VM86 mode (virtual-8086 in Intel "
11075 "literature), and are used by B<dosemu>."
11077 "これらのコールによってプロセスは VM86 モード (Intel の文書では仮想 8086 モー"
11078 "ド) へと移行する。 これらのコールは B<dosemu> で使用される。"
11080 #. type: Plain text
11081 #: build/C/man2/vm86.2:52
11082 msgid "VM86 mode is an emulation of real mode within a protected mode task."
11084 "VM86 モードはプロテクトモードタスクにおける リアルモードのエミュレーションで"
11087 #. type: Plain text
11088 #: build/C/man2/vm86.2:62
11091 #| "This return value is specific to i386 and indicates a problem with "
11092 #| "getting userspace data."
11094 "This return value is specific to i386 and indicates a problem with getting "
11097 "この返り値は i386 固有のものであり、 ユーザー空間のデータを取得する際に問題が"
11100 #. type: Plain text
11101 #: build/C/man2/vm86.2:66
11103 "This return value indicates the call is not implemented on the present "
11106 "この返り値は、このコールが現在のアーキテクチャで実装されていないことを示す。"
11108 #. type: Plain text
11109 #: build/C/man2/vm86.2:71
11111 "Saved kernel stack exists. (This is a kernel sanity check; the saved stack "
11112 "should only exist within vm86 mode itself.)"
11114 "保存されたカーネルスタックが既に存在している。(これはカーネルが通常の 状態で"
11115 "あるかをチェックしている。保存されたスタックは vm86 モードで しか存在しな"
11118 #. type: Plain text
11119 #: build/C/man2/vm86.2:74
11121 "This call is specific to Linux on 32-bit Intel processors, and should not be "
11122 "used in programs intended to be portable."
11124 "この関数は 32 ビット Intel プロセッサ上の Linux 特有の関数であり、 移植を意図"
11125 "したプログラムでは使用すべきでない。"
11128 #: build/C/man2/vmsplice.2:26
11133 #. type: Plain text
11134 #: build/C/man2/vmsplice.2:29
11135 msgid "vmsplice - splice user pages into a pipe"
11136 msgstr "vmsplice - ユーザ・ページをパイプに継ぎ合わせる"
11138 #. type: Plain text
11139 #: build/C/man2/vmsplice.2:34
11142 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
11143 "B<#include E<lt>fcntl.hE<gt>>\n"
11144 "B<#include E<lt>sys/uio.hE<gt>>\n"
11146 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
11147 "B<#include E<lt>fcntl.hE<gt>>\n"
11148 "B<#include E<lt>sys/uio.hE<gt>>\n"
11150 #. type: Plain text
11151 #: build/C/man2/vmsplice.2:37
11154 "B<ssize_t vmsplice(int >I<fd>B<, const struct iovec *>I<iov>B<,>\n"
11155 "B< unsigned long >I<nr_segs>B<, unsigned int >I<flags>B<);>\n"
11157 "B<ssize_t vmsplice(int >I<fd>B<, const struct iovec *>I<iov>B<,>\n"
11158 "B< unsigned long >I<nr_segs>B<, unsigned int >I<flags>B<);>\n"
11160 #. Linus: vmsplice() system call to basically do a "write to
11161 #. the buffer", but using the reference counting and VM traversal
11162 #. to actually fill the buffer. This means that the user needs to
11163 #. be careful not to reuse the user-space buffer it spliced into
11164 #. the kernel-space one (contrast this to "write()", which copies
11165 #. the actual data, and you can thus reuse the buffer immediately
11166 #. after a successful write), but that is often easy to do.
11167 #. type: Plain text
11168 #: build/C/man2/vmsplice.2:57
11170 "The B<vmsplice>() system call maps I<nr_segs> ranges of user memory "
11171 "described by I<iov> into a pipe. The file descriptor I<fd> must refer to a "
11174 "B<vmsplice>() システムコールは、 I<iov> で指定されたユーザ・メモリの "
11175 "I<nr_segs> の範囲をパイプにマッピングする。 I<fd> はパイプを参照していなけれ"
11178 #. type: Plain text
11179 #: build/C/man2/vmsplice.2:64
11181 "The pointer I<iov> points to an array of I<iovec> structures as defined in "
11182 "I<E<lt>sys/uio.hE<gt>>:"
11184 "ポインタ I<iov> は I<iovec> 構造体の配列を指す。 I<iovec> 構造体は "
11185 "I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
11187 #. type: Plain text
11188 #: build/C/man2/vmsplice.2:71
11192 " void *iov_base; /* Starting address */\n"
11193 " size_t iov_len; /* Number of bytes */\n"
11197 " void *iov_base; /* 開始アドレス */\n"
11198 " size_t iov_len; /* バイト数 */\n"
11201 #. type: Plain text
11202 #: build/C/man2/vmsplice.2:84
11203 msgid "Unused for B<vmsplice>(); see B<splice>(2)."
11204 msgstr "B<vmsplice>() では未使用。 B<splice>(2) 参照。"
11206 #. type: Plain text
11207 #: build/C/man2/vmsplice.2:97
11209 "Currently has no effect for B<vmsplice>(), but may be implemented in the "
11210 "future; see B<splice>(2)."
11212 "現在のところ B<vmsplice>() では何の効果もないが、将来的には実装される可能性"
11213 "がある。 B<splice>(2) 参照。"
11215 #. FIXME Explain the following line in a little more detail:
11216 #. .... if we expect to later SPLICE_F_MOVE to the cache.
11217 #. type: Plain text
11218 #: build/C/man2/vmsplice.2:113
11220 "The user pages are a gift to the kernel. The application may not modify "
11221 "this memory ever, or page cache and on-disk data may differ. Gifting pages "
11222 "to the kernel means that a subsequent B<splice>(2) B<SPLICE_F_MOVE> can "
11223 "successfully move the pages; if this flag is not specified, then a "
11224 "subsequent B<splice>(2) B<SPLICE_F_MOVE> must copy the pages. Data must "
11225 "also be properly page aligned, both in memory and length."
11227 "ユーザ・ページがカーネルへ渡すもの (gift) であることを示す。 アプリケーション"
11228 "はこのメモリを絶対に変更してはならない。 さもなければ、ページキャッシュとディ"
11229 "スク上のデータは 一致しなくなるだろう。 ページをカーネルに渡すと、この次の "
11230 "B<splice>(2) B<SPLICE_F_MOVE> でそのページの移動を行うことができる。 このフ"
11231 "ラグが指定されなかった場合、この次の B<splice>(2) B<SPLICE_F_MOVE> でその"
11232 "ページのコピーを行わなければならない。 データはメモリ上でページ境界にあってい"
11233 "なければならず、 長さもページ境界の倍数でなければならない。"
11235 #. type: Plain text
11236 #: build/C/man2/vmsplice.2:122
11238 "Upon successful completion, B<vmsplice>() returns the number of bytes "
11239 "transferred to the pipe. On error, B<vmsplice>() returns -1 and I<errno> "
11240 "is set to indicate the error."
11242 "成功して完了すると、 B<vmsplice>() はパイプに転送したバイト数を返す。 エラー"
11243 "の場合、 B<vmplice>() は -1 を返し、 I<errno> をエラーを示す値に設定する。"
11245 #. type: Plain text
11246 #: build/C/man2/vmsplice.2:127
11247 msgid "I<fd> either not valid, or doesn't refer to a pipe."
11248 msgstr "I<fd> が有効でない、もしくはパイプを参照していない。"
11250 #. type: Plain text
11251 #: build/C/man2/vmsplice.2:135
11253 "I<nr_segs> is 0 or greater than B<IOV_MAX>; or memory not aligned if "
11254 "B<SPLICE_F_GIFT> set."
11256 "I<nr_segs> が 0 もしくは B<IOV_MAX> よりも大きい。または B<SPLICE_F_GIFT> が"
11257 "設定されたがメモリがページ境界にあっていない。"
11259 #. type: Plain text
11260 #: build/C/man2/vmsplice.2:143
11262 "The B<vmsplice>() system call first appeared in Linux 2.6.17; library "
11263 "support was added to glibc in version 2.5."
11265 "B<vmsplice>() システムコールは Linux 2.6.17 で初めて登場した。\n"
11266 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
11268 #. type: Plain text
11269 #: build/C/man2/vmsplice.2:154
11271 "B<vmsplice>() follows the other vectorized read/write type functions when "
11272 "it comes to limitations on number of segments being passed in. This limit "
11273 "is B<IOV_MAX> as defined in I<E<lt>limits.hE<gt>>. At the time of this "
11274 "writing, that limit is 1024."
11276 "指定されたセグメント数が上限に達した場合、 B<vmsplice>() は他のベクトル形式"
11277 "の read/write を行う関数と同じ動作をする。 上限は B<IOV_MAX> であり、 "
11278 "I<E<lt>limits.hE<gt>> で定義されている。 このドキュメントを書いた時点での値"
11281 #. type: Plain text
11282 #: build/C/man2/vmsplice.2:157
11283 msgid "B<splice>(2), B<tee>(2)"
11284 msgstr "B<splice>(2), B<tee>(2)"
11286 #~ msgid "2010-08-29"
11287 #~ msgstr "2010-08-29"
11290 #~ "Depending on which operation was executed, the returned value for a "
11291 #~ "successful call can have differing meanings."
11292 #~ msgstr "どの操作が実行されたかによって、 成功時の返り値の意味が変わる。"
11295 #~ "Returns 0 if the process was woken by a B<FUTEX_WAKE> call. In case of "
11296 #~ "timeout, the operation fails with the error B<ETIMEDOUT>. If the futex "
11297 #~ "was not equal to the expected value, the operation fails with the error "
11298 #~ "B<EWOULDBLOCK>. Signals (see B<signal>(7)) or other spurious wakeups "
11299 #~ "cause B<FUTEX_WAIT> to fail with the error B<EINTR>."
11301 #~ "プロセスが B<FUTEX_WAKE> の呼び出しで wake すると 0 を返す。 タイムアウト"
11302 #~ "の場合、操作はエラー B<ETIMEOUT> で失敗する。 futex が指定された値と等しく"
11303 #~ "ない場合、 エラー B<EWOULDBLOCK> で失敗する。 シグナルを受信するか "
11304 #~ "(B<signal>(7) 参照) 他の偽の wake があった場合には、エラー B<EINTR> で失"
11307 #~ msgid "An operation was not defined or error in page alignment."
11309 #~ "操作が定義されていない。またはページ・アラインメントでエラーが発生した。"
11311 #~ msgid "2010-11-04"
11312 #~ msgstr "2010-11-04"
11314 #~ msgid "2007-06-01"
11315 #~ msgstr "2007-06-01"
11317 #~ msgid "1995-11-29"
11318 #~ msgstr "1995-11-29"
11320 #~ msgid "2012-04-26"
11321 #~ msgstr "2012-04-26"
11323 #~ msgid "2004-09-10"
11324 #~ msgstr "2004-09-10"
11326 #~ msgid "2009-09-15"
11327 #~ msgstr "2009-09-15"
11329 #~ msgid "The B<splice>() system call first appeared in Linux 2.6.17."
11330 #~ msgstr "B<splice>() システムコールは Linux 2.6.17 で初めて登場した。"
11332 #~ msgid "The B<tee>() system call first appeared in Linux 2.6.17."
11333 #~ msgstr "B<tee>() システムコールは Linux 2.6.17 で初めて登場した。"
11337 #~| "Indicates that this process is to be traced by its parent. Any signal "
11338 #~| "(except B<SIGKILL>) delivered to this process will cause it to stop and "
11339 #~| "its parent to be notified via B<wait>(2). Also, all subsequent calls to "
11340 #~| "B<execve>(2) by this process will cause a B<SIGTRAP> to be sent to it, "
11341 #~| "giving the parent a chance to gain control before the new program begins "
11342 #~| "execution. A process probably shouldn't make this request if its parent "
11343 #~| "isn't expecting to trace it. (I<pid>, I<addr>, and I<data> are ignored.)"
11345 #~ "Indicate that this process is to be traced by its parent. Any signal "
11346 #~ "(except B<SIGKILL>) delivered to this process will cause it to stop and "
11347 #~ "its parent to be notified via B<waitpid>(2). In addition, all subsequent "
11348 #~ "calls to B<execve>(2) by the traced process will cause a B<SIGTRAP> to "
11349 #~ "be sent to it, giving the parent a chance to gain control before the new "
11350 #~ "program begins execution. A process probably shouldn't make this request "
11351 #~ "if its parent isn't expecting to trace it. (I<pid>, I<addr>, and I<data> "
11354 #~ "このプロセスが親プロセスによってトレースされることを表す。 このプロセスに "
11355 #~ "(B<SIGKILL> 以外の) シグナルが配送されると、 プロセスは停止し、親プロセス"
11356 #~ "に B<wait>(2) を通じて通知される。 また、これ以降はこのプロセスが "
11357 #~ "B<execve>(2) を呼び出す度に B<SIGTRAP> が送信されるようになる。 これに"
11358 #~ "よって、親プロセスは 新しいプログラムが実行を開始する前に制御することがで"
11359 #~ "きる。 親プロセスが自プロセスをトレースするつもりがない場合には、 おそらく"
11360 #~ "このプロセスは本要求を行うべきではないだろう。 (I<pid>, I<addr>, I<data> "
11364 #~ "Stop the child at the next B<execve>(2) call with I<SIGTRAP | "
11365 #~ "PTRACE_EVENT_EXEC\\ E<lt>E<lt>\\ 8>."
11367 #~ "次の B<execve>(2) 呼び出し時に I<SIGTRAP | PTRACE_EVENT_EXEC\\ E<lt>E<lt>"
11368 #~ "\\ 8> で子プロセスの動作を停止させる。"
11371 #~ "Stop the child at the completion of the next B<vfork>(2) call with "
11372 #~ "I<SIGTRAP | PTRACE_EVENT_VFORK_DONE\\ E<lt>E<lt>\\ 8>."
11374 #~ "次の B<vfork>(2) 呼び出し時に I<SIGTRAP | PTRACE_EVENT_VFORK_DONE\\ "
11375 #~ "E<lt>E<lt>\\ 8> で子プロセスの動作を停止させる。"
11378 #~ "Attaches to the process specified in I<pid>, making it a traced \"child\" "
11379 #~ "of the calling process; the behavior of the child is as if it had done a "
11380 #~ "B<PTRACE_TRACEME>. The calling process actually becomes the parent of "
11381 #~ "the child process for most purposes (e.g., it will receive notification "
11382 #~ "of child events and appears in B<ps>(1) output as the child's parent), "
11383 #~ "but a B<getppid>(2) by the child will still return the PID of the "
11384 #~ "original parent. The child is sent a B<SIGSTOP>, but will not "
11385 #~ "necessarily have stopped by the completion of this call; use B<wait>(2) "
11386 #~ "to wait for the child to stop. (I<addr> and I<data> are ignored.)"
11388 #~ "I<pid> で指定されたプロセスに接続 (attach) し、それを呼び出し元のプロセス"
11389 #~ "の 子プロセスとしてトレースできるようにする。子プロセスは "
11390 #~ "B<PTRACE_TRACEME> したかのように振舞う。呼び出し元のプロセスはそのほとんど"
11391 #~ "の目的において、 その子プロセスの実際の親になる (例えば、子プロセスのイベ"
11392 #~ "ントの 通知を受けとったり、 B<ps>(1) で親として表示されたりする)。しか"
11393 #~ "し、子プロセスで B<getppid>(2) を実行した場合には元の親プロセスの PID が"
11394 #~ "返される。 子プロセスには B<SIGSTOP> が送られるが、この呼び出しが完了する"
11395 #~ "までに 必ずしも停止するとは限らない。子プロセスの停止を待つには B<wait>"
11396 #~ "(2) を使用すること。(I<addr> と I<data> は無視される。)"
11399 #~ "Tracing causes a few subtle differences in the semantics of traced "
11400 #~ "processes. For example, if a process is attached to with "
11401 #~ "B<PTRACE_ATTACH>, its original parent can no longer receive notification "
11402 #~ "via B<wait>(2) when it stops, and there is no way for the new parent to "
11403 #~ "effectively simulate this notification."
11405 #~ "トレースすることによってトレースされるプロセスの動作に些細な違いが 起こる"
11406 #~ "ことがある。例えば、プロセスが B<PTRACE_ATTACH> によって接続された場合に"
11407 #~ "は、そのプロセスが停止した時でも本来の親は B<wait>(2) を使って通知を受け"
11408 #~ "ることができず、新しい親が効率よく この通知を真似る方法もない。"
11411 #~ "When the parent receives an event with B<PTRACE_EVENT_*> set, the child "
11412 #~ "is not in the normal signal delivery path. This means the parent cannot "
11413 #~ "do B<ptrace>(PTRACE_CONT) with a signal or B<ptrace>(PTRACE_KILL). "
11414 #~ "B<kill>(2) with a B<SIGKILL> signal can be used instead to kill the "
11415 #~ "child process after receiving one of these messages."
11417 #~ "親プロセスが B<PTRACE_EVENT_*> がセットされたイベントを受信した場合、 子プ"
11418 #~ "ロセスは通常通りのシグナル配送が行われる状態にない。 つまり、親プロセス"
11419 #~ "が、 シグナルにより B<ptrace>(PTRACE_CONT) を行ったり、 B<ptrace>"
11420 #~ "(PTRACE_KILL) を行ったりできないということである。 こららのメッセージの受"
11421 #~ "信後は、子プロセスを終了 (kill) するのに、 シグナル B<SIGKILL> を指定して "
11422 #~ "B<kill>(2) を行う方法を代わりに使用できる。"
11425 #~ "The SunOS man page describes B<ptrace>() as \"unique and arcane\", which "
11426 #~ "it is. The proc-based debugging interface present in Solaris 2 "
11427 #~ "implements a superset of B<ptrace>() functionality in a more powerful "
11428 #~ "and uniform way."
11430 #~ "SunOS のマニュアル・ページには B<ptrace>() は「独特で不可解」と記述されて"
11431 #~ "おり、まさしくそうである。 Solaris 2 では proc ベースの デバッグのインター"
11432 #~ "フェースとして B<ptrace>() の上位互換関数が実装され、より強力で一貫性のあ"
11435 #~ msgid "B<#include E<lt>sys/quota.hE<gt>>\n"
11436 #~ msgstr "B<#include E<lt>sys/quota.hE<gt>>\n"
11439 #~ "The second argument I<special> is the block special device these quota "
11440 #~ "apply to. It must be mounted."
11442 #~ "二番目の引き数 I<special> は quota を適用するデバイスのブロック・スペシャ"
11443 #~ "ル・ファイルである。 そのデバイスはマウントされていなくてはならない。"
11446 #~ "The third argument I<id> is the user or group ID these quota apply to "
11447 #~ "(when relevant)."
11449 #~ "三番目の引き数 I<id> には、(必要な場合に) quota を適用するユーザーもしくは"
11450 #~ "グループの ID を指定する。"
11453 #~ "The fourth argument I<addr> is the address of a data structure, depending "
11454 #~ "on the command."
11456 #~ "四番目の引き数 I<addr> には、コマンドごとに異ったデータ構造体のアドレスを"
11460 #~ "Enable quota. The I<addr> argument is the pathname of the file "
11461 #~ "containing the quota for the file system."
11463 #~ "quota を有効にする。 I<addr> 引き数には、そのファイル・システムの quota が"
11464 #~ "記録されているファイルの パス名を指定する。"
11466 #~ msgid "Disable quota."
11467 #~ msgstr "quota を無効にする。"
11469 #~ msgid "Set limits and current usage; I<addr> is as before."
11470 #~ msgstr "制限値と現在の使用量を設定する: I<addr> は同上。"
11472 #~ msgid "Set limits; I<addr> is as before."
11473 #~ msgstr "制限値を設定する; I<addr> は同上。"
11475 #~ msgid "B<Q_SETUSE>"
11476 #~ msgstr "B<Q_SETUSE>"
11478 #~ msgid "Set usage."
11479 #~ msgstr "使用量を設定する。"
11481 #~ msgid "Sync disk copy of a file system's quota."
11482 #~ msgstr "ファイル・システムの quota ファイルをディスクと同期させる。"
11484 #~ msgid "Get collected stats."
11485 #~ msgstr "収集された統計を取得する。"
11488 #~ "On success, B<quotactl>() returns 0. On error, -1 is returned, and "
11489 #~ "I<errno> is set appropriately."
11491 #~ "B<quotactl>() は、成功時には 0 を返す。エラー時は、-1 を返すとともに、 "
11492 #~ "I<errno> が適切な値に設定される。"
11494 #~ msgid "B<Q_QUOTAON> was asked, but quotas were enabled already."
11495 #~ msgstr "B<Q_QUOTAON> の要求がなされたが、quota(s) は既に有効になっている。"
11497 #~ msgid "Bad I<addr> value."
11498 #~ msgstr "I<addr> の値に誤りがある。"
11501 #~ "I<type> is not a known quota type. Or, I<special> could not be found."
11503 #~ "I<type> が既知の quota の形式ではない。もしくは、 I<special> デバイスが見"
11506 #~ msgid "Cannot read or write the quota file."
11507 #~ msgstr "quota ファイルへの読み書きが出来ない。"
11509 #~ msgid "B<EMFILE>"
11510 #~ msgstr "B<EMFILE>"
11512 #~ msgid "Too many open files: cannot open quota file."
11513 #~ msgstr "ファイルをオープンしすぎている: quota ファイルをオープン出来ない。"
11515 #~ msgid "I<special> cannot be found in the mount table."
11516 #~ msgstr "I<special> がマウント・テーブル内に見当たらない。"
11518 #~ msgid "B<ENOPKG>"
11519 #~ msgstr "B<ENOPKG>"
11521 #~ msgid "The kernel was compiled without quota support."
11522 #~ msgstr "quota を使用可にしてカーネルをコンパイルしていない。"
11525 #~ "The process was not root (for the file system), and B<Q_GETQUOTA> was "
11526 #~ "asked for another I<id> than that of the process itself, or anything "
11527 #~ "other than B<Q_GETSTATS> or B<Q_SYNC> was asked."
11529 #~ "プロセスが (そのファイル・システムの) root のものではなく、 かつプロセス自"
11530 #~ "身のものとは異なる I<id> に対して B<Q_GETQUOTA> 要求を行なった。 もしく"
11531 #~ "は、 B<Q_GETSTATS>, B<Q_SYNC> 以外の要求がなされた。"
11534 #~ "B<Q_GETQUOTA> or B<Q_SETQUOTA> or B<Q_SETUSE> or B<Q_SETQLIM> was asked "
11535 #~ "for a file system that didn't have quota enabled."
11537 #~ "quota が有効になっていないファイル・システムに対して B<Q_GETQUOTA>, "
11538 #~ "B<Q_SETQUOTA>, B<Q_SETUSE>, B<Q_SETQLIM> のいずれかの要求がなされた。"