OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.40.
[linuxjm/LDP_man-pages.git] / po4a / man2 / po / man2.pot
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2012-05-01 04:38+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=CHARSET\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: build/C/man2/arch_prctl.2:24
21 #, no-wrap
22 msgid "ARCH_PRCTL"
23 msgstr ""
24
25 #. type: TH
26 #: build/C/man2/arch_prctl.2:24
27 #, no-wrap
28 msgid "2007-12-26"
29 msgstr ""
30
31 #. type: TH
32 #: build/C/man2/arch_prctl.2:24 build/C/man2/futex.2:17 build/C/man2/kexec_load.2:25 build/C/man2/lookup_dcookie.2:27 build/C/man2/modify_ldt.2:25 build/C/man2/nfsservctl.2:8 build/C/man2/outb.2:28 build/C/man2/pciconfig_read.2:5 build/C/man2/personality.2:30 build/C/man2/pivot_root.2:7 build/C/man2/ptrace.2:49 build/C/man2/quotactl.2:25 build/C/man2/sendfile.2:15 build/C/man2/set_tid_address.2:23 build/C/man2/splice.2:26 build/C/man2/tee.2:26 build/C/man2/vm86.2:26 build/C/man2/vmsplice.2:26
33 #, no-wrap
34 msgid "Linux"
35 msgstr ""
36
37 #. type: TH
38 #: build/C/man2/arch_prctl.2:24 build/C/man2/futex.2:17 build/C/man2/kexec_load.2:25 build/C/man2/lookup_dcookie.2:27 build/C/man2/modify_ldt.2:25 build/C/man2/nfsservctl.2:8 build/C/man2/outb.2:28 build/C/man2/pciconfig_read.2:5 build/C/man2/personality.2:30 build/C/man2/pivot_root.2:7 build/C/man2/ptrace.2:49 build/C/man2/quotactl.2:25 build/C/man2/sendfile.2:15 build/C/man2/set_tid_address.2:23 build/C/man2/splice.2:26 build/C/man2/tee.2:26 build/C/man2/vm86.2:26 build/C/man2/vmsplice.2:26
39 #, no-wrap
40 msgid "Linux Programmer's Manual"
41 msgstr ""
42
43 #. type: SH
44 #: build/C/man2/arch_prctl.2:25 build/C/man2/futex.2:18 build/C/man2/kexec_load.2:26 build/C/man2/lookup_dcookie.2:28 build/C/man2/modify_ldt.2:26 build/C/man2/nfsservctl.2:9 build/C/man2/outb.2:29 build/C/man2/pciconfig_read.2:6 build/C/man2/personality.2:31 build/C/man2/pivot_root.2:8 build/C/man2/ptrace.2:50 build/C/man2/quotactl.2:26 build/C/man2/sendfile.2:16 build/C/man2/set_tid_address.2:24 build/C/man2/splice.2:27 build/C/man2/tee.2:27 build/C/man2/vm86.2:27 build/C/man2/vmsplice.2:27
45 #, no-wrap
46 msgid "NAME"
47 msgstr ""
48
49 #. type: Plain text
50 #: build/C/man2/arch_prctl.2:27
51 msgid "arch_prctl - set architecture-specific thread state"
52 msgstr ""
53
54 #. type: SH
55 #: build/C/man2/arch_prctl.2:27 build/C/man2/futex.2:20 build/C/man2/kexec_load.2:28 build/C/man2/lookup_dcookie.2:30 build/C/man2/modify_ldt.2:28 build/C/man2/nfsservctl.2:11 build/C/man2/pciconfig_read.2:8 build/C/man2/personality.2:33 build/C/man2/pivot_root.2:10 build/C/man2/ptrace.2:52 build/C/man2/quotactl.2:28 build/C/man2/sendfile.2:18 build/C/man2/set_tid_address.2:26 build/C/man2/splice.2:29 build/C/man2/tee.2:29 build/C/man2/vm86.2:29 build/C/man2/vmsplice.2:29
56 #, no-wrap
57 msgid "SYNOPSIS"
58 msgstr ""
59
60 #. type: Plain text
61 #: build/C/man2/arch_prctl.2:30
62 #, no-wrap
63 msgid "B<#include E<lt>asm/prctl.hE<gt>>\n"
64 msgstr ""
65
66 #. type: Plain text
67 #: build/C/man2/arch_prctl.2:32
68 #, no-wrap
69 msgid "B<#include E<lt>sys/prctl.hE<gt>>\n"
70 msgstr ""
71
72 #. type: Plain text
73 #: build/C/man2/arch_prctl.2:35
74 #, no-wrap
75 msgid ""
76 "B<int arch_prctl(int >I<code>B<, unsigned long >I<addr>B<);>\n"
77 "B<int arch_prctl(int >I<code>B<, unsigned long *>I<addr>B<);>\n"
78 msgstr ""
79
80 #.  Return type was long before glibc 2.7
81 #. type: SH
82 #: build/C/man2/arch_prctl.2:36 build/C/man2/futex.2:32 build/C/man2/kexec_load.2:35 build/C/man2/lookup_dcookie.2:32 build/C/man2/modify_ldt.2:34 build/C/man2/nfsservctl.2:18 build/C/man2/outb.2:33 build/C/man2/pciconfig_read.2:19 build/C/man2/personality.2:37 build/C/man2/pivot_root.2:12 build/C/man2/ptrace.2:59 build/C/man2/quotactl.2:36 build/C/man2/sendfile.2:43 build/C/man2/set_tid_address.2:32 build/C/man2/splice.2:39 build/C/man2/tee.2:38 build/C/man2/vm86.2:35 build/C/man2/vmsplice.2:39
83 #, no-wrap
84 msgid "DESCRIPTION"
85 msgstr ""
86
87 #. type: Plain text
88 #: build/C/man2/arch_prctl.2:51
89 msgid ""
90 "The B<arch_prctl>()  function sets architecture-specific process or thread "
91 "state.  I<code> selects a subfunction and passes argument I<addr> to it; "
92 "I<addr> is interpreted as either an I<unsigned long> for the \"set\" "
93 "operations, or as an I<unsigned long *>, for the \"get\" operations."
94 msgstr ""
95
96 #. type: Plain text
97 #: build/C/man2/arch_prctl.2:53
98 msgid "Sub functions for x86-64 are:"
99 msgstr ""
100
101 #. type: TP
102 #: build/C/man2/arch_prctl.2:53
103 #, no-wrap
104 msgid "B<ARCH_SET_FS>"
105 msgstr ""
106
107 #. type: Plain text
108 #: build/C/man2/arch_prctl.2:59
109 msgid "Set the 64-bit base for the I<FS> register to I<addr>."
110 msgstr ""
111
112 #. type: TP
113 #: build/C/man2/arch_prctl.2:59
114 #, no-wrap
115 msgid "B<ARCH_GET_FS>"
116 msgstr ""
117
118 #. type: Plain text
119 #: build/C/man2/arch_prctl.2:67
120 msgid ""
121 "Return the 64-bit base value for the I<FS> register of the current thread in "
122 "the I<unsigned long> pointed to by I<addr>."
123 msgstr ""
124
125 #. type: TP
126 #: build/C/man2/arch_prctl.2:67
127 #, no-wrap
128 msgid "B<ARCH_SET_GS>"
129 msgstr ""
130
131 #. type: Plain text
132 #: build/C/man2/arch_prctl.2:73
133 msgid "Set the 64-bit base for the I<GS> register to I<addr>."
134 msgstr ""
135
136 #. type: TP
137 #: build/C/man2/arch_prctl.2:73
138 #, no-wrap
139 msgid "B<ARCH_GET_GS>"
140 msgstr ""
141
142 #. type: Plain text
143 #: build/C/man2/arch_prctl.2:81
144 msgid ""
145 "Return the 64-bit base value for the I<GS> register of the current thread in "
146 "the I<unsigned long> pointed to by I<addr>."
147 msgstr ""
148
149 #. type: SH
150 #: build/C/man2/arch_prctl.2:81 build/C/man2/futex.2:173 build/C/man2/kexec_load.2:110 build/C/man2/lookup_dcookie.2:43 build/C/man2/modify_ldt.2:96 build/C/man2/nfsservctl.2:51 build/C/man2/pciconfig_read.2:47 build/C/man2/personality.2:55 build/C/man2/pivot_root.2:95 build/C/man2/ptrace.2:1580 build/C/man2/sendfile.2:104 build/C/man2/set_tid_address.2:80 build/C/man2/splice.2:127 build/C/man2/tee.2:85 build/C/man2/vm86.2:52 build/C/man2/vmsplice.2:113
151 #, no-wrap
152 msgid "RETURN VALUE"
153 msgstr ""
154
155 #. type: Plain text
156 #: build/C/man2/arch_prctl.2:87
157 msgid ""
158 "On success, B<arch_prctl>()  returns 0; on error, -1 is returned, and "
159 "I<errno> is set to indicate the error."
160 msgstr ""
161
162 #. type: SH
163 #: build/C/man2/arch_prctl.2:87 build/C/man2/futex.2:210 build/C/man2/kexec_load.2:117 build/C/man2/lookup_dcookie.2:50 build/C/man2/modify_ldt.2:106 build/C/man2/pciconfig_read.2:74 build/C/man2/personality.2:62 build/C/man2/pivot_root.2:99 build/C/man2/ptrace.2:1594 build/C/man2/quotactl.2:425 build/C/man2/sendfile.2:111 build/C/man2/set_tid_address.2:83 build/C/man2/splice.2:142 build/C/man2/tee.2:100 build/C/man2/vm86.2:57 build/C/man2/vmsplice.2:122
164 #, no-wrap
165 msgid "ERRORS"
166 msgstr ""
167
168 #. type: TP
169 #: build/C/man2/arch_prctl.2:88 build/C/man2/futex.2:222 build/C/man2/lookup_dcookie.2:51 build/C/man2/modify_ldt.2:107 build/C/man2/ptrace.2:1598 build/C/man2/quotactl.2:426 build/C/man2/sendfile.2:121 build/C/man2/vm86.2:58
170 #, no-wrap
171 msgid "B<EFAULT>"
172 msgstr ""
173
174 #. type: Plain text
175 #: build/C/man2/arch_prctl.2:92
176 msgid ""
177 "I<addr> points to an unmapped address or is outside the process address "
178 "space."
179 msgstr ""
180
181 #. type: TP
182 #: build/C/man2/arch_prctl.2:92 build/C/man2/futex.2:227 build/C/man2/kexec_load.2:122 build/C/man2/lookup_dcookie.2:54 build/C/man2/modify_ldt.2:111 build/C/man2/pciconfig_read.2:75 build/C/man2/personality.2:63 build/C/man2/pivot_root.2:108 build/C/man2/ptrace.2:1609 build/C/man2/quotactl.2:432 build/C/man2/quotactl.2:499 build/C/man2/sendfile.2:124 build/C/man2/splice.2:147 build/C/man2/tee.2:101 build/C/man2/vmsplice.2:127
183 #, no-wrap
184 msgid "B<EINVAL>"
185 msgstr ""
186
187 #. type: Plain text
188 #: build/C/man2/arch_prctl.2:96
189 msgid "I<code> is not a valid subcommand."
190 msgstr ""
191
192 #. type: TP
193 #: build/C/man2/arch_prctl.2:96 build/C/man2/kexec_load.2:129 build/C/man2/lookup_dcookie.2:65 build/C/man2/pciconfig_read.2:102 build/C/man2/pivot_root.2:114 build/C/man2/ptrace.2:1619 build/C/man2/quotactl.2:454 build/C/man2/vm86.2:66
194 #, no-wrap
195 msgid "B<EPERM>"
196 msgstr ""
197
198 #.  .SH AUTHOR
199 #.  Man page written by Andi Kleen.
200 #. type: Plain text
201 #: build/C/man2/arch_prctl.2:102
202 msgid "I<addr> is outside the process address space."
203 msgstr ""
204
205 #. type: SH
206 #: build/C/man2/arch_prctl.2:102 build/C/man2/futex.2:247 build/C/man2/kexec_load.2:138 build/C/man2/lookup_dcookie.2:78 build/C/man2/modify_ldt.2:128 build/C/man2/nfsservctl.2:56 build/C/man2/outb.2:58 build/C/man2/pciconfig_read.2:107 build/C/man2/personality.2:66 build/C/man2/pivot_root.2:122 build/C/man2/ptrace.2:1637 build/C/man2/sendfile.2:144 build/C/man2/set_tid_address.2:89 build/C/man2/splice.2:169 build/C/man2/tee.2:118 build/C/man2/vm86.2:71 build/C/man2/vmsplice.2:142
207 #, no-wrap
208 msgid "CONFORMING TO"
209 msgstr ""
210
211 #. type: Plain text
212 #: build/C/man2/arch_prctl.2:106
213 msgid ""
214 "B<arch_prctl>()  is a Linux/x86-64 extension and should not be used in "
215 "programs intended to be portable."
216 msgstr ""
217
218 #. type: SH
219 #: build/C/man2/arch_prctl.2:106 build/C/man2/futex.2:249 build/C/man2/kexec_load.2:140 build/C/man2/lookup_dcookie.2:81 build/C/man2/modify_ldt.2:131 build/C/man2/pivot_root.2:125 build/C/man2/ptrace.2:1639 build/C/man2/sendfile.2:151 build/C/man2/splice.2:171 build/C/man2/tee.2:120 build/C/man2/vmsplice.2:144
220 #, no-wrap
221 msgid "NOTES"
222 msgstr ""
223
224 #. type: Plain text
225 #: build/C/man2/arch_prctl.2:109
226 msgid ""
227 "B<arch_prctl>()  is only supported on Linux/x86-64 for 64-bit programs "
228 "currently."
229 msgstr ""
230
231 #. type: Plain text
232 #: build/C/man2/arch_prctl.2:111
233 msgid "The 64-bit base changes when a new 32-bit segment selector is loaded."
234 msgstr ""
235
236 #. type: Plain text
237 #: build/C/man2/arch_prctl.2:114
238 msgid "B<ARCH_SET_GS> is disabled in some kernels."
239 msgstr ""
240
241 #. type: Plain text
242 #: build/C/man2/arch_prctl.2:129
243 msgid ""
244 "Context switches for 64-bit segment bases are rather expensive.  It may be a "
245 "faster alternative to set a 32-bit base using a segment selector by setting "
246 "up an LDT with B<modify_ldt>(2)  or using the B<set_thread_area>(2)  system "
247 "call in kernel 2.5 or later.  B<arch_prctl>()  is only needed when you want "
248 "to set bases that are larger than 4GB.  Memory in the first 2GB of address "
249 "space can be allocated by using B<mmap>(2)  with the B<MAP_32BIT> flag."
250 msgstr ""
251
252 #. type: Plain text
253 #: build/C/man2/arch_prctl.2:134
254 msgid ""
255 "As of version 2.7, glibc provides no prototype for B<arch_prctl>().  You "
256 "have to declare it yourself for now.  This may be fixed in future glibc "
257 "versions."
258 msgstr ""
259
260 #. type: Plain text
261 #: build/C/man2/arch_prctl.2:137
262 msgid "I<FS> may be already used by the threading library."
263 msgstr ""
264
265 #. type: SH
266 #: build/C/man2/arch_prctl.2:137 build/C/man2/futex.2:263 build/C/man2/kexec_load.2:155 build/C/man2/modify_ldt.2:134 build/C/man2/outb.2:67 build/C/man2/pciconfig_read.2:109 build/C/man2/pivot_root.2:137 build/C/man2/ptrace.2:1746 build/C/man2/quotactl.2:505 build/C/man2/sendfile.2:193 build/C/man2/set_tid_address.2:91 build/C/man2/splice.2:225 build/C/man2/tee.2:196 build/C/man2/vmsplice.2:153
267 #, no-wrap
268 msgid "SEE ALSO"
269 msgstr ""
270
271 #. type: Plain text
272 #: build/C/man2/arch_prctl.2:142
273 msgid "B<mmap>(2), B<modify_ldt>(2), B<prctl>(2), B<set_thread_area>(2)"
274 msgstr ""
275
276 #. type: Plain text
277 #: build/C/man2/arch_prctl.2:144
278 msgid "AMD X86-64 Programmer's manual"
279 msgstr ""
280
281 #. type: SH
282 #: build/C/man2/arch_prctl.2:144 build/C/man2/futex.2:274 build/C/man2/kexec_load.2:158 build/C/man2/lookup_dcookie.2:88 build/C/man2/modify_ldt.2:136 build/C/man2/nfsservctl.2:58 build/C/man2/outb.2:70 build/C/man2/pciconfig_read.2:111 build/C/man2/personality.2:70 build/C/man2/pivot_root.2:143 build/C/man2/ptrace.2:1760 build/C/man2/quotactl.2:510 build/C/man2/sendfile.2:199 build/C/man2/set_tid_address.2:94 build/C/man2/splice.2:229 build/C/man2/tee.2:199 build/C/man2/vm86.2:74 build/C/man2/vmsplice.2:156
283 #, no-wrap
284 msgid "COLOPHON"
285 msgstr ""
286
287 #. type: Plain text
288 #: build/C/man2/arch_prctl.2:151 build/C/man2/futex.2:281 build/C/man2/kexec_load.2:165 build/C/man2/lookup_dcookie.2:95 build/C/man2/modify_ldt.2:143 build/C/man2/nfsservctl.2:65 build/C/man2/outb.2:77 build/C/man2/pciconfig_read.2:118 build/C/man2/personality.2:77 build/C/man2/pivot_root.2:150 build/C/man2/ptrace.2:1767 build/C/man2/quotactl.2:517 build/C/man2/sendfile.2:206 build/C/man2/set_tid_address.2:101 build/C/man2/splice.2:236 build/C/man2/tee.2:206 build/C/man2/vm86.2:81 build/C/man2/vmsplice.2:163
289 msgid ""
290 "This page is part of release 3.40 of the Linux I<man-pages> project.  A "
291 "description of the project, and information about reporting bugs, can be "
292 "found at http://www.kernel.org/doc/man-pages/."
293 msgstr ""
294
295 #. type: TH
296 #: build/C/man2/futex.2:17
297 #, no-wrap
298 msgid "FUTEX"
299 msgstr ""
300
301 #. type: TH
302 #: build/C/man2/futex.2:17
303 #, no-wrap
304 msgid "2010-08-29"
305 msgstr ""
306
307 #. type: Plain text
308 #: build/C/man2/futex.2:20
309 msgid "futex - Fast Userspace Locking system call"
310 msgstr ""
311
312 #. type: Plain text
313 #: build/C/man2/futex.2:25
314 #, no-wrap
315 msgid ""
316 "B<#include E<lt>linux/futex.hE<gt>>\n"
317 "B<#include E<lt>sys/time.hE<gt>>\n"
318 msgstr ""
319
320 #. type: Plain text
321 #: build/C/man2/futex.2:28
322 #, no-wrap
323 msgid ""
324 "B<int futex(int *>I<uaddr>B<, int >I<op>B<, int >I<val>B<, const struct "
325 "timespec *>I<timeout>B<,>\n"
326 msgstr ""
327
328 #.  int *? void *? u32 *?
329 #. type: Plain text
330 #: build/C/man2/futex.2:31
331 #, no-wrap
332 msgid "B<          int *>I<uaddr2>B<, int >I<val3>B<);>\n"
333 msgstr ""
334
335 #. type: Plain text
336 #: build/C/man2/futex.2:48
337 msgid ""
338 "The B<futex>()  system call provides a method for a program to wait for a "
339 "value at a given address to change, and a method to wake up anyone waiting "
340 "on a particular address (while the addresses for the same memory in separate "
341 "processes may not be equal, the kernel maps them internally so the same "
342 "memory mapped in different locations will correspond for B<futex>()  "
343 "calls).  This system call is typically used to implement the contended case "
344 "of a lock in shared memory, as described in B<futex>(7)."
345 msgstr ""
346
347 #. type: Plain text
348 #: build/C/man2/futex.2:55
349 msgid ""
350 "When a B<futex>(7)  operation did not finish uncontended in userspace, a "
351 "call needs to be made to the kernel to arbitrate.  Arbitration can either "
352 "mean putting the calling process to sleep or, conversely, waking a waiting "
353 "process."
354 msgstr ""
355
356 #. type: Plain text
357 #: build/C/man2/futex.2:62
358 msgid ""
359 "Callers of this function are expected to adhere to the semantics as set out "
360 "in B<futex>(7).  As these semantics involve writing nonportable assembly "
361 "instructions, this in turn probably means that most users will in fact be "
362 "library authors and not general application developers."
363 msgstr ""
364
365 #. type: Plain text
366 #: build/C/man2/futex.2:70
367 msgid ""
368 "The I<uaddr> argument needs to point to an aligned integer which stores the "
369 "counter.  The operation to execute is passed via the I<op> argument, along "
370 "with a value I<val>."
371 msgstr ""
372
373 #. type: Plain text
374 #: build/C/man2/futex.2:72
375 msgid "Five operations are currently defined:"
376 msgstr ""
377
378 #. type: TP
379 #: build/C/man2/futex.2:72 build/C/man2/futex.2:177
380 #, no-wrap
381 msgid "B<FUTEX_WAIT>"
382 msgstr ""
383
384 #. type: Plain text
385 #: build/C/man2/futex.2:90
386 msgid ""
387 "This operation atomically verifies that the futex address I<uaddr> still "
388 "contains the value I<val>, and sleeps awaiting B<FUTEX_WAKE> on this futex "
389 "address.  If the I<timeout> argument is non-NULL, its contents describe the "
390 "maximum duration of the wait, which is infinite otherwise.  The arguments "
391 "I<uaddr2> and I<val3> are ignored."
392 msgstr ""
393
394 #. type: Plain text
395 #: build/C/man2/futex.2:98
396 msgid ""
397 "For B<futex>(7), this call is executed if decrementing the count gave a "
398 "negative value (indicating contention), and will sleep until another process "
399 "releases the futex and executes the B<FUTEX_WAKE> operation."
400 msgstr ""
401
402 #. type: TP
403 #: build/C/man2/futex.2:98 build/C/man2/futex.2:194
404 #, no-wrap
405 msgid "B<FUTEX_WAKE>"
406 msgstr ""
407
408 #. type: Plain text
409 #: build/C/man2/futex.2:109
410 msgid ""
411 "This operation wakes at most I<val> processes waiting on this futex address "
412 "(i.e., inside B<FUTEX_WAIT>).  The arguments I<timeout>, I<uaddr2> and "
413 "I<val3> are ignored."
414 msgstr ""
415
416 #. type: Plain text
417 #: build/C/man2/futex.2:115
418 msgid ""
419 "For B<futex>(7), this is executed if incrementing the count showed that "
420 "there were waiters, once the futex value has been set to 1 (indicating that "
421 "it is available)."
422 msgstr ""
423
424 #. type: TP
425 #: build/C/man2/futex.2:115
426 #, no-wrap
427 msgid "B<FUTEX_FD> (present up to and including Linux 2.6.25)"
428 msgstr ""
429
430 #.  , suitable for .BR poll (2).
431 #. type: Plain text
432 #: build/C/man2/futex.2:131
433 msgid ""
434 "To support asynchronous wakeups, this operation associates a file descriptor "
435 "with a futex.  If another process executes a B<FUTEX_WAKE>, the process will "
436 "receive the signal number that was passed in I<val>.  The calling process "
437 "must close the returned file descriptor after use.  The arguments "
438 "I<timeout>, I<uaddr2> and I<val3> are ignored."
439 msgstr ""
440
441 #. type: Plain text
442 #: build/C/man2/futex.2:136
443 msgid ""
444 "To prevent race conditions, the caller should test if the futex has been "
445 "upped after B<FUTEX_FD> returns."
446 msgstr ""
447
448 #. type: Plain text
449 #: build/C/man2/futex.2:140
450 msgid ""
451 "Because it was inherently racy, B<FUTEX_FD> has been removed from Linux "
452 "2.6.26 onward."
453 msgstr ""
454
455 #. type: TP
456 #: build/C/man2/futex.2:140
457 #, no-wrap
458 msgid "B<FUTEX_REQUEUE> (since Linux 2.5.70)"
459 msgstr ""
460
461 #. type: Plain text
462 #: build/C/man2/futex.2:155
463 msgid ""
464 "This operation was introduced in order to avoid a \"thundering herd\" effect "
465 "when B<FUTEX_WAKE> is used and all processes woken up need to acquire "
466 "another futex.  This call wakes up I<val> processes, and requeues all other "
467 "waiters on the futex at address I<uaddr2>.  The arguments I<timeout> and "
468 "I<val3> are ignored."
469 msgstr ""
470
471 #. type: TP
472 #: build/C/man2/futex.2:155
473 #, no-wrap
474 msgid "B<FUTEX_CMP_REQUEUE> (since Linux 2.6.7)"
475 msgstr ""
476
477 #. type: Plain text
478 #: build/C/man2/futex.2:173
479 msgid ""
480 "There was a race in the intended use of B<FUTEX_REQUEUE>, so "
481 "B<FUTEX_CMP_REQUEUE> was introduced.  This is similar to B<FUTEX_REQUEUE>, "
482 "but first checks whether the location I<uaddr> still contains the value "
483 "I<val3>.  If not, the operation fails with the error B<EAGAIN>.  The "
484 "argument I<timeout> is ignored."
485 msgstr ""
486
487 #. type: Plain text
488 #: build/C/man2/futex.2:177
489 msgid ""
490 "Depending on which operation was executed, the returned value for a "
491 "successful call can have differing meanings."
492 msgstr ""
493
494 #. type: Plain text
495 #: build/C/man2/futex.2:194
496 msgid ""
497 "Returns 0 if the process was woken by a B<FUTEX_WAKE> call.  In case of "
498 "timeout, the operation fails with the error B<ETIMEDOUT>.  If the futex was "
499 "not equal to the expected value, the operation fails with the error "
500 "B<EWOULDBLOCK>.  Signals (see B<signal>(7))  or other spurious wakeups cause "
501 "B<FUTEX_WAIT> to fail with the error B<EINTR>."
502 msgstr ""
503
504 #. type: Plain text
505 #: build/C/man2/futex.2:197 build/C/man2/futex.2:203 build/C/man2/futex.2:206
506 msgid "Returns the number of processes woken up."
507 msgstr ""
508
509 #. type: TP
510 #: build/C/man2/futex.2:197
511 #, no-wrap
512 msgid "B<FUTEX_FD>"
513 msgstr ""
514
515 #. type: Plain text
516 #: build/C/man2/futex.2:200
517 msgid "Returns the new file descriptor associated with the futex."
518 msgstr ""
519
520 #. type: TP
521 #: build/C/man2/futex.2:200
522 #, no-wrap
523 msgid "B<FUTEX_REQUEUE>"
524 msgstr ""
525
526 #. type: TP
527 #: build/C/man2/futex.2:203
528 #, no-wrap
529 msgid "B<FUTEX_CMP_REQUEUE>"
530 msgstr ""
531
532 #. type: Plain text
533 #: build/C/man2/futex.2:210
534 msgid ""
535 "In the event of an error, all operations return -1, and set I<errno> to "
536 "indicate the error."
537 msgstr ""
538
539 #. type: TP
540 #: build/C/man2/futex.2:211 build/C/man2/quotactl.2:484
541 #, no-wrap
542 msgid "B<EACCES>"
543 msgstr ""
544
545 #. type: Plain text
546 #: build/C/man2/futex.2:214
547 msgid "No read access to futex memory."
548 msgstr ""
549
550 #. type: TP
551 #: build/C/man2/futex.2:214 build/C/man2/sendfile.2:112
552 #, no-wrap
553 msgid "B<EAGAIN>"
554 msgstr ""
555
556 #. type: Plain text
557 #: build/C/man2/futex.2:222
558 msgid ""
559 "B<FUTEX_CMP_REQUEUE> found an unexpected futex value.  (This probably "
560 "indicates a race; use the safe B<FUTEX_WAKE> now.)"
561 msgstr ""
562
563 #. type: Plain text
564 #: build/C/man2/futex.2:227
565 msgid "Error in getting I<timeout> information from userspace."
566 msgstr ""
567
568 #. type: Plain text
569 #: build/C/man2/futex.2:230
570 msgid "An operation was not defined or error in page alignment."
571 msgstr ""
572
573 #. type: TP
574 #: build/C/man2/futex.2:230
575 #, no-wrap
576 msgid "B<ENFILE>"
577 msgstr ""
578
579 #. type: Plain text
580 #: build/C/man2/futex.2:233
581 msgid "The system limit on the total number of open files has been reached."
582 msgstr ""
583
584 #. type: TP
585 #: build/C/man2/futex.2:233 build/C/man2/modify_ldt.2:124 build/C/man2/pciconfig_read.2:90 build/C/man2/quotactl.2:445 build/C/man2/vm86.2:62
586 #, no-wrap
587 msgid "B<ENOSYS>"
588 msgstr ""
589
590 #. type: Plain text
591 #: build/C/man2/futex.2:237
592 msgid "Invalid operation specified in I<op>."
593 msgstr ""
594
595 #. type: SH
596 #: build/C/man2/futex.2:237 build/C/man2/kexec_load.2:134 build/C/man2/lookup_dcookie.2:73 build/C/man2/pivot_root.2:119 build/C/man2/sendfile.2:138 build/C/man2/set_tid_address.2:86 build/C/man2/splice.2:165 build/C/man2/tee.2:114 build/C/man2/vmsplice.2:138
597 #, no-wrap
598 msgid "VERSIONS"
599 msgstr ""
600
601 #. type: Plain text
602 #: build/C/man2/futex.2:247
603 msgid ""
604 "Initial futex support was merged in Linux 2.5.7 but with different semantics "
605 "from what was described above.  A 4-argument system call with the semantics "
606 "described in this page was introduced in Linux 2.5.40.  In Linux 2.5.70 one "
607 "argument was added.  In Linux 2.6.7 a sixth argument was added\\(emmessy, "
608 "especially on the s390 architecture."
609 msgstr ""
610
611 #. type: Plain text
612 #: build/C/man2/futex.2:249 build/C/man2/kexec_load.2:140 build/C/man2/set_tid_address.2:91 build/C/man2/splice.2:171 build/C/man2/tee.2:120 build/C/man2/vmsplice.2:144
613 msgid "This system call is Linux-specific."
614 msgstr ""
615
616 #.  .SH "AUTHORS"
617 #.  .PP
618 #.  Futexes were designed and worked on by
619 #.  Hubertus Franke (IBM Thomas J. Watson Research Center),
620 #.  Matthew Kirkwood, Ingo Molnar (Red Hat)
621 #.  and Rusty Russell (IBM Linux Technology Center).
622 #.  This page written by bert hubert.
623 #. type: Plain text
624 #: build/C/man2/futex.2:263
625 msgid ""
626 "To reiterate, bare futexes are not intended as an easy-to-use abstraction "
627 "for end-users.  (There is no wrapper function for this system call in "
628 "glibc.)  Implementors are expected to be assembly literate and to have read "
629 "the sources of the futex userspace library referenced below."
630 msgstr ""
631
632 #. type: Plain text
633 #: build/C/man2/futex.2:265
634 msgid "B<futex>(7)"
635 msgstr ""
636
637 #. type: Plain text
638 #: build/C/man2/futex.2:268
639 msgid ""
640 "I<Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux> (proceedings "
641 "of the Ottawa Linux Symposium 2002), online at"
642 msgstr ""
643
644 #. type: Plain text
645 #: build/C/man2/futex.2:270
646 msgid "http://kernel.org/doc/ols/2002/ols2002-pages-479-495.pdf"
647 msgstr ""
648
649 #. type: Plain text
650 #: build/C/man2/futex.2:272
651 msgid "Futex example library, futex-*.tar.bz2 at"
652 msgstr ""
653
654 #. type: Plain text
655 #: build/C/man2/futex.2:274
656 msgid "ftp://ftp.nl.kernel.org/pub/linux/kernel/people/rusty/."
657 msgstr ""
658
659 #. type: TH
660 #: build/C/man2/kexec_load.2:25
661 #, no-wrap
662 msgid "KEXEC_LOAD"
663 msgstr ""
664
665 #. type: TH
666 #: build/C/man2/kexec_load.2:25
667 #, no-wrap
668 msgid "2010-11-04"
669 msgstr ""
670
671 #. type: Plain text
672 #: build/C/man2/kexec_load.2:28
673 msgid "kexec_load - load a new kernel for later execution"
674 msgstr ""
675
676 #. type: Plain text
677 #: build/C/man2/kexec_load.2:30
678 msgid "B<#include E<lt>linux/kexec.hE<gt>>"
679 msgstr ""
680
681 #. type: Plain text
682 #: build/C/man2/kexec_load.2:32
683 msgid ""
684 "B<long kexec_load(unsigned long >I<entry>B<, unsigned long "
685 ">I<nr_segments>B<,>"
686 msgstr ""
687
688 #. type: Plain text
689 #: build/C/man2/kexec_load.2:35
690 msgid "B< struct kexec_segment *>I<segments>B<, unsigned long >I<flags>B<);>"
691 msgstr ""
692
693 #. type: Plain text
694 #: build/C/man2/kexec_load.2:40
695 msgid ""
696 "The B<kexec_load>()  system call loads a new kernel that can be executed "
697 "later by B<reboot>(2)."
698 msgstr ""
699
700 #. type: Plain text
701 #: build/C/man2/kexec_load.2:46
702 msgid ""
703 "The I<flags> argument is a mask whose high-order bits control the operation "
704 "of the call.  The following values can be specified in I<flags>:"
705 msgstr ""
706
707 #. type: TP
708 #: build/C/man2/kexec_load.2:46
709 #, no-wrap
710 msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
711 msgstr ""
712
713 #.  FIXME figure out how this is really used
714 #. type: Plain text
715 #: build/C/man2/kexec_load.2:50
716 msgid "Execute the new kernel automatically on a system crash."
717 msgstr ""
718
719 #. type: TP
720 #: build/C/man2/kexec_load.2:50
721 #, no-wrap
722 msgid "B<KEXEC_PRESERVE_CONTEXT> (since Linux 2.7.27)"
723 msgstr ""
724
725 #. type: Plain text
726 #: build/C/man2/kexec_load.2:60
727 msgid ""
728 "Preserve the system hardware and software states before executing the new "
729 "kernel.  This could be used for system suspend.  This flag is only available "
730 "if the kernel was configured with B<CONFIG_KEXEC_JUMP>, and is only "
731 "effective if I<nr_segments> is greater than 0."
732 msgstr ""
733
734 #. type: Plain text
735 #: build/C/man2/kexec_load.2:80
736 msgid ""
737 "The low-order bits of I<flags> contain the architecture of the "
738 "to-be-executed kernel.  Specify (OR) the constant B<KEXEC_ARCH_DEFAULT> to "
739 "use the current architecture, or one of the following architecture constants "
740 "B<KEXEC_ARCH_386>, B<KEXEC_ARCH_X86_64>, B<KEXEC_ARCH_PPC>, "
741 "B<KEXEC_ARCH_PPC64>, B<KEXEC_ARCH_IA_64>, B<KEXEC_ARCH_ARM>, "
742 "B<KEXEC_ARCH_S390>, B<KEXEC_ARCH_SH>, B<KEXEC_ARCH_MIPS>, and "
743 "B<KEXEC_ARCH_MIPS_LE>.  The architecture must be executable on the CPU of "
744 "the system."
745 msgstr ""
746
747 #. type: Plain text
748 #: build/C/man2/kexec_load.2:94
749 msgid ""
750 "The I<entry> argument is the physical entry address in the kernel image.  "
751 "The I<nr_segments> argument is the number of segments pointed to by the "
752 "I<segments> pointer.  The I<segments> argument is an array of "
753 "I<kexec_segment> structures which define the kernel layout:"
754 msgstr ""
755
756 #. type: Plain text
757 #: build/C/man2/kexec_load.2:103
758 #, no-wrap
759 msgid ""
760 "struct kexec_segment {\n"
761 "    void   *buf;        /* Buffer in user space */\n"
762 "    size_t  bufsz;      /* Buffer length in user space */\n"
763 "    void   *mem;        /* Physical address of kernel */\n"
764 "    size_t  memsz;      /* Physical address length */\n"
765 "};\n"
766 msgstr ""
767
768 #.  FIXME elaborate on the following:
769 #. type: Plain text
770 #: build/C/man2/kexec_load.2:110
771 msgid ""
772 "The kernel image defined by I<segments> is copied from the calling process "
773 "into previously reserved memory."
774 msgstr ""
775
776 #. type: Plain text
777 #: build/C/man2/kexec_load.2:117
778 msgid ""
779 "On success, B<kexec_load>()  returns 0.  On error, -1 is returned and "
780 "I<errno> is set to indicate the error."
781 msgstr ""
782
783 #. type: TP
784 #: build/C/man2/kexec_load.2:118 build/C/man2/pivot_root.2:104 build/C/man2/ptrace.2:1595 build/C/man2/quotactl.2:493
785 #, no-wrap
786 msgid "B<EBUSY>"
787 msgstr ""
788
789 #. type: Plain text
790 #: build/C/man2/kexec_load.2:122
791 msgid ""
792 "Another crash kernel is already being loaded or a crash kernel is already in "
793 "use."
794 msgstr ""
795
796 #.  KEXEC_SEGMENT_MAX == 16
797 #. type: Plain text
798 #: build/C/man2/kexec_load.2:129
799 msgid "I<flags> is invalid; or I<nr_segments> is too large"
800 msgstr ""
801
802 #. type: Plain text
803 #: build/C/man2/kexec_load.2:134
804 msgid "The caller does not have the B<CAP_SYS_BOOT> capability."
805 msgstr ""
806
807 #. type: Plain text
808 #: build/C/man2/kexec_load.2:138
809 msgid "The B<kexec_load>()  system call first appeared in Linux 2.6.13."
810 msgstr ""
811
812 #. type: Plain text
813 #: build/C/man2/kexec_load.2:145
814 msgid ""
815 "Currently, there is no glibc support for B<kexec_load>().  Call it using "
816 "B<syscall>(2)."
817 msgstr ""
818
819 #.  FIXME Andi submitted a patch for this.
820 #.  Check if it got accepted later.
821 #. type: Plain text
822 #: build/C/man2/kexec_load.2:152
823 msgid ""
824 "The required constants are in the kernel source file I<linux/kexec.h>, which "
825 "is not currently exported to glibc.  Therefore, these constants must be "
826 "defined manually."
827 msgstr ""
828
829 #. type: Plain text
830 #: build/C/man2/kexec_load.2:155
831 msgid ""
832 "This system call is only available if the kernel was configured with "
833 "B<CONFIG_KEXEC>."
834 msgstr ""
835
836 #. type: Plain text
837 #: build/C/man2/kexec_load.2:158
838 msgid "B<reboot>(2), B<syscall>(2)"
839 msgstr ""
840
841 #. type: TH
842 #: build/C/man2/lookup_dcookie.2:27
843 #, no-wrap
844 msgid "LOOKUP_DCOOKIE"
845 msgstr ""
846
847 #. type: TH
848 #: build/C/man2/lookup_dcookie.2:27
849 #, no-wrap
850 msgid "2004-06-17"
851 msgstr ""
852
853 #. type: Plain text
854 #: build/C/man2/lookup_dcookie.2:30
855 msgid "lookup_dcookie - return a directory entry's path"
856 msgstr ""
857
858 #. type: Plain text
859 #: build/C/man2/lookup_dcookie.2:32
860 msgid ""
861 "B<int lookup_dcookie(u64 >I<cookie>B<, char *>I<buffer>B<, size_t "
862 ">I<len>B<);>"
863 msgstr ""
864
865 #. type: Plain text
866 #: build/C/man2/lookup_dcookie.2:38
867 msgid ""
868 "Look up the full path of the directory entry specified by the value "
869 "I<cookie>.  The cookie is an opaque identifier uniquely identifying a "
870 "particular directory entry.  The buffer given is filled in with the full "
871 "path of the directory entry."
872 msgstr ""
873
874 #. type: Plain text
875 #: build/C/man2/lookup_dcookie.2:43
876 msgid ""
877 "For B<lookup_dcookie>()  to return successfully, the kernel must still hold "
878 "a cookie reference to the directory entry."
879 msgstr ""
880
881 #. type: Plain text
882 #: build/C/man2/lookup_dcookie.2:50
883 msgid ""
884 "On success, B<lookup_dcookie>()  returns the length of the path string "
885 "copied into the buffer.  On error, -1 is returned, and I<errno> is set "
886 "appropriately."
887 msgstr ""
888
889 #. type: Plain text
890 #: build/C/man2/lookup_dcookie.2:54
891 msgid "The buffer was not valid."
892 msgstr ""
893
894 #. type: Plain text
895 #: build/C/man2/lookup_dcookie.2:58
896 msgid ""
897 "The kernel has no registered cookie/directory entry mappings at the time of "
898 "lookup, or the cookie does not refer to a valid directory entry."
899 msgstr ""
900
901 #. type: TP
902 #: build/C/man2/lookup_dcookie.2:58
903 #, no-wrap
904 msgid "B<ENAMETOOLONG>"
905 msgstr ""
906
907 #. type: Plain text
908 #: build/C/man2/lookup_dcookie.2:61
909 msgid "The name could not fit in the buffer."
910 msgstr ""
911
912 #. type: TP
913 #: build/C/man2/lookup_dcookie.2:61 build/C/man2/sendfile.2:134 build/C/man2/splice.2:155 build/C/man2/tee.2:111 build/C/man2/vmsplice.2:135
914 #, no-wrap
915 msgid "B<ENOMEM>"
916 msgstr ""
917
918 #. type: Plain text
919 #: build/C/man2/lookup_dcookie.2:65
920 msgid ""
921 "The kernel could not allocate memory for the temporary buffer holding the "
922 "path."
923 msgstr ""
924
925 #. type: Plain text
926 #: build/C/man2/lookup_dcookie.2:70
927 msgid ""
928 "The process does not have the capability B<CAP_SYS_ADMIN> required to look "
929 "up cookie values."
930 msgstr ""
931
932 #. type: TP
933 #: build/C/man2/lookup_dcookie.2:70 build/C/man2/quotactl.2:472
934 #, no-wrap
935 msgid "B<ERANGE>"
936 msgstr ""
937
938 #. type: Plain text
939 #: build/C/man2/lookup_dcookie.2:73
940 msgid "The buffer was not large enough to hold the path of the directory entry."
941 msgstr ""
942
943 #. type: Plain text
944 #: build/C/man2/lookup_dcookie.2:78
945 msgid ""
946 "Available since Linux 2.5.43.  The B<ENAMETOOLONG> error return was added in "
947 "2.5.70."
948 msgstr ""
949
950 #. type: Plain text
951 #: build/C/man2/lookup_dcookie.2:81
952 msgid "B<lookup_dcookie>()  is Linux-specific."
953 msgstr ""
954
955 #. type: Plain text
956 #: build/C/man2/lookup_dcookie.2:85
957 msgid ""
958 "B<lookup_dcookie>()  is a special-purpose system call, currently used only "
959 "by the oprofile profiler.  It relies on a kernel driver to register cookies "
960 "for directory entries."
961 msgstr ""
962
963 #. type: Plain text
964 #: build/C/man2/lookup_dcookie.2:88
965 msgid ""
966 "The path returned may be suffixed by the string \" (deleted)\" if the "
967 "directory entry has been removed."
968 msgstr ""
969
970 #. type: TH
971 #: build/C/man2/modify_ldt.2:25
972 #, no-wrap
973 msgid "MODIFY_LDT"
974 msgstr ""
975
976 #. type: TH
977 #: build/C/man2/modify_ldt.2:25 build/C/man2/pivot_root.2:7
978 #, no-wrap
979 msgid "2007-06-01"
980 msgstr ""
981
982 #. type: Plain text
983 #: build/C/man2/modify_ldt.2:28
984 msgid "modify_ldt - get or set ldt"
985 msgstr ""
986
987 #. type: Plain text
988 #: build/C/man2/modify_ldt.2:31
989 #, no-wrap
990 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
991 msgstr ""
992
993 #. type: Plain text
994 #: build/C/man2/modify_ldt.2:33
995 #, no-wrap
996 msgid ""
997 "B<int modify_ldt(int >I<func>B<, void *>I<ptr>B<, unsigned long "
998 ">I<bytecount>B<);>\n"
999 msgstr ""
1000
1001 #. type: Plain text
1002 #: build/C/man2/modify_ldt.2:39
1003 msgid ""
1004 "B<modify_ldt>()  reads or writes the local descriptor table (ldt) for a "
1005 "process.  The ldt is a per-process memory management table used by the i386 "
1006 "processor.  For more information on this table, see an Intel 386 processor "
1007 "handbook."
1008 msgstr ""
1009
1010 #. type: Plain text
1011 #: build/C/man2/modify_ldt.2:49
1012 msgid ""
1013 "When I<func> is 0, B<modify_ldt>()  reads the ldt into the memory pointed to "
1014 "by I<ptr>.  The number of bytes read is the smaller of I<bytecount> and the "
1015 "actual size of the ldt."
1016 msgstr ""
1017
1018 #
1019 #.  FIXME ? say something about func == 2 and func == 0x11?
1020 #.  In Linux 2.4, func == 2 returned "the default ldt"
1021 #.  In Linux 2.6, func == 2 is a nop, returning a zeroed out structure.
1022 #.  Linux 2.4 and 2.6 implement an operation for func == 0x11
1023 #. type: Plain text
1024 #: build/C/man2/modify_ldt.2:67
1025 msgid ""
1026 "When I<func> is 1, B<modify_ldt>()  modifies one ldt entry.  I<ptr> points "
1027 "to a I<user_desc> structure and I<bytecount> must equal the size of this "
1028 "structure."
1029 msgstr ""
1030
1031 #. type: Plain text
1032 #: build/C/man2/modify_ldt.2:71
1033 msgid "The I<user_desc> structure is defined in I<E<lt>asm/ldt.hE<gt>> as:"
1034 msgstr ""
1035
1036 #. type: Plain text
1037 #: build/C/man2/modify_ldt.2:85
1038 #, no-wrap
1039 msgid ""
1040 "struct user_desc {\n"
1041 "    unsigned int  entry_number;\n"
1042 "    unsigned long base_addr;\n"
1043 "    unsigned int  limit;\n"
1044 "    unsigned int  seg_32bit:1;\n"
1045 "    unsigned int  contents:2;\n"
1046 "    unsigned int  read_exec_only:1;\n"
1047 "    unsigned int  limit_in_pages:1;\n"
1048 "    unsigned int  seg_not_present:1;\n"
1049 "    unsigned int  useable:1;\n"
1050 "};\n"
1051 msgstr ""
1052
1053 #.  .PP
1054 #.  The ldt is specific for the calling process. Any attempts to change
1055 #.  the ldt to include the address space of another process or the kernel
1056 #.  will result in a segmentation violation when trying to access the memory
1057 #.  outside of the process address space. The memory protection is enforced
1058 #.  at the paging layer.
1059 #. type: Plain text
1060 #: build/C/man2/modify_ldt.2:96
1061 msgid "In Linux 2.4 and earlier, this structure was named I<modify_ldt_ldt_s>."
1062 msgstr ""
1063
1064 #. type: Plain text
1065 #: build/C/man2/modify_ldt.2:106
1066 msgid ""
1067 "On success, B<modify_ldt>()  returns either the actual number of bytes read "
1068 "(for reading)  or 0 (for writing).  On failure, B<modify_ldt>()  returns -1 "
1069 "and sets I<errno> to indicate the error."
1070 msgstr ""
1071
1072 #. type: Plain text
1073 #: build/C/man2/modify_ldt.2:111
1074 msgid "I<ptr> points outside the address space."
1075 msgstr ""
1076
1077 #. type: Plain text
1078 #: build/C/man2/modify_ldt.2:124
1079 msgid ""
1080 "I<ptr> is 0, or I<func> is 1 and I<bytecount> is not equal to the size of "
1081 "the structure I<modify_ldt_ldt_s>, or I<func> is 1 and the new ldt entry has "
1082 "invalid values."
1083 msgstr ""
1084
1085 #. type: Plain text
1086 #: build/C/man2/modify_ldt.2:128
1087 msgid "I<func> is neither 0 nor 1."
1088 msgstr ""
1089
1090 #. type: Plain text
1091 #: build/C/man2/modify_ldt.2:131
1092 msgid ""
1093 "This call is Linux-specific and should not be used in programs intended to "
1094 "be portable."
1095 msgstr ""
1096
1097 #. type: Plain text
1098 #: build/C/man2/modify_ldt.2:134 build/C/man2/pivot_root.2:128
1099 msgid ""
1100 "Glibc does not provide a wrapper for this system call; call it using "
1101 "B<syscall>(2)."
1102 msgstr ""
1103
1104 #. type: Plain text
1105 #: build/C/man2/modify_ldt.2:136
1106 msgid "B<vm86>(2)"
1107 msgstr ""
1108
1109 #. type: TH
1110 #: build/C/man2/nfsservctl.2:8
1111 #, no-wrap
1112 msgid "NFSSERVCTL"
1113 msgstr ""
1114
1115 #. type: TH
1116 #: build/C/man2/nfsservctl.2:8
1117 #, no-wrap
1118 msgid "2012-03-05"
1119 msgstr ""
1120
1121 #. type: Plain text
1122 #: build/C/man2/nfsservctl.2:11
1123 msgid "nfsservctl - syscall interface to kernel nfs daemon"
1124 msgstr ""
1125
1126 #. type: Plain text
1127 #: build/C/man2/nfsservctl.2:14
1128 #, no-wrap
1129 msgid "B<#include E<lt>linux/nfsd/syscall.hE<gt>>\n"
1130 msgstr ""
1131
1132 #. type: Plain text
1133 #: build/C/man2/nfsservctl.2:17
1134 #, no-wrap
1135 msgid ""
1136 "B<long nfsservctl(int >I<cmd>B<, struct nfsctl_arg *>I<argp>B<,>\n"
1137 "B<                union nfsctl_res *>I<resp>B<);>\n"
1138 msgstr ""
1139
1140 #. type: Plain text
1141 #: build/C/man2/nfsservctl.2:21
1142 msgid "I<Note>: Since Linux 3.1, this system call no longer exists."
1143 msgstr ""
1144
1145 #. type: Plain text
1146 #: build/C/man2/nfsservctl.2:33
1147 #, no-wrap
1148 msgid ""
1149 "/*\n"
1150 " * These are the commands understood by nfsctl().\n"
1151 " */\n"
1152 "#define NFSCTL_SVC          0    /* This is a server process. */\n"
1153 "#define NFSCTL_ADDCLIENT    1    /* Add an NFS client. */\n"
1154 "#define NFSCTL_DELCLIENT    2    /* Remove an NFS client. */\n"
1155 "#define NFSCTL_EXPORT       3    /* export a file system. */\n"
1156 "#define NFSCTL_UNEXPORT     4    /* unexport a file system. */\n"
1157 "#define NFSCTL_UGIDUPDATE   5    /* update a client's UID/GID map. */\n"
1158 "#define NFSCTL_GETFH        6    /* get an fh (used by mountd) */\n"
1159 msgstr ""
1160
1161 #. type: Plain text
1162 #: build/C/man2/nfsservctl.2:45
1163 #, no-wrap
1164 msgid ""
1165 "struct nfsctl_arg {\n"
1166 "    int                       ca_version;     /* safeguard */\n"
1167 "    union {\n"
1168 "        struct nfsctl_svc     u_svc;\n"
1169 "        struct nfsctl_client  u_client;\n"
1170 "        struct nfsctl_export  u_export;\n"
1171 "        struct nfsctl_uidmap  u_umap;\n"
1172 "        struct nfsctl_fhparm  u_getfh;\n"
1173 "        unsigned int          u_debug;\n"
1174 "    } u;\n"
1175 "}\n"
1176 msgstr ""
1177
1178 #. type: Plain text
1179 #: build/C/man2/nfsservctl.2:50
1180 #, no-wrap
1181 msgid ""
1182 "union nfsctl_res {\n"
1183 "        struct knfs_fh          cr_getfh;\n"
1184 "        unsigned int            cr_debug;\n"
1185 "};\n"
1186 msgstr ""
1187
1188 #. type: Plain text
1189 #: build/C/man2/nfsservctl.2:56 build/C/man2/pivot_root.2:99 build/C/man2/vm86.2:57
1190 msgid ""
1191 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
1192 "appropriately."
1193 msgstr ""
1194
1195 #. type: Plain text
1196 #: build/C/man2/nfsservctl.2:58
1197 msgid "This call is Linux-specific."
1198 msgstr ""
1199
1200 #. type: TH
1201 #: build/C/man2/outb.2:28
1202 #, no-wrap
1203 msgid "OUTB"
1204 msgstr ""
1205
1206 #. type: TH
1207 #: build/C/man2/outb.2:28
1208 #, no-wrap
1209 msgid "1995-11-29"
1210 msgstr ""
1211
1212 #. type: Plain text
1213 #: build/C/man2/outb.2:33
1214 msgid ""
1215 "outb, outw, outl, outsb, outsw, outsl, inb, inw, inl, insb, insw, insl, "
1216 "outb_p, outw_p, outl_p, inb_p, inw_p, inl_p - port I/O"
1217 msgstr ""
1218
1219 #. type: Plain text
1220 #: build/C/man2/outb.2:38
1221 msgid ""
1222 "This family of functions is used to do low-level port input and output.  The "
1223 "out* functions do port output, the in* functions do port input; the b-suffix "
1224 "functions are byte-width and the w-suffix functions word-width; the "
1225 "_p-suffix functions pause until the I/O completes."
1226 msgstr ""
1227
1228 #.  , given the following information
1229 #.  in addition to that given in
1230 #.  .BR outb (9).
1231 #. type: Plain text
1232 #: build/C/man2/outb.2:44
1233 msgid ""
1234 "They are primarily designed for internal kernel use, but can be used from "
1235 "user space."
1236 msgstr ""
1237
1238 #. type: Plain text
1239 #: build/C/man2/outb.2:49
1240 msgid ""
1241 "You compile with B<-O> or B<-O2> or similar.  The functions are defined as "
1242 "inline macros, and will not be substituted in without optimization enabled, "
1243 "causing unresolved references at link time."
1244 msgstr ""
1245
1246 #. type: Plain text
1247 #: build/C/man2/outb.2:58
1248 msgid ""
1249 "You use B<ioperm>(2)  or alternatively B<iopl>(2)  to tell the kernel to "
1250 "allow the user space application to access the I/O ports in question.  "
1251 "Failure to do this will cause the application to receive a segmentation "
1252 "fault."
1253 msgstr ""
1254
1255 #. type: Plain text
1256 #: build/C/man2/outb.2:67
1257 msgid ""
1258 "B<outb>()  and friends are hardware-specific.  The I<value> argument is "
1259 "passed first and the I<port> argument is passed second, which is the "
1260 "opposite order from most DOS implementations."
1261 msgstr ""
1262
1263 #. type: Plain text
1264 #: build/C/man2/outb.2:70
1265 msgid "B<ioperm>(2), B<iopl>(2)"
1266 msgstr ""
1267
1268 #. type: TH
1269 #: build/C/man2/pciconfig_read.2:5
1270 #, no-wrap
1271 msgid "PCICONFIG_READ"
1272 msgstr ""
1273
1274 #. type: TH
1275 #: build/C/man2/pciconfig_read.2:5
1276 #, no-wrap
1277 msgid "2003-07-14"
1278 msgstr ""
1279
1280 #. type: Plain text
1281 #: build/C/man2/pciconfig_read.2:8
1282 msgid ""
1283 "pciconfig_read, pciconfig_write, pciconfig_iobase - pci device information "
1284 "handling"
1285 msgstr ""
1286
1287 #. type: Plain text
1288 #: build/C/man2/pciconfig_read.2:11
1289 #, no-wrap
1290 msgid "B<#include E<lt>pci.hE<gt>>\n"
1291 msgstr ""
1292
1293 #. type: Plain text
1294 #: build/C/man2/pciconfig_read.2:18
1295 #, no-wrap
1296 msgid ""
1297 "B<int pciconfig_read(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
1298 "B<          unsigned long >I<off>B<, unsigned long >I<len>B<, void "
1299 "*>I<buf>B<);>\n"
1300 "B<int pciconfig_write(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
1301 "B<          unsigned long >I<off>B<, unsigned long >I<len>B<, void "
1302 "*>I<buf>B<);>\n"
1303 "B<int pciconfig_iobase(long >I<which>B<, unsigned long >I<bus>B<,>\n"
1304 "B<          unsigned long >I<devfn>B<);>\n"
1305 msgstr ""
1306
1307 #. type: Plain text
1308 #: build/C/man2/pciconfig_read.2:24
1309 msgid ""
1310 "Most of the interaction with PCI devices is already handled by the kernel "
1311 "PCI layer, and thus these calls should not normally need to be accessed from "
1312 "userspace."
1313 msgstr ""
1314
1315 #. type: TP
1316 #: build/C/man2/pciconfig_read.2:24 build/C/man2/pciconfig_read.2:48
1317 #, no-wrap
1318 msgid "B<pciconfig_read>()"
1319 msgstr ""
1320
1321 #. type: Plain text
1322 #: build/C/man2/pciconfig_read.2:33
1323 msgid "Reads to I<buf> from device I<dev> at offset I<off> value."
1324 msgstr ""
1325
1326 #. type: TP
1327 #: build/C/man2/pciconfig_read.2:33 build/C/man2/pciconfig_read.2:54
1328 #, no-wrap
1329 msgid "B<pciconfig_write>()"
1330 msgstr ""
1331
1332 #. type: Plain text
1333 #: build/C/man2/pciconfig_read.2:42
1334 msgid "Writes from I<buf> to device I<dev> at offset I<off> value."
1335 msgstr ""
1336
1337 #. type: TP
1338 #: build/C/man2/pciconfig_read.2:42 build/C/man2/pciconfig_read.2:60
1339 #, no-wrap
1340 msgid "B<pciconfig_iobase>()"
1341 msgstr ""
1342
1343 #. type: Plain text
1344 #: build/C/man2/pciconfig_read.2:47
1345 msgid ""
1346 "You pass it a bus/devfn pair and get a physical address for either the "
1347 "memory offset (for things like prep, this is 0xc0000000), the IO base for "
1348 "PIO cycles, or the ISA holes if any."
1349 msgstr ""
1350
1351 #. type: Plain text
1352 #: build/C/man2/pciconfig_read.2:54 build/C/man2/pciconfig_read.2:60
1353 msgid ""
1354 "On success zero is returned.  On error, -1 is returned and I<errno> is set "
1355 "appropriately."
1356 msgstr ""
1357
1358 #. type: Plain text
1359 #: build/C/man2/pciconfig_read.2:74
1360 msgid ""
1361 "Returns information on locations of various I/O regions in physical memory "
1362 "according to the I<which> value.  Values for I<which> are: "
1363 "B<IOBASE_BRIDGE_NUMBER>, B<IOBASE_MEMORY>, B<IOBASE_IO>, B<IOBASE_ISA_IO>, "
1364 "B<IOBASE_ISA_MEM>."
1365 msgstr ""
1366
1367 #. type: Plain text
1368 #: build/C/man2/pciconfig_read.2:81
1369 msgid "I<len> value is invalid.  This does not apply to B<pciconfig_iobase>()."
1370 msgstr ""
1371
1372 #. type: TP
1373 #: build/C/man2/pciconfig_read.2:81 build/C/man2/ptrace.2:1612 build/C/man2/sendfile.2:130
1374 #, no-wrap
1375 msgid "B<EIO>"
1376 msgstr ""
1377
1378 #. type: Plain text
1379 #: build/C/man2/pciconfig_read.2:84
1380 msgid "I/O error."
1381 msgstr ""
1382
1383 #. type: TP
1384 #: build/C/man2/pciconfig_read.2:84
1385 #, no-wrap
1386 msgid "B<ENODEV>"
1387 msgstr ""
1388
1389 #. type: Plain text
1390 #: build/C/man2/pciconfig_read.2:90
1391 msgid ""
1392 "For B<pciconfig_iobase>(), \"hose\" value is NULL.  For the other calls, "
1393 "could not find a slot."
1394 msgstr ""
1395
1396 #. type: Plain text
1397 #: build/C/man2/pciconfig_read.2:95
1398 msgid "The system has not implemented these calls (B<CONFIG_PCI> not defined)."
1399 msgstr ""
1400
1401 #. type: TP
1402 #: build/C/man2/pciconfig_read.2:95
1403 #, no-wrap
1404 msgid "B<EOPNOTSUPP>"
1405 msgstr ""
1406
1407 #. type: Plain text
1408 #: build/C/man2/pciconfig_read.2:102
1409 msgid ""
1410 "This return value is only valid for B<pciconfig_iobase>().  It is returned "
1411 "if the value for I<which> is invalid."
1412 msgstr ""
1413
1414 #. type: Plain text
1415 #: build/C/man2/pciconfig_read.2:107
1416 msgid ""
1417 "User does not have the B<CAP_SYS_ADMIN> capability.  This does not apply to "
1418 "B<pciconfig_iobase>()."
1419 msgstr ""
1420
1421 #. type: Plain text
1422 #: build/C/man2/pciconfig_read.2:109
1423 msgid "These calls are Linux-specific, available since Linux 2.0.26/2.1.11."
1424 msgstr ""
1425
1426 #. type: Plain text
1427 #: build/C/man2/pciconfig_read.2:111
1428 msgid "B<capabilities>(7)"
1429 msgstr ""
1430
1431 #. type: TH
1432 #: build/C/man2/personality.2:30
1433 #, no-wrap
1434 msgid "PERSONALITY"
1435 msgstr ""
1436
1437 #. type: TH
1438 #: build/C/man2/personality.2:30
1439 #, no-wrap
1440 msgid "2003-01-01"
1441 msgstr ""
1442
1443 #. type: Plain text
1444 #: build/C/man2/personality.2:33
1445 msgid "personality - set the process execution domain"
1446 msgstr ""
1447
1448 #. type: Plain text
1449 #: build/C/man2/personality.2:35
1450 msgid "B<#include E<lt>sys/personality.hE<gt>>"
1451 msgstr ""
1452
1453 #. type: Plain text
1454 #: build/C/man2/personality.2:37
1455 msgid "B<int personality(unsigned long >I<persona>B<);>"
1456 msgstr ""
1457
1458 #. type: Plain text
1459 #: build/C/man2/personality.2:45
1460 msgid ""
1461 "Linux supports different execution domains, or personalities, for each "
1462 "process.  Among other things, execution domains tell Linux how to map signal "
1463 "numbers into signal actions.  The execution domain system allows Linux to "
1464 "provide limited support for binaries compiled under other UNIX-like "
1465 "operating systems."
1466 msgstr ""
1467
1468 #. type: Plain text
1469 #: build/C/man2/personality.2:55
1470 msgid ""
1471 "This function will return the current B<personality>()  when I<persona> "
1472 "equals 0xffffffff.  Otherwise, it will make the execution domain referenced "
1473 "by I<persona> the new execution domain of the calling process."
1474 msgstr ""
1475
1476 #. type: Plain text
1477 #: build/C/man2/personality.2:62
1478 msgid ""
1479 "On success, the previous I<persona> is returned.  On error, -1 is returned, "
1480 "and I<errno> is set appropriately."
1481 msgstr ""
1482
1483 #. type: Plain text
1484 #: build/C/man2/personality.2:66
1485 msgid "The kernel was unable to change the personality."
1486 msgstr ""
1487
1488 #. type: Plain text
1489 #: build/C/man2/personality.2:70
1490 msgid ""
1491 "B<personality>()  is Linux-specific and should not be used in programs "
1492 "intended to be portable."
1493 msgstr ""
1494
1495 #. type: TH
1496 #: build/C/man2/pivot_root.2:7
1497 #, no-wrap
1498 msgid "PIVOT_ROOT"
1499 msgstr ""
1500
1501 #. type: Plain text
1502 #: build/C/man2/pivot_root.2:10
1503 msgid "pivot_root - change the root file system"
1504 msgstr ""
1505
1506 #. type: Plain text
1507 #: build/C/man2/pivot_root.2:12
1508 msgid "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
1509 msgstr ""
1510
1511 #
1512 #.  The
1513 #.  .B CAP_SYS_ADMIN
1514 #.  capability is required.
1515 #. type: Plain text
1516 #: build/C/man2/pivot_root.2:21
1517 msgid ""
1518 "B<pivot_root>()  moves the root file system of the calling process to the "
1519 "directory I<put_old> and makes I<new_root> the new root file system of the "
1520 "calling process."
1521 msgstr ""
1522
1523 #. type: Plain text
1524 #: build/C/man2/pivot_root.2:28
1525 msgid ""
1526 "The typical use of B<pivot_root>()  is during system startup, when the "
1527 "system mounts a temporary root file system (e.g., an B<initrd>), then mounts "
1528 "the real root file system, and eventually turns the latter into the current "
1529 "root of all relevant processes or threads."
1530 msgstr ""
1531
1532 #. type: Plain text
1533 #: build/C/man2/pivot_root.2:40
1534 msgid ""
1535 "B<pivot_root>()  may or may not change the current root and the current "
1536 "working directory of any processes or threads which use the old root "
1537 "directory.  The caller of B<pivot_root>()  must ensure that processes with "
1538 "root or current working directory at the old root operate correctly in "
1539 "either case.  An easy way to ensure this is to change their root and current "
1540 "working directory to I<new_root> before invoking B<pivot_root>()."
1541 msgstr ""
1542
1543 #. type: Plain text
1544 #: build/C/man2/pivot_root.2:58
1545 msgid ""
1546 "The paragraph above is intentionally vague because the implementation of "
1547 "B<pivot_root>()  may change in the future.  At the time of writing, "
1548 "B<pivot_root>()  changes root and current working directory of each process "
1549 "or thread to I<new_root> if they point to the old root directory.  This is "
1550 "necessary in order to prevent kernel threads from keeping the old root "
1551 "directory busy with their root and current working directory, even if they "
1552 "never access the file system in any way.  In the future, there may be a "
1553 "mechanism for kernel threads to explicitly relinquish any access to the file "
1554 "system, such that this fairly intrusive mechanism can be removed from "
1555 "B<pivot_root>()."
1556 msgstr ""
1557
1558 #. type: Plain text
1559 #: build/C/man2/pivot_root.2:66
1560 msgid ""
1561 "Note that this also applies to the calling process: B<pivot_root>()  may or "
1562 "may not affect its current working directory.  It is therefore recommended "
1563 "to call B<chdir(\"/\")> immediately after B<pivot_root>()."
1564 msgstr ""
1565
1566 #. type: Plain text
1567 #: build/C/man2/pivot_root.2:68
1568 msgid "The following restrictions apply to I<new_root> and I<put_old>:"
1569 msgstr ""
1570
1571 #. type: IP
1572 #: build/C/man2/pivot_root.2:68 build/C/man2/pivot_root.2:70 build/C/man2/pivot_root.2:73 build/C/man2/pivot_root.2:77
1573 #, no-wrap
1574 msgid "-"
1575 msgstr ""
1576
1577 #. type: Plain text
1578 #: build/C/man2/pivot_root.2:70
1579 msgid "They must be directories."
1580 msgstr ""
1581
1582 #. type: Plain text
1583 #: build/C/man2/pivot_root.2:73
1584 msgid ""
1585 "I<new_root> and I<put_old> must not be on the same file system as the "
1586 "current root."
1587 msgstr ""
1588
1589 #. type: Plain text
1590 #: build/C/man2/pivot_root.2:77
1591 msgid ""
1592 "I<put_old> must be underneath I<new_root>, that is, adding a nonzero number "
1593 "of I</..> to the string pointed to by I<put_old> must yield the same "
1594 "directory as I<new_root>."
1595 msgstr ""
1596
1597 #. type: Plain text
1598 #: build/C/man2/pivot_root.2:79
1599 msgid "No other file system may be mounted on I<put_old>."
1600 msgstr ""
1601
1602 #. type: Plain text
1603 #: build/C/man2/pivot_root.2:83
1604 msgid "See also B<pivot_root>(8)  for additional usage examples."
1605 msgstr ""
1606
1607 #. type: Plain text
1608 #: build/C/man2/pivot_root.2:90
1609 msgid ""
1610 "If the current root is not a mount point (e.g., after B<chroot>(2)  or "
1611 "B<pivot_root>(), see also below), not the old root directory, but the mount "
1612 "point of that file system is mounted on I<put_old>."
1613 msgstr ""
1614
1615 #. type: Plain text
1616 #: build/C/man2/pivot_root.2:95
1617 msgid ""
1618 "I<new_root> does not have to be a mount point.  In this case, "
1619 "I</proc/mounts> will show the mount point of the file system containing "
1620 "I<new_root> as root (I</>)."
1621 msgstr ""
1622
1623 #. type: Plain text
1624 #: build/C/man2/pivot_root.2:104
1625 msgid ""
1626 "B<pivot_root>()  may return (in I<errno>) any of the errors returned by "
1627 "B<stat>(2).  Additionally, it may return:"
1628 msgstr ""
1629
1630 #. type: Plain text
1631 #: build/C/man2/pivot_root.2:108
1632 msgid ""
1633 "I<new_root> or I<put_old> are on the current root file system, or a file "
1634 "system is already mounted on I<put_old>."
1635 msgstr ""
1636
1637 #. type: Plain text
1638 #: build/C/man2/pivot_root.2:111
1639 msgid "I<put_old> is not underneath I<new_root>."
1640 msgstr ""
1641
1642 #. type: TP
1643 #: build/C/man2/pivot_root.2:111
1644 #, no-wrap
1645 msgid "B<ENOTDIR>"
1646 msgstr ""
1647
1648 #. type: Plain text
1649 #: build/C/man2/pivot_root.2:114
1650 msgid "I<new_root> or I<put_old> is not a directory."
1651 msgstr ""
1652
1653 #. type: Plain text
1654 #: build/C/man2/pivot_root.2:119
1655 msgid "The calling process does not have the B<CAP_SYS_ADMIN> capability."
1656 msgstr ""
1657
1658 #. type: Plain text
1659 #: build/C/man2/pivot_root.2:122
1660 msgid "B<pivot_root>()  was introduced in Linux 2.3.41."
1661 msgstr ""
1662
1663 #. type: Plain text
1664 #: build/C/man2/pivot_root.2:125
1665 msgid "B<pivot_root>()  is Linux-specific and hence is not portable."
1666 msgstr ""
1667
1668 #. type: SH
1669 #: build/C/man2/pivot_root.2:128 build/C/man2/ptrace.2:1675
1670 #, no-wrap
1671 msgid "BUGS"
1672 msgstr ""
1673
1674 #. type: Plain text
1675 #: build/C/man2/pivot_root.2:132
1676 msgid ""
1677 "B<pivot_root>()  should not have to change root and current working "
1678 "directory of all other processes in the system."
1679 msgstr ""
1680
1681 #. type: Plain text
1682 #: build/C/man2/pivot_root.2:137
1683 msgid ""
1684 "Some of the more obscure uses of B<pivot_root>()  may quickly lead to "
1685 "insanity."
1686 msgstr ""
1687
1688 #. type: Plain text
1689 #: build/C/man2/pivot_root.2:143
1690 msgid "B<chdir>(2), B<chroot>(2), B<stat>(2), B<initrd>(4), B<pivot_root>(8)"
1691 msgstr ""
1692
1693 #. type: TH
1694 #: build/C/man2/ptrace.2:49
1695 #, no-wrap
1696 msgid "PTRACE"
1697 msgstr ""
1698
1699 #. type: TH
1700 #: build/C/man2/ptrace.2:49
1701 #, no-wrap
1702 msgid "2012-04-26"
1703 msgstr ""
1704
1705 #. type: Plain text
1706 #: build/C/man2/ptrace.2:52
1707 msgid "ptrace - process trace"
1708 msgstr ""
1709
1710 #. type: Plain text
1711 #: build/C/man2/ptrace.2:55
1712 #, no-wrap
1713 msgid "B<#include E<lt>sys/ptrace.hE<gt>>\n"
1714 msgstr ""
1715
1716 #. type: Plain text
1717 #: build/C/man2/ptrace.2:58
1718 #, no-wrap
1719 msgid ""
1720 "B<long ptrace(enum __ptrace_request >I<request>B<, pid_t >I<pid>B<, >\n"
1721 "B<            void *>I<addr>B<, void *>I<data>B<);>\n"
1722 msgstr ""
1723
1724 #. type: Plain text
1725 #: build/C/man2/ptrace.2:67
1726 msgid ""
1727 "The B<ptrace>()  system call provides a means by which one process (the "
1728 "\"tracer\")  may observe and control the execution of another process (the "
1729 "\"tracee\"), and examine and change the tracee's memory and registers.  It "
1730 "is primarily used to implement breakpoint debugging and system call tracing."
1731 msgstr ""
1732
1733 #. type: Plain text
1734 #: build/C/man2/ptrace.2:78
1735 msgid ""
1736 "A tracee first needs to be attached to the tracer.  Attachment and "
1737 "subsequent commands are per thread: in a multithreaded process, every thread "
1738 "can be individually attached to a (potentially different) tracer, or left "
1739 "not attached and thus not debugged.  Therefore, \"tracee\" always means "
1740 "\"(one) thread\", never \"a (possibly multithreaded) process\".  Ptrace "
1741 "commands are always sent to a specific tracee using a call of the form"
1742 msgstr ""
1743
1744 #. type: Plain text
1745 #: build/C/man2/ptrace.2:80
1746 #, no-wrap
1747 msgid "    ptrace(PTRACE_foo, pid, ...)\n"
1748 msgstr ""
1749
1750 #. type: Plain text
1751 #: build/C/man2/ptrace.2:84
1752 msgid "where I<pid> is the thread ID of the corresponding Linux thread."
1753 msgstr ""
1754
1755 #. type: Plain text
1756 #: build/C/man2/ptrace.2:90
1757 msgid ""
1758 "(Note that in this page, a \"multithreaded process\" means a thread group "
1759 "consisting of threads created using the B<clone>(2)  B<CLONE_THREAD> flag.)"
1760 msgstr ""
1761
1762 #. type: Plain text
1763 #: build/C/man2/ptrace.2:99
1764 msgid ""
1765 "A process can initiate a trace by calling B<fork>(2)  and having the "
1766 "resulting child do a B<PTRACE_TRACEME>, followed (typically) by an "
1767 "B<execve>(2).  Alternatively, one process may commence tracing another "
1768 "process using B<PTRACE_ATTACH>."
1769 msgstr ""
1770
1771 #. type: Plain text
1772 #: build/C/man2/ptrace.2:116
1773 msgid ""
1774 "While being traced, the tracee will stop each time a signal is delivered, "
1775 "even if the signal is being ignored.  (An exception is B<SIGKILL>, which has "
1776 "its usual effect.)  The tracer will be notified at its next call to "
1777 "B<waitpid>(2)  (or one of the related \"wait\" system calls); that call will "
1778 "return a I<status> value containing information that indicates the cause of "
1779 "the stop in the tracee.  While the tracee is stopped, the tracer can use "
1780 "various ptrace requests to inspect and modify the tracee.  The tracer then "
1781 "causes the tracee to continue, optionally ignoring the delivered signal (or "
1782 "even delivering a different signal instead)."
1783 msgstr ""
1784
1785 #. type: Plain text
1786 #: build/C/man2/ptrace.2:126
1787 msgid ""
1788 "If the B<PTRACE_O_TRACEEXEC> option is not in effect, all successful calls "
1789 "to B<execve>(2)  by the traced process will cause it to be sent a B<SIGTRAP> "
1790 "signal, giving the parent a chance to gain control before the new program "
1791 "begins execution."
1792 msgstr ""
1793
1794 #. type: Plain text
1795 #: build/C/man2/ptrace.2:130
1796 msgid ""
1797 "When the tracer is finished tracing, it can cause the tracee to continue "
1798 "executing in a normal, untraced mode via B<PTRACE_DETACH>."
1799 msgstr ""
1800
1801 #. type: Plain text
1802 #: build/C/man2/ptrace.2:134
1803 msgid "The value of I<request> determines the action to be performed:"
1804 msgstr ""
1805
1806 #. type: TP
1807 #: build/C/man2/ptrace.2:134
1808 #, no-wrap
1809 msgid "B<PTRACE_TRACEME>"
1810 msgstr ""
1811
1812 #. type: Plain text
1813 #: build/C/man2/ptrace.2:144
1814 msgid ""
1815 "Indicate that this process is to be traced by its parent.  A process "
1816 "probably shouldn't make this request if its parent isn't expecting to trace "
1817 "it.  (I<pid>, I<addr>, and I<data> are ignored.)"
1818 msgstr ""
1819
1820 #. type: Plain text
1821 #: build/C/man2/ptrace.2:157
1822 msgid ""
1823 "The B<PTRACE_TRACEME> request is used only by the tracee; the remaining "
1824 "requests are used only by the tracer.  In the following requests, I<pid> "
1825 "specifies the thread ID of the tracee to be acted on.  For requests other "
1826 "than B<PTRACE_ATTACH> and B<PTRACE_KILL>, the tracee must be stopped."
1827 msgstr ""
1828
1829 #. type: TP
1830 #: build/C/man2/ptrace.2:157
1831 #, no-wrap
1832 msgid "B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>"
1833 msgstr ""
1834
1835 #. type: Plain text
1836 #: build/C/man2/ptrace.2:168
1837 msgid ""
1838 "Read a word at the address I<addr> in the tracee's memory, returning the "
1839 "word as the result of the B<ptrace>()  call.  Linux does not have separate "
1840 "text and data address spaces, so these two requests are currently "
1841 "equivalent.  (I<data> is ignored.)"
1842 msgstr ""
1843
1844 #. type: TP
1845 #: build/C/man2/ptrace.2:168
1846 #, no-wrap
1847 msgid "B<PTRACE_PEEKUSER>"
1848 msgstr ""
1849
1850 #.  PTRACE_PEEKUSR in kernel source, but glibc uses PTRACE_PEEKUSER,
1851 #.  and that is the name that seems common on other systems.
1852 #. type: Plain text
1853 #: build/C/man2/ptrace.2:186
1854 msgid ""
1855 "Read a word at offset I<addr> in the tracee's USER area, which holds the "
1856 "registers and other information about the process (see "
1857 "I<E<lt>sys/user.hE<gt>>).  The word is returned as the result of the "
1858 "B<ptrace>()  call.  Typically, the offset must be word-aligned, though this "
1859 "might vary by architecture.  See NOTES.  (I<data> is ignored.)"
1860 msgstr ""
1861
1862 #. type: TP
1863 #: build/C/man2/ptrace.2:186
1864 #, no-wrap
1865 msgid "B<PTRACE_POKETEXT>, B<PTRACE_POKEDATA>"
1866 msgstr ""
1867
1868 #. type: Plain text
1869 #: build/C/man2/ptrace.2:198
1870 msgid ""
1871 "Copy the word I<data> to the address I<addr> in the tracee's memory.  As for "
1872 "B<PTRACE_PEEKTEXT> and B<PTRACE_PEEKDATA>, these two requests are currently "
1873 "equivalent."
1874 msgstr ""
1875
1876 #. type: TP
1877 #: build/C/man2/ptrace.2:198
1878 #, no-wrap
1879 msgid "B<PTRACE_POKEUSER>"
1880 msgstr ""
1881
1882 #.  PTRACE_POKEUSR in kernel source, but glibc uses PTRACE_POKEUSER,
1883 #.  and that is the name that seems common on other systems.
1884 #.  FIXME In the preceding sentence, which modifications are disallowed,
1885 #.  and when they are disallowed, how does userspace discover that fact?
1886 #. type: Plain text
1887 #: build/C/man2/ptrace.2:214
1888 msgid ""
1889 "Copy the word I<data> to offset I<addr> in the tracee's USER area.  As for "
1890 "B<PTRACE_PEEKUSER>, the offset must typically be word-aligned.  In order to "
1891 "maintain the integrity of the kernel, some modifications to the USER area "
1892 "are disallowed."
1893 msgstr ""
1894
1895 #. type: TP
1896 #: build/C/man2/ptrace.2:214
1897 #, no-wrap
1898 msgid "B<PTRACE_GETREGS>, B<PTRACE_GETFPREGS>"
1899 msgstr ""
1900
1901 #. type: Plain text
1902 #: build/C/man2/ptrace.2:233
1903 msgid ""
1904 "Copy the tracee's general-purpose or floating-point registers, respectively, "
1905 "to the address I<data> in the tracer.  See I<E<lt>sys/user.hE<gt>> for "
1906 "information on the format of this data.  (I<addr> is ignored.)  Note that "
1907 "SPARC systems have the meaning of I<data> and I<addr> reversed; that is, "
1908 "I<data> is ignored and the registers are copied to the address I<addr>."
1909 msgstr ""
1910
1911 #. type: TP
1912 #: build/C/man2/ptrace.2:233
1913 #, no-wrap
1914 msgid "B<PTRACE_GETSIGINFO> (since Linux 2.3.99-pre6)"
1915 msgstr ""
1916
1917 #. type: Plain text
1918 #: build/C/man2/ptrace.2:245
1919 msgid ""
1920 "Retrieve information about the signal that caused the stop.  Copy a "
1921 "I<siginfo_t> structure (see B<sigaction>(2))  from the tracee to the address "
1922 "I<data> in the tracer.  (I<addr> is ignored.)"
1923 msgstr ""
1924
1925 #. type: TP
1926 #: build/C/man2/ptrace.2:245
1927 #, no-wrap
1928 msgid "B<PTRACE_SETREGS>, B<PTRACE_SETFPREGS>"
1929 msgstr ""
1930
1931 #.  FIXME In the preceding sentence, which modifications are disallowed,
1932 #.  and when they are disallowed, how does userspace discover that fact?
1933 #. type: Plain text
1934 #: build/C/man2/ptrace.2:266
1935 msgid ""
1936 "Copy the tracee's general-purpose or floating-point registers, respectively, "
1937 "from the address I<data> in the tracer.  As for B<PTRACE_POKEUSER>, some "
1938 "general-purpose register modifications may be disallowed.  (I<addr> is "
1939 "ignored.)  Note that SPARC systems have the meaning of I<data> and I<addr> "
1940 "reversed; that is, I<data> is ignored and the registers are copied from the "
1941 "address I<addr>."
1942 msgstr ""
1943
1944 #. type: TP
1945 #: build/C/man2/ptrace.2:266
1946 #, no-wrap
1947 msgid "B<PTRACE_SETSIGINFO> (since Linux 2.3.99-pre6)"
1948 msgstr ""
1949
1950 #. type: Plain text
1951 #: build/C/man2/ptrace.2:282
1952 msgid ""
1953 "Set signal information: copy a I<siginfo_t> structure from the address "
1954 "I<data> in the tracer to the tracee.  This will affect only signals that "
1955 "would normally be delivered to the tracee and were caught by the tracer.  It "
1956 "may be difficult to tell these normal signals from synthetic signals "
1957 "generated by B<ptrace>()  itself.  (I<addr> is ignored.)"
1958 msgstr ""
1959
1960 #. type: TP
1961 #: build/C/man2/ptrace.2:282
1962 #, no-wrap
1963 msgid "B<PTRACE_SETOPTIONS> (since Linux 2.4.6; see BUGS for caveats)"
1964 msgstr ""
1965
1966 #. type: Plain text
1967 #: build/C/man2/ptrace.2:291
1968 msgid ""
1969 "Set ptrace options from I<data>.  (I<addr> is ignored.)  I<data> is "
1970 "interpreted as a bit mask of options, which are specified by the following "
1971 "flags:"
1972 msgstr ""
1973
1974 #. type: TP
1975 #: build/C/man2/ptrace.2:292
1976 #, no-wrap
1977 msgid "B<PTRACE_O_TRACESYSGOOD> (since Linux 2.4.6)"
1978 msgstr ""
1979
1980 #. type: Plain text
1981 #: build/C/man2/ptrace.2:301
1982 msgid ""
1983 "When delivering system call traps, set bit 7 in the signal number (i.e., "
1984 "deliver I<SIGTRAP|0x80>).  This makes it easy for the tracer to distinguish "
1985 "normal traps from those caused by a system call.  (B<PTRACE_O_TRACESYSGOOD> "
1986 "may not work on all architectures.)"
1987 msgstr ""
1988
1989 #. type: TP
1990 #: build/C/man2/ptrace.2:301
1991 #, no-wrap
1992 msgid "B<PTRACE_O_TRACEFORK> (since Linux 2.5.46)"
1993 msgstr ""
1994
1995 #. type: Plain text
1996 #: build/C/man2/ptrace.2:313
1997 msgid ""
1998 "Stop the tracee at the next B<fork>(2)  and automatically start tracing the "
1999 "newly forked process, which will start with a B<SIGSTOP>.  A B<waitpid>(2)  "
2000 "by the tracer will return a I<status> value such that"
2001 msgstr ""
2002
2003 #. type: Plain text
2004 #: build/C/man2/ptrace.2:316
2005 #, no-wrap
2006 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_FORKE<lt>E<lt>8))\n"
2007 msgstr ""
2008
2009 #. type: Plain text
2010 #: build/C/man2/ptrace.2:320 build/C/man2/ptrace.2:339 build/C/man2/ptrace.2:358
2011 msgid "The PID of the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
2012 msgstr ""
2013
2014 #. type: TP
2015 #: build/C/man2/ptrace.2:320
2016 #, no-wrap
2017 msgid "B<PTRACE_O_TRACEVFORK> (since Linux 2.5.46)"
2018 msgstr ""
2019
2020 #. type: Plain text
2021 #: build/C/man2/ptrace.2:332
2022 msgid ""
2023 "Stop the tracee at the next B<vfork>(2)  and automatically start tracing the "
2024 "newly vforked process, which will start with a B<SIGSTOP>.  A B<waitpid>(2)  "
2025 "by the tracer will return a I<status> value such that"
2026 msgstr ""
2027
2028 #. type: Plain text
2029 #: build/C/man2/ptrace.2:335
2030 #, no-wrap
2031 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORKE<lt>E<lt>8))\n"
2032 msgstr ""
2033
2034 #. type: TP
2035 #: build/C/man2/ptrace.2:339
2036 #, no-wrap
2037 msgid "B<PTRACE_O_TRACECLONE> (since Linux 2.5.46)"
2038 msgstr ""
2039
2040 #. type: Plain text
2041 #: build/C/man2/ptrace.2:351
2042 msgid ""
2043 "Stop the tracee at the next B<clone>(2)  and automatically start tracing the "
2044 "newly cloned process, which will start with a B<SIGSTOP>.  A B<waitpid>(2)  "
2045 "by the tracer will return a I<status> value such that"
2046 msgstr ""
2047
2048 #. type: Plain text
2049 #: build/C/man2/ptrace.2:354
2050 #, no-wrap
2051 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_CLONEE<lt>E<lt>8))\n"
2052 msgstr ""
2053
2054 #. type: Plain text
2055 #: build/C/man2/ptrace.2:379
2056 msgid ""
2057 "This option may not catch B<clone>(2)  calls in all cases.  If the tracee "
2058 "calls B<clone>(2)  with the B<CLONE_VFORK> flag, B<PTRACE_EVENT_VFORK> will "
2059 "be delivered instead if B<PTRACE_O_TRACEVFORK> is set; otherwise if the "
2060 "tracee calls B<clone>(2)  with the exit signal set to B<SIGCHLD>, "
2061 "B<PTRACE_EVENT_FORK> will be delivered if B<PTRACE_O_TRACEFORK> is set."
2062 msgstr ""
2063
2064 #. type: TP
2065 #: build/C/man2/ptrace.2:379
2066 #, no-wrap
2067 msgid "B<PTRACE_O_TRACEEXEC> (since Linux 2.5.46)"
2068 msgstr ""
2069
2070 #. type: Plain text
2071 #: build/C/man2/ptrace.2:388
2072 msgid ""
2073 "Stop the tracee at the next B<execve>(2).  A B<waitpid>(2)  by the tracer "
2074 "will return a I<status> value such that"
2075 msgstr ""
2076
2077 #. type: Plain text
2078 #: build/C/man2/ptrace.2:391
2079 #, no-wrap
2080 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXECE<lt>E<lt>8))\n"
2081 msgstr ""
2082
2083 #. type: Plain text
2084 #: build/C/man2/ptrace.2:397
2085 msgid ""
2086 "If the execing thread is not a thread group leader, the thread ID is reset "
2087 "to thread group leader's ID before this stop.  Since Linux 3.0, the former "
2088 "thread ID can be retrieved with B<PTRACE_GETEVENTMSG>."
2089 msgstr ""
2090
2091 #. type: TP
2092 #: build/C/man2/ptrace.2:397
2093 #, no-wrap
2094 msgid "B<PTRACE_O_TRACEVFORKDONE> (since Linux 2.5.60)"
2095 msgstr ""
2096
2097 #. type: Plain text
2098 #: build/C/man2/ptrace.2:406
2099 msgid ""
2100 "Stop the tracee at the completion of the next B<vfork>(2).  A B<waitpid>(2)  "
2101 "by the tracer will return a I<status> value such that"
2102 msgstr ""
2103
2104 #. type: Plain text
2105 #: build/C/man2/ptrace.2:409
2106 #, no-wrap
2107 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORK_DONEE<lt>E<lt>8))\n"
2108 msgstr ""
2109
2110 #. type: Plain text
2111 #: build/C/man2/ptrace.2:413
2112 msgid ""
2113 "The PID of the new process can (since Linux 2.6.18) be retrieved with "
2114 "B<PTRACE_GETEVENTMSG>."
2115 msgstr ""
2116
2117 #. type: TP
2118 #: build/C/man2/ptrace.2:413
2119 #, no-wrap
2120 msgid "B<PTRACE_O_TRACEEXIT> (since Linux 2.5.60)"
2121 msgstr ""
2122
2123 #. type: Plain text
2124 #: build/C/man2/ptrace.2:421
2125 msgid ""
2126 "Stop the tracee at exit.  A B<waitpid>(2)  by the tracer will return a "
2127 "I<status> value such that"
2128 msgstr ""
2129
2130 #. type: Plain text
2131 #: build/C/man2/ptrace.2:424
2132 #, no-wrap
2133 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXITE<lt>E<lt>8))\n"
2134 msgstr ""
2135
2136 #. type: Plain text
2137 #: build/C/man2/ptrace.2:428
2138 msgid "The tracee's exit status can be retrieved with B<PTRACE_GETEVENTMSG>."
2139 msgstr ""
2140
2141 #. type: Plain text
2142 #: build/C/man2/ptrace.2:436
2143 msgid ""
2144 "The tracee is stopped early during process exit, when registers are still "
2145 "available, allowing the tracer to see where the exit occurred, whereas the "
2146 "normal exit notification is done after the process is finished exiting.  "
2147 "Even though context is available, the tracer cannot prevent the exit from "
2148 "happening at this point."
2149 msgstr ""
2150
2151 #. type: TP
2152 #: build/C/man2/ptrace.2:437
2153 #, no-wrap
2154 msgid "B<PTRACE_GETEVENTMSG> (since Linux 2.5.46)"
2155 msgstr ""
2156
2157 #. type: Plain text
2158 #: build/C/man2/ptrace.2:457
2159 msgid ""
2160 "Retrieve a message (as an I<unsigned long>)  about the ptrace event that "
2161 "just happened, placing it at the address I<data> in the tracer.  For "
2162 "B<PTRACE_EVENT_EXIT>, this is the tracee's exit status.  For "
2163 "B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK>, B<PTRACE_EVENT_VFORK_DONE>, and "
2164 "B<PTRACE_EVENT_CLONE>, this is the PID of the new process.  (I<addr> is "
2165 "ignored.)"
2166 msgstr ""
2167
2168 #. type: TP
2169 #: build/C/man2/ptrace.2:457
2170 #, no-wrap
2171 msgid "B<PTRACE_CONT>"
2172 msgstr ""
2173
2174 #. type: Plain text
2175 #: build/C/man2/ptrace.2:469
2176 msgid ""
2177 "Restart the stopped tracee process.  If I<data> is nonzero, it is "
2178 "interpreted as the number of a signal to be delivered to the tracee; "
2179 "otherwise, no signal is delivered.  Thus, for example, the tracer can "
2180 "control whether a signal sent to the tracee is delivered or not.  (I<addr> "
2181 "is ignored.)"
2182 msgstr ""
2183
2184 #. type: TP
2185 #: build/C/man2/ptrace.2:469
2186 #, no-wrap
2187 msgid "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>"
2188 msgstr ""
2189
2190 #. type: Plain text
2191 #: build/C/man2/ptrace.2:493
2192 msgid ""
2193 "Restart the stopped tracee as for B<PTRACE_CONT>, but arrange for the tracee "
2194 "to be stopped at the next entry to or exit from a system call, or after "
2195 "execution of a single instruction, respectively.  (The tracee will also, as "
2196 "usual, be stopped upon receipt of a signal.)  From the tracer's perspective, "
2197 "the tracee will appear to have been stopped by receipt of a B<SIGTRAP>.  So, "
2198 "for B<PTRACE_SYSCALL>, for example, the idea is to inspect the arguments to "
2199 "the system call at the first stop, then do another B<PTRACE_SYSCALL> and "
2200 "inspect the return value of the system call at the second stop.  The I<data> "
2201 "argument is treated as for B<PTRACE_CONT>.  (I<addr> is ignored.)"
2202 msgstr ""
2203
2204 #. type: TP
2205 #: build/C/man2/ptrace.2:493
2206 #, no-wrap
2207 msgid "B<PTRACE_SYSEMU>, B<PTRACE_SYSEMU_SINGLESTEP> (since Linux 2.6.14)"
2208 msgstr ""
2209
2210 #. type: Plain text
2211 #: build/C/man2/ptrace.2:511
2212 msgid ""
2213 "For B<PTRACE_SYSEMU>, continue and stop on entry to the next system call, "
2214 "which will not be executed.  For B<PTRACE_SYSEMU_SINGLESTEP>, do the same "
2215 "but also singlestep if not a system call.  This call is used by programs "
2216 "like User Mode Linux that want to emulate all the tracee's system calls.  "
2217 "The I<data> argument is treated as for B<PTRACE_CONT>.  (I<addr> is ignored; "
2218 "not supported on all architectures.)"
2219 msgstr ""
2220
2221 #. type: TP
2222 #: build/C/man2/ptrace.2:511
2223 #, no-wrap
2224 msgid "B<PTRACE_KILL>"
2225 msgstr ""
2226
2227 #. type: Plain text
2228 #: build/C/man2/ptrace.2:520
2229 msgid ""
2230 "Send the tracee a B<SIGKILL> to terminate it.  (I<addr> and I<data> are "
2231 "ignored.)"
2232 msgstr ""
2233
2234 #.  [Note from Denys Vlasenko:
2235 #.      deprecation suggested by Oleg Nesterov. He prefers to deprecate it
2236 #.      instead of describing (and needing to support) PTRACE_KILL's quirks.]
2237 #. type: Plain text
2238 #: build/C/man2/ptrace.2:539
2239 msgid ""
2240 "I<This operation is deprecated; do not use it!> Instead, send a B<SIGKILL> "
2241 "directly using B<kill>(2)  or B<tgkill>(2).  The problem with B<PTRACE_KILL> "
2242 "is that it requires the tracee to be in signal-delivery-stop, otherwise it "
2243 "may not work (i.e., may complete successfully but won't kill the tracee).  "
2244 "By contrast, sending a B<SIGKILL> directly has no such limitation."
2245 msgstr ""
2246
2247 #. type: TP
2248 #: build/C/man2/ptrace.2:539
2249 #, no-wrap
2250 msgid "B<PTRACE_ATTACH>"
2251 msgstr ""
2252
2253 #.  No longer true (removed by Denys Vlasenko, 2011, who remarks:
2254 #.         "I think it isn't true in non-ancient 2.4 and in 2.6/3.x.
2255 #.          Basically, it's not true for any Linux in practical use.
2256 #.  ; the behavior of the tracee is as if it had done a
2257 #.  .BR PTRACE_TRACEME .
2258 #.  The calling process actually becomes the parent of the tracee
2259 #.  process for most purposes (e.g., it will receive
2260 #.  notification of tracee events and appears in
2261 #.  .BR ps (1)
2262 #.  output as the tracee's parent), but a
2263 #.  .BR getppid (2)
2264 #.  by the tracee will still return the PID of the original parent.
2265 #. type: Plain text
2266 #: build/C/man2/ptrace.2:567
2267 msgid ""
2268 "Attach to the process specified in I<pid>, making it a tracee of the calling "
2269 "process.  The tracee is sent a B<SIGSTOP>, but will not necessarily have "
2270 "stopped by the completion of this call; use B<waitpid>(2)  to wait for the "
2271 "tracee to stop.  See the \"Attaching and detaching\" subsection for "
2272 "additional information.  (I<addr> and I<data> are ignored.)"
2273 msgstr ""
2274
2275 #. type: TP
2276 #: build/C/man2/ptrace.2:567
2277 #, no-wrap
2278 msgid "B<PTRACE_DETACH>"
2279 msgstr ""
2280
2281 #. type: Plain text
2282 #: build/C/man2/ptrace.2:576
2283 msgid ""
2284 "Restart the stopped tracee as for B<PTRACE_CONT>, but first detach from it.  "
2285 "Under Linux, a tracee can be detached in this way regardless of which method "
2286 "was used to initiate tracing.  (I<addr> is ignored.)"
2287 msgstr ""
2288
2289 #. type: SS
2290 #: build/C/man2/ptrace.2:576
2291 #, no-wrap
2292 msgid "Death under ptrace"
2293 msgstr ""
2294
2295 #. type: Plain text
2296 #: build/C/man2/ptrace.2:585
2297 msgid ""
2298 "When a (possibly multithreaded) process receives a killing signal (one whose "
2299 "disposition is set to B<SIG_DFL> and whose default action is to kill the "
2300 "process), all threads exit.  Tracees report their death to their tracer(s).  "
2301 "Notification of this event is delivered via B<waitpid>(2)."
2302 msgstr ""
2303
2304 #. type: Plain text
2305 #: build/C/man2/ptrace.2:594
2306 msgid ""
2307 "Note that the killing signal will first cause signal-delivery-stop (on one "
2308 "tracee only), and only after it is injected by the tracer (or after it was "
2309 "dispatched to a thread which isn't traced), will death from the signal "
2310 "happen on I<all> tracees within a multithreaded process.  (The term "
2311 "\"signal-delivery-stop\" is explained below.)"
2312 msgstr ""
2313
2314 #. type: Plain text
2315 #: build/C/man2/ptrace.2:608
2316 msgid ""
2317 "B<SIGKILL> operates similarly, with exceptions.  No signal-delivery-stop is "
2318 "generated for B<SIGKILL> and therefore the tracer can't suppress it.  "
2319 "B<SIGKILL> kills even within system calls (syscall-exit-stop is not "
2320 "generated prior to death by B<SIGKILL>).  The net effect is that B<SIGKILL> "
2321 "always kills the process (all its threads), even if some threads of the "
2322 "process are ptraced."
2323 msgstr ""
2324
2325 #. type: Plain text
2326 #: build/C/man2/ptrace.2:613
2327 msgid ""
2328 "When the tracee calls B<_exit>(2), it reports its death to its tracer.  "
2329 "Other threads are not affected."
2330 msgstr ""
2331
2332 #. type: Plain text
2333 #: build/C/man2/ptrace.2:617
2334 msgid ""
2335 "When any thread executes B<exit_group>(2), every tracee in its thread group "
2336 "reports its death to its tracer."
2337 msgstr ""
2338
2339 #. type: Plain text
2340 #: build/C/man2/ptrace.2:631
2341 msgid ""
2342 "If the B<PTRACE_O_TRACEEXIT> option is on, B<PTRACE_EVENT_EXIT> will happen "
2343 "before actual death.  This applies to exits via B<exit>(2), "
2344 "B<exit_group>(2), and signal deaths (except B<SIGKILL>), and when threads "
2345 "are torn down on B<execve>(2)  in a multithreaded process."
2346 msgstr ""
2347
2348 #. type: Plain text
2349 #: build/C/man2/ptrace.2:656
2350 msgid ""
2351 "The tracer cannot assume that the ptrace-stopped tracee exists.  There are "
2352 "many scenarios when the tracee may die while stopped (such as B<SIGKILL>).  "
2353 "Therefore, the tracer must be prepared to handle an B<ESRCH> error on any "
2354 "ptrace operation.  Unfortunately, the same error is returned if the tracee "
2355 "exists but is not ptrace-stopped (for commands which require a stopped "
2356 "tracee), or if it is not traced by the process which issued the ptrace "
2357 "call.  The tracer needs to keep track of the stopped/running state of the "
2358 "tracee, and interpret B<ESRCH> as \"tracee died unexpectedly\" only if it "
2359 "knows that the tracee has been observed to enter ptrace-stop.  Note that "
2360 "there is no guarantee that I<waitpid(WNOHANG)> will reliably report the "
2361 "tracee's death status if a ptrace operation returned B<ESRCH>.  "
2362 "I<waitpid(WNOHANG)> may return 0 instead.  In other words, the tracee may be "
2363 "\"not yet fully dead\", but already refusing ptrace requests."
2364 msgstr ""
2365
2366 #. type: Plain text
2367 #: build/C/man2/ptrace.2:670
2368 msgid ""
2369 "The tracer can't assume that the tracee I<always> ends its life by reporting "
2370 "I<WIFEXITED(status)> or I<WIFSIGNALED(status)>; there are cases where this "
2371 "does not occur.  For example, if a thread other than thread group leader "
2372 "does an B<execve>(2), it disappears; its PID will never be seen again, and "
2373 "any subsequent ptrace stops will be reported under the thread group leader's "
2374 "PID."
2375 msgstr ""
2376
2377 #. type: SS
2378 #: build/C/man2/ptrace.2:670
2379 #, no-wrap
2380 msgid "Stopped states"
2381 msgstr ""
2382
2383 #. type: Plain text
2384 #: build/C/man2/ptrace.2:672
2385 msgid "A tracee can be in two states: running or stopped."
2386 msgstr ""
2387
2388 #. type: Plain text
2389 #: build/C/man2/ptrace.2:676
2390 msgid ""
2391 "There are many kinds of states when the tracee is stopped, and in ptrace "
2392 "discussions they are often conflated.  Therefore, it is important to use "
2393 "precise terms."
2394 msgstr ""
2395
2396 #. type: Plain text
2397 #: build/C/man2/ptrace.2:687
2398 msgid ""
2399 "In this manual page, any stopped state in which the tracee is ready to "
2400 "accept ptrace commands from the tracer is called I<ptrace-stop>.  "
2401 "Ptrace-stops can be further subdivided into I<signal-delivery-stop>, "
2402 "I<group-stop>, I<syscall-stop>, and so on.  These stopped states are "
2403 "described in detail below."
2404 msgstr ""
2405
2406 #. type: Plain text
2407 #: build/C/man2/ptrace.2:692
2408 msgid ""
2409 "When the running tracee enters ptrace-stop, it notifies its tracer using "
2410 "B<waitpid>(2)  (or one of the other \"wait\" system calls).  Most of this "
2411 "manual page assumes that the tracer waits with:"
2412 msgstr ""
2413
2414 #. type: Plain text
2415 #: build/C/man2/ptrace.2:694
2416 #, no-wrap
2417 msgid "    pid = waitpid(pid_or_minus_1, &status, __WALL);\n"
2418 msgstr ""
2419
2420 #.  Denys Vlasenko:
2421 #.      Do we require __WALL usage, or will just using 0 be ok? (With 0,
2422 #.      I am not 100% sure there aren't ugly corner cases.) Are the
2423 #.      rules different if user wants to use waitid? Will waitid require
2424 #.      WEXITED?
2425 #. type: Plain text
2426 #: build/C/man2/ptrace.2:706
2427 msgid ""
2428 "Ptrace-stopped tracees are reported as returns with I<pid> greater than 0 "
2429 "and I<WIFSTOPPED(status)> true."
2430 msgstr ""
2431
2432 #. type: Plain text
2433 #: build/C/man2/ptrace.2:714
2434 msgid ""
2435 "The B<__WALL> flag does not include the B<WSTOPPED> and B<WEXITED> flags, "
2436 "but implies their functionality."
2437 msgstr ""
2438
2439 #. type: Plain text
2440 #: build/C/man2/ptrace.2:721
2441 msgid ""
2442 "Setting the B<WCONTINUED> flag when calling B<waitpid>(2)  is not "
2443 "recommended: the \"continued\" state is per-process and consuming it can "
2444 "confuse the real parent of the tracee."
2445 msgstr ""
2446
2447 #. type: Plain text
2448 #: build/C/man2/ptrace.2:729
2449 msgid ""
2450 "Use of the B<WNOHANG> flag may cause B<waitpid>(2)  to return 0 (\"no wait "
2451 "results available yet\")  even if the tracer knows there should be a "
2452 "notification.  Example:"
2453 msgstr ""
2454
2455 #. type: Plain text
2456 #: build/C/man2/ptrace.2:733
2457 #, no-wrap
2458 msgid ""
2459 "    kill(tracee, SIGKILL);\n"
2460 "    waitpid(tracee, &status, __WALL | WNOHANG);\n"
2461 msgstr ""
2462
2463 #. type: Plain text
2464 #: build/C/man2/ptrace.2:756
2465 msgid ""
2466 "The following kinds of ptrace-stops exist: signal-delivery-stops, "
2467 "group-stops, B<PTRACE_EVENT> stops, syscall-stops.  They all are reported by "
2468 "B<waitpid>(2)  with I<WIFSTOPPED(status)> true.  They may be differentiated "
2469 "by examining the value I<statusE<gt>E<gt>8>, and if there is ambiguity in "
2470 "that value, by querying B<PTRACE_GETSIGINFO>.  (Note: the "
2471 "I<WSTOPSIG(status)> macro can't be used to perform this examination, because "
2472 "it returns the value I<(status\\E<gt>E<gt>8)\\ &\\ 0xff>.)"
2473 msgstr ""
2474
2475 #. type: SS
2476 #: build/C/man2/ptrace.2:756
2477 #, no-wrap
2478 msgid "Signal-delivery-stop"
2479 msgstr ""
2480
2481 #. type: Plain text
2482 #: build/C/man2/ptrace.2:776
2483 msgid ""
2484 "When a (possibly multithreaded) process receives any signal except "
2485 "B<SIGKILL>, the kernel selects an arbitrary thread which handles the "
2486 "signal.  (If the signal is generated with B<tgkill>(2), the target thread "
2487 "can be explicitly selected by the caller.)  If the selected thread is "
2488 "traced, it enters signal-delivery-stop.  At this point, the signal is not "
2489 "yet delivered to the process, and can be suppressed by the tracer.  If the "
2490 "tracer doesn't suppress the signal, it passes the signal to the tracee in "
2491 "the next ptrace restart request.  This second step of signal delivery is "
2492 "called I<signal injection> in this manual page.  Note that if the signal is "
2493 "blocked, signal-delivery-stop doesn't happen until the signal is unblocked, "
2494 "with the usual exception that B<SIGSTOP> can't be blocked."
2495 msgstr ""
2496
2497 #. type: Plain text
2498 #: build/C/man2/ptrace.2:790
2499 msgid ""
2500 "Signal-delivery-stop is observed by the tracer as B<waitpid>(2)  returning "
2501 "with I<WIFSTOPPED(status)> true, with the signal returned by "
2502 "I<WSTOPSIG(status)>.  If the signal is B<SIGTRAP>, this may be a different "
2503 "kind of ptrace-stop; see the \"Syscall-stops\" and \"execve\" sections below "
2504 "for details.  If I<WSTOPSIG(status)> returns a stopping signal, this may be "
2505 "a group-stop; see below."
2506 msgstr ""
2507
2508 #. type: SS
2509 #: build/C/man2/ptrace.2:790
2510 #, no-wrap
2511 msgid "Signal injection and suppression"
2512 msgstr ""
2513
2514 #. type: Plain text
2515 #: build/C/man2/ptrace.2:793
2516 msgid ""
2517 "After signal-delivery-stop is observed by the tracer, the tracer should "
2518 "restart the tracee with the call"
2519 msgstr ""
2520
2521 #. type: Plain text
2522 #: build/C/man2/ptrace.2:795
2523 #, no-wrap
2524 msgid "    ptrace(PTRACE_restart, pid, 0, sig)\n"
2525 msgstr ""
2526
2527 #. type: Plain text
2528 #: build/C/man2/ptrace.2:808
2529 msgid ""
2530 "where B<PTRACE_restart> is one of the restarting ptrace requests.  If I<sig> "
2531 "is 0, then a signal is not delivered.  Otherwise, the signal I<sig> is "
2532 "delivered.  This operation is called I<signal injection> in this manual "
2533 "page, to distinguish it from signal-delivery-stop."
2534 msgstr ""
2535
2536 #. type: Plain text
2537 #: build/C/man2/ptrace.2:814
2538 msgid ""
2539 "The I<sig> value may be different from the I<WSTOPSIG(status)> value: the "
2540 "tracer can cause a different signal to be injected."
2541 msgstr ""
2542
2543 #. type: Plain text
2544 #: build/C/man2/ptrace.2:830
2545 msgid ""
2546 "Note that a suppressed signal still causes system calls to return "
2547 "prematurely.  In this case system calls will be restarted: the tracer will "
2548 "observe the tracee to reexecute the interrupted system call (or "
2549 "B<restart_syscall>(2)  system call for a few syscalls which use a different "
2550 "mechanism for restarting) if the tracer uses B<PTRACE_SYSCALL>.  Even system "
2551 "calls (such as B<poll>(2))  which are not restartable after signal are "
2552 "restarted after signal is suppressed; however, kernel bugs exist which cause "
2553 "some syscalls to fail with B<EINTR> even though no observable signal is "
2554 "injected to the tracee."
2555 msgstr ""
2556
2557 #. type: Plain text
2558 #: build/C/man2/ptrace.2:841
2559 msgid ""
2560 "Restarting ptrace commands issued in ptrace-stops other than "
2561 "signal-delivery-stop are not guaranteed to inject a signal, even if I<sig> "
2562 "is nonzero.  No error is reported; a nonzero I<sig> may simply be ignored.  "
2563 "Ptrace users should not try to \"create a new signal\" this way: use "
2564 "B<tgkill>(2)  instead."
2565 msgstr ""
2566
2567 #. type: Plain text
2568 #: build/C/man2/ptrace.2:848
2569 msgid ""
2570 "The fact that signal injection requests may be ignored when restarting the "
2571 "tracee after ptrace stops that are not signal-delivery-stops is a cause of "
2572 "confusion among ptrace users.  One typical scenario is that the tracer "
2573 "observes group-stop, mistakes it for signal-delivery-stop, restarts the "
2574 "tracee with"
2575 msgstr ""
2576
2577 #. type: Plain text
2578 #: build/C/man2/ptrace.2:850
2579 #, no-wrap
2580 msgid "    ptrace(PTRACE_rest, pid, 0, stopsig)\n"
2581 msgstr ""
2582
2583 #. type: Plain text
2584 #: build/C/man2/ptrace.2:856
2585 msgid ""
2586 "with the intention of injecting I<stopsig>, but I<stopsig> gets ignored and "
2587 "the tracee continues to run."
2588 msgstr ""
2589
2590 #. type: Plain text
2591 #: build/C/man2/ptrace.2:876
2592 msgid ""
2593 "The B<SIGCONT> signal has a side effect of waking up (all threads of)  a "
2594 "group-stopped process.  This side effect happens before "
2595 "signal-delivery-stop.  The tracer can't suppress this side effect (it can "
2596 "only suppress signal injection, which only causes the B<SIGCONT> handler to "
2597 "not be executed in the tracee, if such a handler is installed).  In fact, "
2598 "waking up from group-stop may be followed by signal-delivery-stop for "
2599 "signal(s)  I<other than> B<SIGCONT>, if they were pending when B<SIGCONT> "
2600 "was delivered.  In other words, B<SIGCONT> may be not the first signal "
2601 "observed by the tracee after it was sent."
2602 msgstr ""
2603
2604 #. type: Plain text
2605 #: build/C/man2/ptrace.2:880
2606 msgid ""
2607 "Stopping signals cause (all threads of) a process to enter group-stop.  This "
2608 "side effect happens after signal injection, and therefore can be suppressed "
2609 "by the tracer."
2610 msgstr ""
2611
2612 #.  In the Linux 2.4 sources, in arch/i386/kernel/signal.c::do_signal(),
2613 #.  there is:
2614 #
2615 #.              /* The debugger continued.  Ignore SIGSTOP.  */
2616 #.              if (signr == SIGSTOP)
2617 #.                      continue;
2618 #. type: Plain text
2619 #: build/C/man2/ptrace.2:890
2620 msgid "In Linux 2.4 and earlier, the B<SIGSTOP> signal can't be injected."
2621 msgstr ""
2622
2623 #. type: Plain text
2624 #: build/C/man2/ptrace.2:907
2625 msgid ""
2626 "B<PTRACE_GETSIGINFO> can be used to retrieve a I<siginfo_t> structure which "
2627 "corresponds to the delivered signal.  B<PTRACE_SETSIGINFO> may be used to "
2628 "modify it.  If B<PTRACE_SETSIGINFO> has been used to alter I<siginfo_t>, the "
2629 "I<si_signo> field and the I<sig> parameter in the restarting command must "
2630 "match, otherwise the result is undefined."
2631 msgstr ""
2632
2633 #. type: SS
2634 #: build/C/man2/ptrace.2:907
2635 #, no-wrap
2636 msgid "Group-stop"
2637 msgstr ""
2638
2639 #. type: Plain text
2640 #: build/C/man2/ptrace.2:919
2641 msgid ""
2642 "When a (possibly multithreaded) process receives a stopping signal, all "
2643 "threads stop.  If some threads are traced, they enter a group-stop.  Note "
2644 "that the stopping signal will first cause signal-delivery-stop (on one "
2645 "tracee only), and only after it is injected by the tracer (or after it was "
2646 "dispatched to a thread which isn't traced), will group-stop be initiated on "
2647 "I<all> tracees within the multithreaded process.  As usual, every tracee "
2648 "reports its group-stop separately to the corresponding tracer."
2649 msgstr ""
2650
2651 #. type: Plain text
2652 #: build/C/man2/ptrace.2:928
2653 msgid ""
2654 "Group-stop is observed by the tracer as B<waitpid>(2)  returning with "
2655 "I<WIFSTOPPED(status)> true, with the stopping signal available via "
2656 "I<WSTOPSIG(status)>.  The same result is returned by some other classes of "
2657 "ptrace-stops, therefore the recommended practice is to perform the call"
2658 msgstr ""
2659
2660 #. type: Plain text
2661 #: build/C/man2/ptrace.2:930
2662 #, no-wrap
2663 msgid "    ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo)\n"
2664 msgstr ""
2665
2666 #. type: Plain text
2667 #: build/C/man2/ptrace.2:951
2668 msgid ""
2669 "The call can be avoided if the signal is not B<SIGSTOP>, B<SIGTSTP>, "
2670 "B<SIGTTIN>, or B<SIGTTOU>; only these four signals are stopping signals.  If "
2671 "the tracer sees something else, it can't be a group-stop.  Otherwise, the "
2672 "tracer needs to call B<PTRACE_GETSIGINFO>.  If B<PTRACE_GETSIGINFO> fails "
2673 "with B<EINVAL>, then it is definitely a group-stop.  (Other failure codes "
2674 "are possible, such as B<ESRCH> (\"no such process\") if a B<SIGKILL> killed "
2675 "the tracee.)"
2676 msgstr ""
2677
2678 #. type: Plain text
2679 #: build/C/man2/ptrace.2:960
2680 msgid ""
2681 "As of kernel 2.6.38, after the tracer sees the tracee ptrace-stop and until "
2682 "it restarts or kills it, the tracee will not run, and will not send "
2683 "notifications (except B<SIGKILL> death) to the tracer, even if the tracer "
2684 "enters into another B<waitpid>(2)  call."
2685 msgstr ""
2686
2687 #. type: Plain text
2688 #: build/C/man2/ptrace.2:974
2689 msgid ""
2690 "The kernel behavior described in the previous paragraph causes a problem "
2691 "with transparent handling of stopping signals.  If the tracer restarts the "
2692 "tracee after group-stop, the stopping signal is effectively ignored\\(emthe "
2693 "tracee doesn't remain stopped, it runs.  If the tracer doesn't restart the "
2694 "tracee before entering into the next B<waitpid>(2), future B<SIGCONT> "
2695 "signals will not be reported to the tracer; this would cause the B<SIGCONT> "
2696 "signals to have no effect on the tracee."
2697 msgstr ""
2698
2699 #. type: SS
2700 #: build/C/man2/ptrace.2:974
2701 #, no-wrap
2702 msgid "PTRACE_EVENT stops"
2703 msgstr ""
2704
2705 #. type: Plain text
2706 #: build/C/man2/ptrace.2:980
2707 msgid ""
2708 "If the tracer sets B<PTRACE_O_TRACE_*> options, the tracee will enter "
2709 "ptrace-stops called B<PTRACE_EVENT> stops."
2710 msgstr ""
2711
2712 #. type: Plain text
2713 #: build/C/man2/ptrace.2:994
2714 msgid ""
2715 "B<PTRACE_EVENT> stops are observed by the tracer as B<waitpid>(2)  returning "
2716 "with I<WIFSTOPPED(status)>, and I<WSTOPSIG(status)> returns B<SIGTRAP>.  An "
2717 "additional bit is set in the higher byte of the status word: the value "
2718 "I<statusE<gt>E<gt>8> will be"
2719 msgstr ""
2720
2721 #. type: Plain text
2722 #: build/C/man2/ptrace.2:996
2723 #, no-wrap
2724 msgid "    (SIGTRAP | PTRACE_EVENT_foo E<lt>E<lt> 8).\n"
2725 msgstr ""
2726
2727 #. type: Plain text
2728 #: build/C/man2/ptrace.2:998
2729 msgid "The following events exist:"
2730 msgstr ""
2731
2732 #. type: TP
2733 #: build/C/man2/ptrace.2:998
2734 #, no-wrap
2735 msgid "B<PTRACE_EVENT_VFORK>"
2736 msgstr ""
2737
2738 #. type: Plain text
2739 #: build/C/man2/ptrace.2:1011
2740 msgid ""
2741 "Stop before return from B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> "
2742 "flag.  When the tracee is continued after this stop, it will wait for child "
2743 "to exit/exec before continuing its execution (in other words, the usual "
2744 "behavior on B<vfork>(2))."
2745 msgstr ""
2746
2747 #. type: TP
2748 #: build/C/man2/ptrace.2:1011
2749 #, no-wrap
2750 msgid "B<PTRACE_EVENT_FORK>"
2751 msgstr ""
2752
2753 #. type: Plain text
2754 #: build/C/man2/ptrace.2:1019
2755 msgid ""
2756 "Stop before return from B<fork>(2)  or B<clone>(2)  with the exit signal set "
2757 "to B<SIGCHLD>."
2758 msgstr ""
2759
2760 #. type: TP
2761 #: build/C/man2/ptrace.2:1019
2762 #, no-wrap
2763 msgid "B<PTRACE_EVENT_CLONE>"
2764 msgstr ""
2765
2766 #. type: Plain text
2767 #: build/C/man2/ptrace.2:1023
2768 msgid "Stop before return from B<clone>(2)."
2769 msgstr ""
2770
2771 #. type: TP
2772 #: build/C/man2/ptrace.2:1023
2773 #, no-wrap
2774 msgid "B<PTRACE_EVENT_VFORK_DONE>"
2775 msgstr ""
2776
2777 #. type: Plain text
2778 #: build/C/man2/ptrace.2:1033
2779 msgid ""
2780 "Stop before return from B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> "
2781 "flag, but after the child unblocked this tracee by exiting or execing."
2782 msgstr ""
2783
2784 #. type: Plain text
2785 #: build/C/man2/ptrace.2:1039
2786 msgid ""
2787 "For all four stops described above, the stop occurs in the parent (i.e., the "
2788 "tracee), not in the newly created thread.  B<PTRACE_GETEVENTMSG> can be used "
2789 "to retrieve the new thread's ID."
2790 msgstr ""
2791
2792 #. type: TP
2793 #: build/C/man2/ptrace.2:1039
2794 #, no-wrap
2795 msgid "B<PTRACE_EVENT_EXEC>"
2796 msgstr ""
2797
2798 #. type: Plain text
2799 #: build/C/man2/ptrace.2:1046
2800 msgid ""
2801 "Stop before return from B<execve>(2).  Since Linux 3.0, "
2802 "B<PTRACE_GETEVENTMSG> returns the former thread ID."
2803 msgstr ""
2804
2805 #. type: TP
2806 #: build/C/man2/ptrace.2:1046
2807 #, no-wrap
2808 msgid "B<PTRACE_EVENT_EXIT>"
2809 msgstr ""
2810
2811 #. type: Plain text
2812 #: build/C/man2/ptrace.2:1062
2813 msgid ""
2814 "Stop before exit (including death from B<exit_group>(2)), signal death, or "
2815 "exit caused by B<execve>(2)  in a multithreaded process.  "
2816 "B<PTRACE_GETEVENTMSG> returns the exit status.  Registers can be examined "
2817 "(unlike when \"real\" exit happens).  The tracee is still alive; it needs to "
2818 "be B<PTRACE_CONT>ed or B<PTRACE_DETACH>ed to finish exiting."
2819 msgstr ""
2820
2821 #. type: Plain text
2822 #: build/C/man2/ptrace.2:1074
2823 msgid ""
2824 "B<PTRACE_GETSIGINFO> on B<PTRACE_EVENT> stops returns B<SIGTRAP> in "
2825 "I<si_signo>, with I<si_code> set to I<(eventE<lt>E<lt>8)\\ |\\ SIGTRAP>."
2826 msgstr ""
2827
2828 #. type: SS
2829 #: build/C/man2/ptrace.2:1074
2830 #, no-wrap
2831 msgid "Syscall-stops"
2832 msgstr ""
2833
2834 #. type: Plain text
2835 #: build/C/man2/ptrace.2:1087
2836 msgid ""
2837 "If the tracee was restarted by B<PTRACE_SYSCALL>, the tracee enters "
2838 "syscall-enter-stop just prior to entering any system call.  If the tracer "
2839 "restarts the tracee with B<PTRACE_SYSCALL>, the tracee enters "
2840 "syscall-exit-stop when the system call is finished, or if it is interrupted "
2841 "by a signal.  (That is, signal-delivery-stop never happens between "
2842 "syscall-enter-stop and syscall-exit-stop; it happens I<after> "
2843 "syscall-exit-stop.)"
2844 msgstr ""
2845
2846 #. type: Plain text
2847 #: build/C/man2/ptrace.2:1101
2848 msgid ""
2849 "Other possibilities are that the tracee may stop in a B<PTRACE_EVENT> stop, "
2850 "exit (if it entered B<_exit>(2)  or B<exit_group>(2)), be killed by "
2851 "B<SIGKILL>, or die silently (if it is a thread group leader, the "
2852 "B<execve>(2)  happened in another thread, and that thread is not traced by "
2853 "the same tracer; this situation is discussed later)."
2854 msgstr ""
2855
2856 #. type: Plain text
2857 #: build/C/man2/ptrace.2:1116
2858 msgid ""
2859 "Syscall-enter-stop and syscall-exit-stop are observed by the tracer as "
2860 "B<waitpid>(2)  returning with I<WIFSTOPPED(status)> true, and "
2861 "I<WSTOPSIG(status)> giving B<SIGTRAP>.  If the B<PTRACE_O_TRACESYSGOOD> "
2862 "option was set by the tracer, then I<WSTOPSIG(status)> will give the value "
2863 "I<(SIGTRAP\\ |\\ 0x80)>."
2864 msgstr ""
2865
2866 #. type: Plain text
2867 #: build/C/man2/ptrace.2:1122
2868 msgid ""
2869 "Syscall-stops can be distinguished from signal-delivery-stop with B<SIGTRAP> "
2870 "by querying B<PTRACE_GETSIGINFO> for the following cases:"
2871 msgstr ""
2872
2873 #. type: TP
2874 #: build/C/man2/ptrace.2:1122
2875 #, no-wrap
2876 msgid "I<si_code> E<lt>= 0"
2877 msgstr ""
2878
2879 #. type: Plain text
2880 #: build/C/man2/ptrace.2:1134
2881 msgid ""
2882 "B<SIGTRAP> was delivered as a result of a userspace action, for example, a "
2883 "system call (B<tgkill>(2), B<kill>(2), B<sigqueue>(3), etc.), expiration of "
2884 "a POSIX timer, change of state on a POSIX message queue, or completion of an "
2885 "asynchronous I/O request."
2886 msgstr ""
2887
2888 #. type: TP
2889 #: build/C/man2/ptrace.2:1134
2890 #, no-wrap
2891 msgid "I<si_code> == SI_KERNEL (0x80)"
2892 msgstr ""
2893
2894 #. type: Plain text
2895 #: build/C/man2/ptrace.2:1138
2896 msgid "B<SIGTRAP> was sent by the kernel."
2897 msgstr ""
2898
2899 #. type: TP
2900 #: build/C/man2/ptrace.2:1138
2901 #, no-wrap
2902 msgid "I<si_code> == SIGTRAP or I<si_code> == (SIGTRAP|0x80)"
2903 msgstr ""
2904
2905 #. type: Plain text
2906 #: build/C/man2/ptrace.2:1141
2907 msgid "This is a syscall-stop."
2908 msgstr ""
2909
2910 #. type: Plain text
2911 #: build/C/man2/ptrace.2:1146
2912 msgid ""
2913 "However, syscall-stops happen very often (twice per system call), and "
2914 "performing B<PTRACE_GETSIGINFO> for every syscall-stop may be somewhat "
2915 "expensive."
2916 msgstr ""
2917
2918 #. type: Plain text
2919 #: build/C/man2/ptrace.2:1169
2920 msgid ""
2921 "Some architectures allow the cases to be distinguished by examining "
2922 "registers.  For example, on x86, I<rax> == -B<ENOSYS> in "
2923 "syscall-enter-stop.  Since B<SIGTRAP> (like any other signal) always happens "
2924 "I<after> syscall-exit-stop, and at this point I<rax> almost never contains "
2925 "-B<ENOSYS>, the B<SIGTRAP> looks like \"syscall-stop which is not "
2926 "syscall-enter-stop\"; in other words, it looks like a \"stray "
2927 "syscall-exit-stop\" and can be detected this way.  But such detection is "
2928 "fragile and is best avoided."
2929 msgstr ""
2930
2931 #. type: Plain text
2932 #: build/C/man2/ptrace.2:1175
2933 msgid ""
2934 "Using the B<PTRACE_O_TRACESYSGOOD> option is the recommended method to "
2935 "distinguish syscall-stops from other kinds of ptrace-stops, since it is "
2936 "reliable and does not incur a performance penalty."
2937 msgstr ""
2938
2939 #. type: Plain text
2940 #: build/C/man2/ptrace.2:1186
2941 msgid ""
2942 "Syscall-enter-stop and syscall-exit-stop are indistinguishable from each "
2943 "other by the tracer.  The tracer needs to keep track of the sequence of "
2944 "ptrace-stops in order to not misinterpret syscall-enter-stop as "
2945 "syscall-exit-stop or vice versa.  The rule is that syscall-enter-stop is "
2946 "always followed by syscall-exit-stop, B<PTRACE_EVENT> stop or the tracee's "
2947 "death; no other kinds of ptrace-stop can occur in between."
2948 msgstr ""
2949
2950 #. type: Plain text
2951 #: build/C/man2/ptrace.2:1191
2952 msgid ""
2953 "If after syscall-enter-stop, the tracer uses a restarting command other than "
2954 "B<PTRACE_SYSCALL>, syscall-exit-stop is not generated."
2955 msgstr ""
2956
2957 #. type: Plain text
2958 #: build/C/man2/ptrace.2:1203
2959 msgid ""
2960 "B<PTRACE_GETSIGINFO> on syscall-stops returns B<SIGTRAP> in I<si_signo>, "
2961 "with I<si_code> set to B<SIGTRAP> or I<(SIGTRAP|0x80)>."
2962 msgstr ""
2963
2964 #. type: SS
2965 #: build/C/man2/ptrace.2:1203
2966 #, no-wrap
2967 msgid "PTRACE_SINGLESTEP, PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP stops"
2968 msgstr ""
2969
2970 #
2971 #.  FIXME
2972 #.  document stops occurring with PTRACE_SINGLESTEP, PTRACE_SYSEMU,
2973 #.  PTRACE_SYSEMU_SINGLESTEP
2974 #. type: Plain text
2975 #: build/C/man2/ptrace.2:1209
2976 msgid "[Details of these kinds of stops are yet to be documented.]"
2977 msgstr ""
2978
2979 #. type: SS
2980 #: build/C/man2/ptrace.2:1209
2981 #, no-wrap
2982 msgid "Informational and restarting ptrace commands"
2983 msgstr ""
2984
2985 #. type: Plain text
2986 #: build/C/man2/ptrace.2:1217
2987 msgid ""
2988 "Most ptrace commands (all except B<PTRACE_ATTACH>, B<PTRACE_TRACEME>, and "
2989 "B<PTRACE_KILL>)  require the tracee to be in a ptrace-stop, otherwise they "
2990 "fail with B<ESRCH>."
2991 msgstr ""
2992
2993 #. type: Plain text
2994 #: build/C/man2/ptrace.2:1222
2995 msgid ""
2996 "When the tracee is in ptrace-stop, the tracer can read and write data to the "
2997 "tracee using informational commands.  These commands leave the tracee in "
2998 "ptrace-stopped state:"
2999 msgstr ""
3000
3001 #. type: Plain text
3002 #: build/C/man2/ptrace.2:1232
3003 #, no-wrap
3004 msgid ""
3005 "    ptrace(PTRACE_PEEKTEXT/PEEKDATA/PEEKUSER, pid, addr, 0);\n"
3006 "    ptrace(PTRACE_POKETEXT/POKEDATA/POKEUSER, pid, addr, long_val);\n"
3007 "    ptrace(PTRACE_GETREGS/GETFPREGS, pid, 0, &struct);\n"
3008 "    ptrace(PTRACE_SETREGS/SETFPREGS, pid, 0, &struct);\n"
3009 "    ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo);\n"
3010 "    ptrace(PTRACE_SETSIGINFO, pid, 0, &siginfo);\n"
3011 "    ptrace(PTRACE_GETEVENTMSG, pid, 0, &long_var);\n"
3012 "    ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
3013 msgstr ""
3014
3015 #. type: Plain text
3016 #: build/C/man2/ptrace.2:1244
3017 msgid ""
3018 "Note that some errors are not reported.  For example, setting signal "
3019 "information (I<siginfo>)  may have no effect in some ptrace-stops, yet the "
3020 "call may succeed (return 0 and not set I<errno>); querying "
3021 "B<PTRACE_GETEVENTMSG> may succeed and return some random value if current "
3022 "ptrace-stop is not documented as returning a meaningful event message."
3023 msgstr ""
3024
3025 #. type: Plain text
3026 #: build/C/man2/ptrace.2:1246
3027 msgid "The call"
3028 msgstr ""
3029
3030 #. type: Plain text
3031 #: build/C/man2/ptrace.2:1248
3032 #, no-wrap
3033 msgid "    ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
3034 msgstr ""
3035
3036 #. type: Plain text
3037 #: build/C/man2/ptrace.2:1257
3038 msgid ""
3039 "affects one tracee.  The tracee's current flags are replaced.  Flags are "
3040 "inherited by new tracees created and \"auto-attached\" via active "
3041 "B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or B<PTRACE_O_TRACECLONE> "
3042 "options."
3043 msgstr ""
3044
3045 #. type: Plain text
3046 #: build/C/man2/ptrace.2:1260
3047 msgid ""
3048 "Another group of commands makes the ptrace-stopped tracee run.  They have "
3049 "the form:"
3050 msgstr ""
3051
3052 #. type: Plain text
3053 #: build/C/man2/ptrace.2:1262
3054 #, no-wrap
3055 msgid "    ptrace(cmd, pid, 0, sig);\n"
3056 msgstr ""
3057
3058 #. type: Plain text
3059 #: build/C/man2/ptrace.2:1282
3060 msgid ""
3061 "where I<cmd> is B<PTRACE_CONT>, B<PTRACE_DETACH>, B<PTRACE_SYSCALL>, "
3062 "B<PTRACE_SINGLESTEP>, B<PTRACE_SYSEMU>, or B<PTRACE_SYSEMU_SINGLESTEP>.  If "
3063 "the tracee is in signal-delivery-stop, I<sig> is the signal to be injected "
3064 "(if it is nonzero).  Otherwise, I<sig> may be ignored.  (When restarting a "
3065 "tracee from a ptrace-stop other than signal-delivery-stop, recommended "
3066 "practice is to always pass 0 in I<sig>.)"
3067 msgstr ""
3068
3069 #. type: SS
3070 #: build/C/man2/ptrace.2:1282
3071 #, no-wrap
3072 msgid "Attaching and detaching"
3073 msgstr ""
3074
3075 #. type: Plain text
3076 #: build/C/man2/ptrace.2:1284
3077 msgid "A thread can be attached to the tracer using the call"
3078 msgstr ""
3079
3080 #. type: Plain text
3081 #: build/C/man2/ptrace.2:1286
3082 #, no-wrap
3083 msgid "    ptrace(PTRACE_ATTACH, pid, 0, 0);\n"
3084 msgstr ""
3085
3086 #
3087 #.  FIXME: Describe how to attach to a thread which is already
3088 #.         group-stopped.
3089 #. type: Plain text
3090 #: build/C/man2/ptrace.2:1310
3091 msgid ""
3092 "This also sends B<SIGSTOP> to this thread.  If the tracer wants this "
3093 "B<SIGSTOP> to have no effect, it needs to suppress it.  Note that if other "
3094 "signals are concurrently sent to this thread during attach, the tracer may "
3095 "see the tracee enter signal-delivery-stop with other signal(s) first! The "
3096 "usual practice is to reinject these signals until B<SIGSTOP> is seen, then "
3097 "suppress B<SIGSTOP> injection.  The design bug here is that a ptrace attach "
3098 "and a concurrently delivered B<SIGSTOP> may race and the concurrent "
3099 "B<SIGSTOP> may be lost."
3100 msgstr ""
3101
3102 #. type: Plain text
3103 #: build/C/man2/ptrace.2:1317
3104 msgid ""
3105 "Since attaching sends B<SIGSTOP> and the tracer usually suppresses it, this "
3106 "may cause a stray B<EINTR> return from the currently executing system call "
3107 "in the tracee, as described in the \"Signal injection and suppression\" "
3108 "section."
3109 msgstr ""
3110
3111 #. type: Plain text
3112 #: build/C/man2/ptrace.2:1319
3113 msgid "The request"
3114 msgstr ""
3115
3116 #. type: Plain text
3117 #: build/C/man2/ptrace.2:1321
3118 #, no-wrap
3119 msgid "    ptrace(PTRACE_TRACEME, 0, 0, 0);\n"
3120 msgstr ""
3121
3122 #. type: Plain text
3123 #: build/C/man2/ptrace.2:1327
3124 msgid ""
3125 "turns the calling thread into a tracee.  The thread continues to run "
3126 "(doesn't enter ptrace-stop).  A common practice is to follow the "
3127 "B<PTRACE_TRACEME> with"
3128 msgstr ""
3129
3130 #. type: Plain text
3131 #: build/C/man2/ptrace.2:1329
3132 #, no-wrap
3133 msgid "    raise(SIGSTOP);\n"
3134 msgstr ""
3135
3136 #. type: Plain text
3137 #: build/C/man2/ptrace.2:1332
3138 msgid ""
3139 "and allow the parent (which is our tracer now) to observe our "
3140 "signal-delivery-stop."
3141 msgstr ""
3142
3143 #. type: Plain text
3144 #: build/C/man2/ptrace.2:1356
3145 msgid ""
3146 "If the B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or "
3147 "B<PTRACE_O_TRACECLONE> options are in effect, then children created by, "
3148 "respectively, B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> flag, "
3149 "B<fork>(2)  or B<clone>(2)  with the exit signal set to B<SIGCHLD>, and "
3150 "other kinds of B<clone>(2), are automatically attached to the same tracer "
3151 "which traced their parent.  B<SIGSTOP> is delivered to the children, causing "
3152 "them to enter signal-delivery-stop after they exit the system call which "
3153 "created them."
3154 msgstr ""
3155
3156 #. type: Plain text
3157 #: build/C/man2/ptrace.2:1358
3158 msgid "Detaching of the tracee is performed by:"
3159 msgstr ""
3160
3161 #. type: Plain text
3162 #: build/C/man2/ptrace.2:1360
3163 #, no-wrap
3164 msgid "    ptrace(PTRACE_DETACH, pid, 0, sig);\n"
3165 msgstr ""
3166
3167 #. type: Plain text
3168 #: build/C/man2/ptrace.2:1368
3169 msgid ""
3170 "B<PTRACE_DETACH> is a restarting operation; therefore it requires the tracee "
3171 "to be in ptrace-stop.  If the tracee is in signal-delivery-stop, a signal "
3172 "can be injected.  Otherwise, the I<sig> parameter may be silently ignored."
3173 msgstr ""
3174
3175 #.  FIXME: Describe how to detach from a group-stopped tracee so that it
3176 #.         doesn't run, but continues to wait for SIGCONT.
3177 #. type: Plain text
3178 #: build/C/man2/ptrace.2:1392
3179 msgid ""
3180 "If the tracee is running when the tracer wants to detach it, the usual "
3181 "solution is to send B<SIGSTOP> (using B<tgkill>(2), to make sure it goes to "
3182 "the correct thread), wait for the tracee to stop in signal-delivery-stop for "
3183 "B<SIGSTOP> and then detach it (suppressing B<SIGSTOP> injection).  A design "
3184 "bug is that this can race with concurrent B<SIGSTOP>s.  Another complication "
3185 "is that the tracee may enter other ptrace-stops and needs to be restarted "
3186 "and waited for again, until B<SIGSTOP> is seen.  Yet another complication is "
3187 "to be sure that the tracee is not already ptrace-stopped, because no signal "
3188 "delivery happens while it is\\(emnot even B<SIGSTOP>."
3189 msgstr ""
3190
3191 #. type: Plain text
3192 #: build/C/man2/ptrace.2:1400
3193 msgid ""
3194 "If the tracer dies, all tracees are automatically detached and restarted, "
3195 "unless they were in group-stop.  Handling of restart from group-stop is "
3196 "currently buggy, but the \"as planned\" behavior is to leave tracee stopped "
3197 "and waiting for B<SIGCONT>.  If the tracee is restarted from "
3198 "signal-delivery-stop, the pending signal is injected."
3199 msgstr ""
3200
3201 #. type: SS
3202 #: build/C/man2/ptrace.2:1400
3203 #, no-wrap
3204 msgid "execve(2) under ptrace"
3205 msgstr ""
3206
3207 #.  clone(2) THREAD_CLONE says:
3208 #.      If  any  of the threads in a thread group performs an execve(2),
3209 #.      then all threads other than the thread group leader are terminated,
3210 #.      and the new program is executed in the thread group leader.
3211 #
3212 #.  In kernel 3.1 sources, see fs/exec.c::de_thread()
3213 #. type: Plain text
3214 #: build/C/man2/ptrace.2:1419
3215 msgid ""
3216 "When one thread in a multithreaded process calls B<execve>(2), the kernel "
3217 "destroys all other threads in the process, and resets the thread ID of the "
3218 "execing thread to the thread group ID (process ID).  (Or, to put things "
3219 "another way, when a multithreaded process does an B<execve>(2), at "
3220 "completion of the call, it appears as though the B<execve>(2)  occurred in "
3221 "the thread group leader, regardless of which thread did the B<execve>(2).)  "
3222 "This resetting of the thread ID looks very confusing to tracers:"
3223 msgstr ""
3224
3225 #. type: IP
3226 #: build/C/man2/ptrace.2:1419 build/C/man2/ptrace.2:1429 build/C/man2/ptrace.2:1437 build/C/man2/ptrace.2:1443 build/C/man2/ptrace.2:1572
3227 #, no-wrap
3228 msgid "*"
3229 msgstr ""
3230
3231 #. type: Plain text
3232 #: build/C/man2/ptrace.2:1429
3233 msgid ""
3234 "All other threads stop in B<PTRACE_EVENT_EXIT> stop, if the "
3235 "B<PTRACE_O_TRACEEXIT> option was turned on.  Then all other threads except "
3236 "the thread group leader report death as if they exited via B<_exit>(2)  with "
3237 "exit code 0."
3238 msgstr ""
3239
3240 #. type: Plain text
3241 #: build/C/man2/ptrace.2:1437
3242 msgid ""
3243 "The execing tracee changes its thread ID while it is in the B<execve>(2).  "
3244 "(Remember, under ptrace, the \"pid\" returned from B<waitpid>(2), or fed "
3245 "into ptrace calls, is the tracee's thread ID.)  That is, the tracee's thread "
3246 "ID is reset to be the same as its process ID, which is the same as the "
3247 "thread group leader's thread ID."
3248 msgstr ""
3249
3250 #. type: Plain text
3251 #: build/C/man2/ptrace.2:1443
3252 msgid ""
3253 "Then a B<PTRACE_EVENT_EXEC> stop happens, if the B<PTRACE_O_TRACEEXEC> "
3254 "option was turned on."
3255 msgstr ""
3256
3257 #. type: Plain text
3258 #: build/C/man2/ptrace.2:1464
3259 msgid ""
3260 "If the thread group leader has reported its B<PTRACE_EVENT_EXIT> stop by "
3261 "this time, it appears to the tracer that the dead thread leader \"reappears "
3262 "from nowhere\".  (Note: the thread group leader does not report death via "
3263 "I<WIFEXITED(status)> until there is at least one other live thread.  This "
3264 "eliminates the possibility that the tracer will see it dying and then "
3265 "reappearing.)  If the thread group leader was still alive, for the tracer "
3266 "this may look as if thread group leader returns from a different system call "
3267 "than it entered, or even \"returned from a system call even though it was "
3268 "not in any system call\".  If the thread group leader was not traced (or was "
3269 "traced by a different tracer), then during B<execve>(2)  it will appear as "
3270 "if it has become a tracee of the tracer of the execing tracee."
3271 msgstr ""
3272
3273 #. type: Plain text
3274 #: build/C/man2/ptrace.2:1467
3275 msgid ""
3276 "All of the above effects are the artifacts of the thread ID change in the "
3277 "tracee."
3278 msgstr ""
3279
3280 #. type: Plain text
3281 #: build/C/man2/ptrace.2:1487
3282 msgid ""
3283 "The B<PTRACE_O_TRACEEXEC> option is the recommended tool for dealing with "
3284 "this situation.  First, it enables B<PTRACE_EVENT_EXEC> stop, which occurs "
3285 "before B<execve>(2)  returns.  In this stop, the tracer can use "
3286 "B<PTRACE_GETEVENTMSG> to retrieve the tracee's former thread ID.  (This "
3287 "feature was introduced in Linux 3.0).  Second, the B<PTRACE_O_TRACEEXEC> "
3288 "option disables legacy B<SIGTRAP> generation on B<execve>(2)."
3289 msgstr ""
3290
3291 #. type: Plain text
3292 #: build/C/man2/ptrace.2:1493
3293 msgid ""
3294 "When the tracer receives B<PTRACE_EVENT_EXEC> stop notification, it is "
3295 "guaranteed that except this tracee and the thread group leader, no other "
3296 "threads from the process are alive."
3297 msgstr ""
3298
3299 #. type: Plain text
3300 #: build/C/man2/ptrace.2:1501
3301 msgid ""
3302 "On receiving the B<PTRACE_EVENT_EXEC> stop notification, the tracer should "
3303 "clean up all its internal data structures describing the threads of this "
3304 "process, and retain only one data structure\\(emone which describes the "
3305 "single still running tracee, with"
3306 msgstr ""
3307
3308 #. type: Plain text
3309 #: build/C/man2/ptrace.2:1503
3310 #, no-wrap
3311 msgid "    thread ID == thread group ID == process ID.\n"
3312 msgstr ""
3313
3314 #. type: Plain text
3315 #: build/C/man2/ptrace.2:1507
3316 msgid "Example: two threads call B<execve>(2)  at the same time:"
3317 msgstr ""
3318
3319 #. type: Plain text
3320 #: build/C/man2/ptrace.2:1518
3321 #, no-wrap
3322 msgid ""
3323 "*** we get syscall-enter-stop in thread 1: **\n"
3324 "PID1 execve(\"/bin/foo\", \"foo\" E<lt>unfinished ...E<gt>\n"
3325 "*** we issue PTRACE_SYSCALL for thread 1 **\n"
3326 "*** we get syscall-enter-stop in thread 2: **\n"
3327 "PID2 execve(\"/bin/bar\", \"bar\" E<lt>unfinished ...E<gt>\n"
3328 "*** we issue PTRACE_SYSCALL for thread 2 **\n"
3329 "*** we get PTRACE_EVENT_EXEC for PID0, we issue PTRACE_SYSCALL **\n"
3330 "*** we get syscall-exit-stop for PID0: **\n"
3331 "PID0 E<lt>... execve resumedE<gt> )             = 0\n"
3332 msgstr ""
3333
3334 #. type: Plain text
3335 #: build/C/man2/ptrace.2:1541
3336 msgid ""
3337 "If the B<PTRACE_O_TRACEEXEC> option is I<not> in effect for the execing "
3338 "tracee, the kernel delivers an extra B<SIGTRAP> to the tracee after "
3339 "B<execve>(2)  returns.  This is an ordinary signal (similar to one which can "
3340 "be generated by I<kill -TRAP>), not a special kind of ptrace-stop.  "
3341 "Employing B<PTRACE_GETSIGINFO> for this signal returns I<si_code> set to 0 "
3342 "(I<SI_USER>).  This signal may be blocked by signal mask, and thus may be "
3343 "delivered (much) later."
3344 msgstr ""
3345
3346 #. type: Plain text
3347 #: build/C/man2/ptrace.2:1560
3348 msgid ""
3349 "Usually, the tracer (for example, B<strace>(1))  would not want to show this "
3350 "extra post-execve B<SIGTRAP> signal to the user, and would suppress its "
3351 "delivery to the tracee (if B<SIGTRAP> is set to B<SIG_DFL>, it is a killing "
3352 "signal).  However, determining I<which> B<SIGTRAP> to suppress is not easy.  "
3353 "Setting the B<PTRACE_O_TRACEEXEC> option and thus suppressing this extra "
3354 "B<SIGTRAP> is the recommended approach."
3355 msgstr ""
3356
3357 #. type: SS
3358 #: build/C/man2/ptrace.2:1560
3359 #, no-wrap
3360 msgid "Real parent"
3361 msgstr ""
3362
3363 #. type: Plain text
3364 #: build/C/man2/ptrace.2:1567
3365 msgid ""
3366 "The ptrace API (ab)uses the standard UNIX parent/child signaling over "
3367 "B<waitpid>(2).  This used to cause the real parent of the process to stop "
3368 "receiving several kinds of B<waitpid>(2)  notifications when the child "
3369 "process is traced by some other process."
3370 msgstr ""
3371
3372 #. type: Plain text
3373 #: build/C/man2/ptrace.2:1570
3374 msgid ""
3375 "Many of these bugs have been fixed, but as of Linux 2.6.38 several still "
3376 "exist; see BUGS below."
3377 msgstr ""
3378
3379 #. type: Plain text
3380 #: build/C/man2/ptrace.2:1572
3381 msgid "As of Linux 2.6.38, the following is believed to work correctly:"
3382 msgstr ""
3383
3384 #. type: Plain text
3385 #: build/C/man2/ptrace.2:1580
3386 msgid ""
3387 "exit/death by signal is reported first to the tracer, then, when the tracer "
3388 "consumes the B<waitpid>(2)  result, to the real parent (to the real parent "
3389 "only when the whole multithreaded process exits).  If the tracer and the "
3390 "real parent are the same process, the report is sent only once."
3391 msgstr ""
3392
3393 #. type: Plain text
3394 #: build/C/man2/ptrace.2:1594
3395 msgid ""
3396 "On success, B<PTRACE_PEEK*> requests return the requested data, while other "
3397 "requests return zero.  On error, all requests return -1, and I<errno> is set "
3398 "appropriately.  Since the value returned by a successful B<PTRACE_PEEK*> "
3399 "request may be -1, the caller must clear I<errno> before the call, and then "
3400 "check it afterward to determine whether or not an error occurred."
3401 msgstr ""
3402
3403 #. type: Plain text
3404 #: build/C/man2/ptrace.2:1598
3405 msgid "(i386 only) There was an error with allocating or freeing a debug register."
3406 msgstr ""
3407
3408 #. type: Plain text
3409 #: build/C/man2/ptrace.2:1609
3410 msgid ""
3411 "There was an attempt to read from or write to an invalid area in the "
3412 "tracer's or the tracee's memory, probably because the area wasn't mapped or "
3413 "accessible.  Unfortunately, under Linux, different variations of this fault "
3414 "will return B<EIO> or B<EFAULT> more or less arbitrarily."
3415 msgstr ""
3416
3417 #. type: Plain text
3418 #: build/C/man2/ptrace.2:1612
3419 msgid "An attempt was made to set an invalid option."
3420 msgstr ""
3421
3422 #. type: Plain text
3423 #: build/C/man2/ptrace.2:1619
3424 msgid ""
3425 "I<request> is invalid, or an attempt was made to read from or write to an "
3426 "invalid area in the tracer's or the tracee's memory, or there was a "
3427 "word-alignment violation, or an invalid signal was specified during a "
3428 "restart request."
3429 msgstr ""
3430
3431 #. type: Plain text
3432 #: build/C/man2/ptrace.2:1632
3433 msgid ""
3434 "The specified process cannot be traced.  This could be because the tracer "
3435 "has insufficient privileges (the required capability is B<CAP_SYS_PTRACE>); "
3436 "unprivileged processes cannot trace processes that they cannot send signals "
3437 "to or those running set-user-ID/set-group-ID programs, for obvious reasons.  "
3438 "Alternatively, the process may already be being traced, or (on kernels "
3439 "before 2.6.26) be B<init>(8)  (PID 1)."
3440 msgstr ""
3441
3442 #. type: TP
3443 #: build/C/man2/ptrace.2:1632 build/C/man2/quotactl.2:459 build/C/man2/quotactl.2:502
3444 #, no-wrap
3445 msgid "B<ESRCH>"
3446 msgstr ""
3447
3448 #. type: Plain text
3449 #: build/C/man2/ptrace.2:1637
3450 msgid ""
3451 "The specified process does not exist, or is not currently being traced by "
3452 "the caller, or is not stopped (for requests that require a stopped tracee)."
3453 msgstr ""
3454
3455 #. type: Plain text
3456 #: build/C/man2/ptrace.2:1639
3457 msgid "SVr4, 4.3BSD."
3458 msgstr ""
3459
3460 #. type: Plain text
3461 #: build/C/man2/ptrace.2:1652
3462 msgid ""
3463 "Although arguments to B<ptrace>()  are interpreted according to the "
3464 "prototype given, glibc currently declares B<ptrace>()  as a variadic "
3465 "function with only the I<request> argument fixed.  This means that unneeded "
3466 "trailing arguments may be omitted, though doing so makes use of undocumented "
3467 "B<gcc>(1)  behavior."
3468 msgstr ""
3469
3470 #.  See commit 00cd5c37afd5f431ac186dd131705048c0a11fdb
3471 #. type: Plain text
3472 #: build/C/man2/ptrace.2:1657
3473 msgid ""
3474 "In Linux kernels before 2.6.26, B<init>(8), the process with PID 1, may not "
3475 "be traced."
3476 msgstr ""
3477
3478 #.  See http://lkml.org/lkml/2008/5/8/375
3479 #. type: Plain text
3480 #: build/C/man2/ptrace.2:1664
3481 msgid ""
3482 "The layout of the contents of memory and the USER area are quite "
3483 "operating-system- and architecture-specific.  The offset supplied, and the "
3484 "data returned, might not entirely match with the definition of I<struct "
3485 "user>."
3486 msgstr ""
3487
3488 #. type: Plain text
3489 #: build/C/man2/ptrace.2:1667
3490 msgid ""
3491 "The size of a \"word\" is determined by the operating-system variant (e.g., "
3492 "for 32-bit Linux it is 32 bits, etc.)."
3493 msgstr ""
3494
3495 #. type: Plain text
3496 #: build/C/man2/ptrace.2:1675
3497 msgid ""
3498 "This page documents the way the B<ptrace>()  call works currently in Linux.  "
3499 "Its behavior differs noticeably on other flavors of UNIX.  In any case, use "
3500 "of B<ptrace>()  is highly specific to the operating system and architecture."
3501 msgstr ""
3502
3503 #. type: Plain text
3504 #: build/C/man2/ptrace.2:1686
3505 msgid ""
3506 "On hosts with 2.6 kernel headers, B<PTRACE_SETOPTIONS> is declared with a "
3507 "different value than the one for 2.4.  This leads to applications compiled "
3508 "with 2.6 kernel headers failing when run on 2.4 kernels.  This can be worked "
3509 "around by redefining B<PTRACE_SETOPTIONS> to B<PTRACE_OLDSETOPTIONS>, if "
3510 "that is defined."
3511 msgstr ""
3512
3513 #. type: Plain text
3514 #: build/C/man2/ptrace.2:1689
3515 msgid ""
3516 "Group-stop notifications are sent to the tracer, but not to real parent.  "
3517 "Last confirmed on 2.6.38.6."
3518 msgstr ""
3519
3520 #.  Note from Denys Vlasenko:
3521 #.      Here "exits" means any kind of death - _exit, exit_group,
3522 #.      signal death. Signal death and exit_group cases are trivial,
3523 #.      though: since signal death and exit_group kill all other threads
3524 #.      too, "until all other threads exit" thing happens rather soon
3525 #.      in these cases. Therefore, only _exit presents observably
3526 #.      puzzling behavior to ptrace users: thread leader _exit's,
3527 #.      but WIFEXITED isn't reported! We are trying to explain here
3528 #.      why it is so.
3529 #.   FIXME: ^^^ need to test/verify this scenario
3530 #. type: Plain text
3531 #: build/C/man2/ptrace.2:1720
3532 msgid ""
3533 "If a thread group leader is traced and exits by calling B<_exit>(2), a "
3534 "B<PTRACE_EVENT_EXIT> stop will happen for it (if requested), but the "
3535 "subsequent B<WIFEXITED> notification will not be delivered until all other "
3536 "threads exit.  As explained above, if one of other threads calls "
3537 "B<execve>(2), the death of the thread group leader will I<never> be "
3538 "reported.  If the execed thread is not traced by this tracer, the tracer "
3539 "will never know that B<execve>(2)  happened.  One possible workaround is to "
3540 "B<PTRACE_DETACH> the thread group leader instead of restarting it in this "
3541 "case.  Last confirmed on 2.6.38.6."
3542 msgstr ""
3543
3544 #. type: Plain text
3545 #: build/C/man2/ptrace.2:1730
3546 msgid ""
3547 "A B<SIGKILL> signal may still cause a B<PTRACE_EVENT_EXIT> stop before "
3548 "actual signal death.  This may be changed in the future; B<SIGKILL> is meant "
3549 "to always immediately kill tasks even under ptrace.  Last confirmed on "
3550 "2.6.38.6."
3551 msgstr ""
3552
3553 #. type: Plain text
3554 #: build/C/man2/ptrace.2:1746
3555 msgid ""
3556 "Some system calls return with B<EINTR> if a signal was sent to a tracee, but "
3557 "delivery was suppressed by the tracer.  (This is very typical operation: it "
3558 "is usually done by debuggers on every attach, in order to not introduce a "
3559 "bogus B<SIGSTOP>).  As of Linux 3.2.9, the following system calls are "
3560 "affected (this list is likely incomplete): B<epoll_wait>(2), and B<read>(2)  "
3561 "from an B<inotify>(7)  file descriptor."
3562 msgstr ""
3563
3564 #. type: Plain text
3565 #: build/C/man2/ptrace.2:1760
3566 msgid ""
3567 "B<gdb>(1), B<strace>(1), B<clone>(2), B<execve>(2), B<fork>(2), "
3568 "B<gettid>(2), B<sigaction>(2), B<tgkill>(2), B<vfork>(2), B<waitpid>(2), "
3569 "B<exec>(3), B<capabilities>(7), B<signal>(7)"
3570 msgstr ""
3571
3572 #. type: TH
3573 #: build/C/man2/quotactl.2:25
3574 #, no-wrap
3575 msgid "QUOTACTL"
3576 msgstr ""
3577
3578 #. type: TH
3579 #: build/C/man2/quotactl.2:25
3580 #, no-wrap
3581 msgid "2010-06-16"
3582 msgstr ""
3583
3584 #. type: Plain text
3585 #: build/C/man2/quotactl.2:28
3586 msgid "quotactl - manipulate disk quotas"
3587 msgstr ""
3588
3589 #. type: Plain text
3590 #: build/C/man2/quotactl.2:32
3591 #, no-wrap
3592 msgid ""
3593 "B<#include E<lt>sys/quota.hE<gt>>\n"
3594 "B<#include E<lt>xfs/xqm.hE<gt>>\n"
3595 msgstr ""
3596
3597 #. type: Plain text
3598 #: build/C/man2/quotactl.2:35
3599 #, no-wrap
3600 msgid ""
3601 "B<int quotactl(int >I<cmd>B<, const char *>I<special>B<, int >I<id>B<, "
3602 "caddr_t >I<addr>B<);>\n"
3603 msgstr ""
3604
3605 #. type: Plain text
3606 #: build/C/man2/quotactl.2:47
3607 msgid ""
3608 "The quota system can be used to set per-user and per-group limits on the "
3609 "amount of disk space used on a file system.  For each user and/or group, a "
3610 "soft limit and a hard limit can be set for each file system.  The hard limit "
3611 "can't be exceeded.  The soft limit can be exceeded, but warnings will "
3612 "ensue.  Moreover, the user can't exceed the soft limit for more than one "
3613 "week (by default) at a time; after this time, the soft limit counts as a "
3614 "hard limit."
3615 msgstr ""
3616
3617 #. type: Plain text
3618 #: build/C/man2/quotactl.2:72
3619 msgid ""
3620 "The B<quotactl>()  call manipulates disk quotas.  The I<cmd> argument "
3621 "indicates a command to be applied to the user or group ID specified in "
3622 "I<id>.  To initialize the I<cmd> argument, use the I<QCMD(subcmd, type)> "
3623 "macro.  The I<type> value is either B<USRQUOTA>, for user quotas, or "
3624 "B<GRPQUOTA>, for group quotas.  The I<subcmd> value is described below."
3625 msgstr ""
3626
3627 #. type: Plain text
3628 #: build/C/man2/quotactl.2:77
3629 msgid ""
3630 "The I<special> argument is a pointer to a null-terminated string containing "
3631 "the pathname of the (mounted) block special device for the file system being "
3632 "manipulated."
3633 msgstr ""
3634
3635 #. type: Plain text
3636 #: build/C/man2/quotactl.2:85
3637 msgid ""
3638 "The I<addr> argument is the address of an optional, command-specific, data "
3639 "structure that is copied in or out of the system.  The interpretation of "
3640 "I<addr> is given with each command below."
3641 msgstr ""
3642
3643 #. type: Plain text
3644 #: build/C/man2/quotactl.2:89
3645 msgid "The I<subcmd> value is one of the following:"
3646 msgstr ""
3647
3648 #. type: TP
3649 #: build/C/man2/quotactl.2:89
3650 #, no-wrap
3651 msgid "B<Q_QUOTAON>"
3652 msgstr ""
3653
3654 #. type: Plain text
3655 #: build/C/man2/quotactl.2:96
3656 msgid ""
3657 "Turn on quotas for a file system.  The I<id> argument is the identification "
3658 "number of the quota format to be used.  Currently, there are three supported "
3659 "quota formats:"
3660 msgstr ""
3661
3662 #. type: TP
3663 #: build/C/man2/quotactl.2:97
3664 #, no-wrap
3665 msgid "B<QFMT_VFS_OLD>"
3666 msgstr ""
3667
3668 #. type: Plain text
3669 #: build/C/man2/quotactl.2:100
3670 msgid "The original quota format."
3671 msgstr ""
3672
3673 #. type: TP
3674 #: build/C/man2/quotactl.2:100
3675 #, no-wrap
3676 msgid "B<QFMT_VFS_V0>"
3677 msgstr ""
3678
3679 #. type: Plain text
3680 #: build/C/man2/quotactl.2:104
3681 msgid ""
3682 "The standard VFS v0 quota format, which can handle 32-bit UIDs and GIDs and "
3683 "quota limits up to 2^42 bytes and 2^32 inodes."
3684 msgstr ""
3685
3686 #. type: TP
3687 #: build/C/man2/quotactl.2:104
3688 #, no-wrap
3689 msgid "B<QFMT_VFS_V1>"
3690 msgstr ""
3691
3692 #. type: Plain text
3693 #: build/C/man2/quotactl.2:108
3694 msgid ""
3695 "A quota format that can handle 32-bit UIDs and GIDs and quota limits of 2^64 "
3696 "bytes and 2^64 inodes."
3697 msgstr ""
3698
3699 #. type: Plain text
3700 #: build/C/man2/quotactl.2:119
3701 msgid ""
3702 "The I<addr> argument points to the pathname of a file containing the quotas "
3703 "for the file system.  The quota file must exist; it is normally created with "
3704 "the B<quotacheck>(8)  program.  This operation requires privilege "
3705 "(B<CAP_SYS_ADMIN>)."
3706 msgstr ""
3707
3708 #. type: TP
3709 #: build/C/man2/quotactl.2:119
3710 #, no-wrap
3711 msgid "B<Q_QUOTAOFF>"
3712 msgstr ""
3713
3714 #. type: Plain text
3715 #: build/C/man2/quotactl.2:129
3716 msgid ""
3717 "Turn off quotas for a file system.  The I<addr> and I<id> arguments are "
3718 "ignored.  This operation requires privilege (B<CAP_SYS_ADMIN>)."
3719 msgstr ""
3720
3721 #. type: TP
3722 #: build/C/man2/quotactl.2:129
3723 #, no-wrap
3724 msgid "B<Q_GETQUOTA>"
3725 msgstr ""
3726
3727 #. type: Plain text
3728 #: build/C/man2/quotactl.2:140
3729 msgid ""
3730 "Get disk quota limits and current usage for user or group I<id>.  The "
3731 "I<addr> argument is a pointer to a I<dqblk> structure defined in "
3732 "I<E<lt>sys/quota.hE<gt>> as follows:"
3733 msgstr ""
3734
3735 #. type: Plain text
3736 #: build/C/man2/quotactl.2:145 build/C/man2/quotactl.2:232
3737 #, no-wrap
3738 msgid ""
3739 "/* uint64_t is an unsigned 64-bit integer;\n"
3740 "   uint32_t is an unsigned 32-bit integer */\n"
3741 msgstr ""
3742
3743 #. type: Plain text
3744 #: build/C/man2/quotactl.2:165
3745 #, no-wrap
3746 msgid ""
3747 "struct dqblk {          /* Definition since Linux 2.4.22 */\n"
3748 "    uint64_t dqb_bhardlimit;   /* absolute limit on disk\n"
3749 "                                  quota blocks alloc */\n"
3750 "    uint64_t dqb_bsoftlimit;   /* preferred limit on\n"
3751 "                                  disk quota blocks */\n"
3752 "    uint64_t dqb_curspace;     /* current quota block\n"
3753 "                                  count */\n"
3754 "    uint64_t dqb_ihardlimit;   /* maximum number of\n"
3755 "                                  allocated inodes */\n"
3756 "    uint64_t dqb_isoftlimit;   /* preferred inode limit */\n"
3757 "    uint64_t dqb_curinodes;    /* current number of\n"
3758 "                                  allocated inodes */\n"
3759 "    uint64_t dqb_btime;        /* time limit for excessive\n"
3760 "                                  disk use */\n"
3761 "    uint64_t dqb_itime;        /* time limit for excessive\n"
3762 "                                  files */\n"
3763 "    uint32_t dqb_valid;        /* bit mask of QIF_*\n"
3764 "                                  constants */\n"
3765 "};\n"
3766 msgstr ""
3767
3768 #. type: Plain text
3769 #: build/C/man2/quotactl.2:168
3770 #, no-wrap
3771 msgid ""
3772 "/* Flags in dqb_valid that indicate which fields in\n"
3773 "   dqblk structure are valid. */\n"
3774 msgstr ""
3775
3776 #. type: Plain text
3777 #: build/C/man2/quotactl.2:179
3778 #, no-wrap
3779 msgid ""
3780 "#define QIF_BLIMITS   1\n"
3781 "#define QIF_SPACE     2\n"
3782 "#define QIF_ILIMITS   4\n"
3783 "#define QIF_INODES    8\n"
3784 "#define QIF_BTIME     16\n"
3785 "#define QIF_ITIME     32\n"
3786 "#define QIF_LIMITS    (QIF_BLIMITS | QIF_ILIMITS)\n"
3787 "#define QIF_USAGE     (QIF_SPACE | QIF_INODES)\n"
3788 "#define QIF_TIMES     (QIF_BTIME | QIF_ITIME)\n"
3789 "#define QIF_ALL       (QIF_LIMITS | QIF_USAGE | QIF_TIMES)\n"
3790 msgstr ""
3791
3792 #. type: Plain text
3793 #: build/C/man2/quotactl.2:196
3794 msgid ""
3795 "The I<dqb_valid> field is a bit mask that is set to indicate the entries in "
3796 "the I<dqblk> structure that are valid.  Currently, the kernel fills in all "
3797 "entries of the I<dqblk> structure and marks them as valid in the "
3798 "I<dqb_valid> field.  Unprivileged users may retrieve only their own quotas; "
3799 "a privileged user (B<CAP_SYS_ADMIN>)  can retrieve the quotas of any user."
3800 msgstr ""
3801
3802 #. type: TP
3803 #: build/C/man2/quotactl.2:196
3804 #, no-wrap
3805 msgid "B<Q_SETQUOTA>"
3806 msgstr ""
3807
3808 #. type: Plain text
3809 #: build/C/man2/quotactl.2:216
3810 msgid ""
3811 "Set quota information for user or group I<id>, using the information "
3812 "supplied in the I<dqblk> structure pointed to by I<addr>.  The I<dqb_valid> "
3813 "field of the I<dqblk> structure indicates which entries in the structure "
3814 "have been set by the caller.  This operation supersedes the B<Q_SETQLIM> and "
3815 "B<Q_SETUSE> operations in the previous quota interfaces.  This operation "
3816 "requires privilege (B<CAP_SYS_ADMIN>)."
3817 msgstr ""
3818
3819 #. type: TP
3820 #: build/C/man2/quotactl.2:216
3821 #, no-wrap
3822 msgid "B<Q_GETINFO>"
3823 msgstr ""
3824
3825 #. type: Plain text
3826 #: build/C/man2/quotactl.2:227
3827 msgid ""
3828 "Get information (like grace times) about quotafile.  The I<addr> argument "
3829 "should be a pointer to a I<dqinfo> structure.  This structure is defined in "
3830 "I<E<lt>sys/quota.hE<gt>> as follows:"
3831 msgstr ""
3832
3833 #. type: Plain text
3834 #: build/C/man2/quotactl.2:236
3835 #, no-wrap
3836 msgid ""
3837 "struct dqinfo {         /* Defined since kernel 2.4.22 */\n"
3838 "    uint64_t dqi_bgrace;    /* Time before block soft limit\n"
3839 "                               becomes hard limit */\n"
3840 msgstr ""
3841
3842 #. type: Plain text
3843 #: build/C/man2/quotactl.2:243
3844 #, no-wrap
3845 msgid ""
3846 "    uint64_t dqi_igrace;    /* Time before inode soft limit\n"
3847 "                               becomes hard limit */\n"
3848 "    uint32_t dqi_flags;     /* Flags for quotafile\n"
3849 "                               (DQF_*) */\n"
3850 "    uint32_t dqi_valid;\n"
3851 "};\n"
3852 msgstr ""
3853
3854 #. type: Plain text
3855 #: build/C/man2/quotactl.2:245
3856 #, no-wrap
3857 msgid "/* Bits for dqi_flags */\n"
3858 msgstr ""
3859
3860 #. type: Plain text
3861 #: build/C/man2/quotactl.2:247
3862 #, no-wrap
3863 msgid "/* Quota format QFMT_VFS_OLD */\n"
3864 msgstr ""
3865
3866 #. type: Plain text
3867 #: build/C/man2/quotactl.2:249
3868 #, no-wrap
3869 msgid "#define V1_DQF_RSQUASH\t1   /* Root squash enabled */\n"
3870 msgstr ""
3871
3872 #. type: Plain text
3873 #: build/C/man2/quotactl.2:251
3874 #, no-wrap
3875 msgid "/* Other quota formats have no dqi_flags bits defined */\n"
3876 msgstr ""
3877
3878 #. type: Plain text
3879 #: build/C/man2/quotactl.2:254
3880 #, no-wrap
3881 msgid ""
3882 "/* Flags in dqi_valid that indicate which fields in\n"
3883 "   dqinfo structure are valid. */\n"
3884 msgstr ""
3885
3886 #. type: Plain text
3887 #: build/C/man2/quotactl.2:259
3888 #, no-wrap
3889 msgid ""
3890 "# define IIF_BGRACE\t1\n"
3891 "# define IIF_IGRACE\t2\n"
3892 "# define IIF_FLAGS\t4\n"
3893 "# define IIF_ALL\t(IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)\n"
3894 msgstr ""
3895
3896 #. type: Plain text
3897 #: build/C/man2/quotactl.2:275
3898 msgid ""
3899 "The I<dqi_valid> field in the I<dqinfo> structure indicates the entries in "
3900 "the structure that are valid.  Currently, the kernel fills in all entries of "
3901 "the I<dqinfo> structure and marks them all as valid in the I<dqi_valid> "
3902 "field.  The I<id> argument is ignored."
3903 msgstr ""
3904
3905 #. type: TP
3906 #: build/C/man2/quotactl.2:275
3907 #, no-wrap
3908 msgid "B<Q_SETINFO>"
3909 msgstr ""
3910
3911 #. type: Plain text
3912 #: build/C/man2/quotactl.2:299
3913 msgid ""
3914 "Set information about quotafile.  The I<addr> argument should be a pointer "
3915 "to a I<dqinfo> structure.  The I<dqi_valid> field of the I<dqinfo> structure "
3916 "indicates the entries in the structure that have been set by the caller.  "
3917 "This operation supersedes the B<Q_SETGRACE> and B<Q_SETFLAGS> operations in "
3918 "the previous quota interfaces.  The I<id> argument is ignored.  This "
3919 "operation requires privilege (B<CAP_SYS_ADMIN>)."
3920 msgstr ""
3921
3922 #. type: TP
3923 #: build/C/man2/quotactl.2:299
3924 #, no-wrap
3925 msgid "B<Q_GETFMT>"
3926 msgstr ""
3927
3928 #. type: Plain text
3929 #: build/C/man2/quotactl.2:306
3930 msgid ""
3931 "Get quota format used on the specified file system.  The I<addr> argument "
3932 "should be a pointer to a 4-byte buffer where the format number will be "
3933 "stored."
3934 msgstr ""
3935
3936 #. type: TP
3937 #: build/C/man2/quotactl.2:306
3938 #, no-wrap
3939 msgid "B<Q_SYNC>"
3940 msgstr ""
3941
3942 #. type: Plain text
3943 #: build/C/man2/quotactl.2:317
3944 msgid ""
3945 "Update the on-disk copy of quota usages for a file system.  If I<special> is "
3946 "NULL, then all file systems with active quotas are sync'ed.  The I<addr> and "
3947 "I<id> arguments are ignored."
3948 msgstr ""
3949
3950 #. type: TP
3951 #: build/C/man2/quotactl.2:317
3952 #, no-wrap
3953 msgid "B<Q_GETSTATS>"
3954 msgstr ""
3955
3956 #.  Q_GETSTATS was removed in kernel 2.4.22.
3957 #. type: Plain text
3958 #: build/C/man2/quotactl.2:337
3959 msgid ""
3960 "Get statistics and other generic information about the quota subsystem.  The "
3961 "I<addr> argument should be a pointer to a I<dqstats> structure in which data "
3962 "should be stored.  This structure is defined in I<E<lt>sys/quota.hE<gt>.> "
3963 "The I<special> and I<id> arguments are ignored.  This operation is obsolete "
3964 "and not supported by recent kernels.  Files in I</proc/sys/fs/quota/> carry "
3965 "the information instead."
3966 msgstr ""
3967
3968 #. type: Plain text
3969 #: build/C/man2/quotactl.2:340
3970 msgid ""
3971 "For XFS file systems making use of the XFS Quota Manager (XQM), the above "
3972 "commands are bypassed and the following commands are used:"
3973 msgstr ""
3974
3975 #. type: TP
3976 #: build/C/man2/quotactl.2:340
3977 #, no-wrap
3978 msgid "B<Q_XQUOTAON>"
3979 msgstr ""
3980
3981 #. type: Plain text
3982 #: build/C/man2/quotactl.2:361
3983 msgid ""
3984 "Turn on quotas for an XFS file system.  XFS provides the ability to turn "
3985 "on/off quota limit enforcement with quota accounting.  Therefore, XFS "
3986 "expects I<addr> to be a pointer to an I<unsigned int> that contains either "
3987 "the flags B<XFS_QUOTA_UDQ_ACCT> and/or B<XFS_QUOTA_UDQ_ENFD> (for user "
3988 "quota), or B<XFS_QUOTA_GDQ_ACCT> and/or B<XFS_QUOTA_GDQ_ENFD> (for group "
3989 "quota), as defined in I<E<lt>xfs/xqm.hE<gt>>.  This operation requires "
3990 "privilege (B<CAP_SYS_ADMIN>)."
3991 msgstr ""
3992
3993 #. type: TP
3994 #: build/C/man2/quotactl.2:361
3995 #, no-wrap
3996 msgid "B<Q_XQUOTAOFF>"
3997 msgstr ""
3998
3999 #. type: Plain text
4000 #: build/C/man2/quotactl.2:372
4001 msgid ""
4002 "Turn off quotas for an XFS file system.  As with B<Q_QUOTAON>, XFS file "
4003 "systems expect a pointer to an I<unsigned int> that specifies whether quota "
4004 "accounting and/or limit enforcement need to be turned off.  This operation "
4005 "requires privilege (B<CAP_SYS_ADMIN>)."
4006 msgstr ""
4007
4008 #. type: TP
4009 #: build/C/man2/quotactl.2:372
4010 #, no-wrap
4011 msgid "B<Q_XGETQUOTA>"
4012 msgstr ""
4013
4014 #. type: Plain text
4015 #: build/C/man2/quotactl.2:386
4016 msgid ""
4017 "Get disk quota limits and current usage for user I<id>.  The I<addr> "
4018 "argument is a pointer to an I<fs_disk_quota> structure (defined in "
4019 "I<E<lt>xfs/xqm.hE<gt>>).  Unprivileged users may retrieve only their own "
4020 "quotas; a privileged user (B<CAP_SYS_ADMIN>)  may retrieve the quotas of any "
4021 "user."
4022 msgstr ""
4023
4024 #. type: TP
4025 #: build/C/man2/quotactl.2:386
4026 #, no-wrap
4027 msgid "B<Q_XSETQLIM>"
4028 msgstr ""
4029
4030 #. type: Plain text
4031 #: build/C/man2/quotactl.2:398
4032 msgid ""
4033 "Set disk quota limits for user I<id>.  The I<addr> argument is a pointer to "
4034 "an I<fs_disk_quota> structure (defined in I<E<lt>xfs/xqm.hE<gt>>).  This "
4035 "operation requires privilege (B<CAP_SYS_ADMIN>)."
4036 msgstr ""
4037
4038 #. type: TP
4039 #: build/C/man2/quotactl.2:398
4040 #, no-wrap
4041 msgid "B<Q_XGETQSTAT>"
4042 msgstr ""
4043
4044 #. type: Plain text
4045 #: build/C/man2/quotactl.2:406
4046 msgid ""
4047 "Returns an I<fs_quota_stat> structure containing XFS file system specific "
4048 "quota information.  This is useful for finding out how much space is used to "
4049 "store quota information, and also to get quotaon/off status of a given local "
4050 "XFS file system."
4051 msgstr ""
4052
4053 #. type: TP
4054 #: build/C/man2/quotactl.2:406
4055 #, no-wrap
4056 msgid "B<Q_XQUOTARM>"
4057 msgstr ""
4058
4059 #. type: Plain text
4060 #: build/C/man2/quotactl.2:410
4061 msgid ""
4062 "Free the disk space taken by disk quotas.  Quotas must have already been "
4063 "turned off."
4064 msgstr ""
4065
4066 #. type: Plain text
4067 #: build/C/man2/quotactl.2:417
4068 msgid ""
4069 "There is no command equivalent to B<Q_SYNC> for XFS since B<sync>(1)  writes "
4070 "quota information to disk (in addition to the other file system metadata "
4071 "that it writes out)."
4072 msgstr ""
4073
4074 #. type: SH
4075 #: build/C/man2/quotactl.2:417
4076 #, no-wrap
4077 msgid "RETURN VALUES"
4078 msgstr ""
4079
4080 #. type: Plain text
4081 #: build/C/man2/quotactl.2:425
4082 msgid ""
4083 "On success, B<quotactl>()  returns 0; on error -1 is returned, and I<errno> "
4084 "is set to indicate the error."
4085 msgstr ""
4086
4087 #. type: Plain text
4088 #: build/C/man2/quotactl.2:432
4089 msgid "I<addr> or I<special> is invalid."
4090 msgstr ""
4091
4092 #. type: Plain text
4093 #: build/C/man2/quotactl.2:438
4094 msgid "I<cmd> or I<type> is invalid."
4095 msgstr ""
4096
4097 #. type: TP
4098 #: build/C/man2/quotactl.2:438
4099 #, no-wrap
4100 msgid "B<ENOENT>"
4101 msgstr ""
4102
4103 #. type: Plain text
4104 #: build/C/man2/quotactl.2:445
4105 msgid "The file specified by I<special> or I<addr> does not exist."
4106 msgstr ""
4107
4108 #. type: Plain text
4109 #: build/C/man2/quotactl.2:450
4110 msgid "The kernel has not been compiled with the B<CONFIG_QUOTA> option."
4111 msgstr ""
4112
4113 #. type: TP
4114 #: build/C/man2/quotactl.2:450
4115 #, no-wrap
4116 msgid "B<ENOTBLK>"
4117 msgstr ""
4118
4119 #. type: Plain text
4120 #: build/C/man2/quotactl.2:454
4121 msgid "I<special> is not a block device."
4122 msgstr ""
4123
4124 #. type: Plain text
4125 #: build/C/man2/quotactl.2:459
4126 msgid ""
4127 "The caller lacked the required privilege (B<CAP_SYS_ADMIN>)  for the "
4128 "specified operation."
4129 msgstr ""
4130
4131 #. type: Plain text
4132 #: build/C/man2/quotactl.2:463
4133 msgid ""
4134 "No disk quota is found for the indicated user.  Quotas have not been turned "
4135 "on for this file system."
4136 msgstr ""
4137
4138 #. type: Plain text
4139 #: build/C/man2/quotactl.2:472
4140 msgid "If I<cmd> is B<Q_SETQUOTA>, B<quotactl>()  may also set I<errno> to:"
4141 msgstr ""
4142
4143 #. type: Plain text
4144 #: build/C/man2/quotactl.2:475
4145 msgid "Specified limits are out of range allowed by quota format."
4146 msgstr ""
4147
4148 #. type: Plain text
4149 #: build/C/man2/quotactl.2:484
4150 msgid "If I<cmd> is B<Q_QUOTAON>, B<quotactl>()  may also set I<errno> to:"
4151 msgstr ""
4152
4153 #. type: Plain text
4154 #: build/C/man2/quotactl.2:493
4155 msgid ""
4156 "The quota file pointed to by I<addr> exists, but is not a regular file; or, "
4157 "the quota file pointed to by I<addr> exists, but is not on the file system "
4158 "pointed to by I<special>."
4159 msgstr ""
4160
4161 #. type: Plain text
4162 #: build/C/man2/quotactl.2:499
4163 msgid "B<Q_QUOTAON> attempted, but another B<Q_QUOTAON> had already been performed."
4164 msgstr ""
4165
4166 #. type: Plain text
4167 #: build/C/man2/quotactl.2:502
4168 msgid "The quota file is corrupted."
4169 msgstr ""
4170
4171 #. type: Plain text
4172 #: build/C/man2/quotactl.2:505
4173 msgid "Specified quota format was not found."
4174 msgstr ""
4175
4176 #. type: Plain text
4177 #: build/C/man2/quotactl.2:510
4178 msgid "B<quota>(1), B<getrlimit>(2), B<quotacheck>(8), B<quotaon>(8)"
4179 msgstr ""
4180
4181 #. type: TH
4182 #: build/C/man2/sendfile.2:15
4183 #, no-wrap
4184 msgid "SENDFILE"
4185 msgstr ""
4186
4187 #. type: TH
4188 #: build/C/man2/sendfile.2:15
4189 #, no-wrap
4190 msgid "2011-09-14"
4191 msgstr ""
4192
4193 #. type: Plain text
4194 #: build/C/man2/sendfile.2:18
4195 msgid "sendfile - transfer data between file descriptors"
4196 msgstr ""
4197
4198 #. type: Plain text
4199 #: build/C/man2/sendfile.2:20
4200 msgid "B<#include E<lt>sys/sendfile.hE<gt>>"
4201 msgstr ""
4202
4203 #.  The below is too ugly. Comments about glibc versions belong
4204 #.  in the notes, not in the header.
4205 #
4206 #.  .B #include <features.h>
4207 #.  .br
4208 #.  .B #if (__GLIBC__==2 && __GLIBC_MINOR__>=1) || __GLIBC__>2
4209 #.  .br
4210 #.  .B #include <sys/sendfile.h>
4211 #.  .br
4212 #.  #else
4213 #.  .br
4214 #.  .B #include <sys/types.h>
4215 #.  .br
4216 #.  .B /* No system prototype before glibc 2.1. */
4217 #.  .br
4218 #.  .BI "ssize_t sendfile(int" " out_fd" ", int" " in_fd" ", off_t *" \
4219 #.                        offset ", size_t" " count" )
4220 #.  .br
4221 #.  .B #endif
4222 #. type: Plain text
4223 #: build/C/man2/sendfile.2:43
4224 msgid ""
4225 "B<ssize_t sendfile(int>I< out_fd>B<, int>I< in_fd>B<, off_t *>I<offset>B<, "
4226 "size_t>I< count>B<);>"
4227 msgstr ""
4228
4229 #. type: Plain text
4230 #: build/C/man2/sendfile.2:53
4231 msgid ""
4232 "B<sendfile>()  copies data between one file descriptor and another.  Because "
4233 "this copying is done within the kernel, B<sendfile>()  is more efficient "
4234 "than the combination of B<read>(2)  and B<write>(2), which would require "
4235 "transferring data to and from user space."
4236 msgstr ""
4237
4238 #. type: Plain text
4239 #: build/C/man2/sendfile.2:58
4240 msgid ""
4241 "I<in_fd> should be a file descriptor opened for reading and I<out_fd> should "
4242 "be a descriptor opened for writing."
4243 msgstr ""
4244
4245 #. type: Plain text
4246 #: build/C/man2/sendfile.2:79
4247 msgid ""
4248 "If I<offset> is not NULL, then it points to a variable holding the file "
4249 "offset from which B<sendfile>()  will start reading data from I<in_fd>.  "
4250 "When B<sendfile>()  returns, this variable will be set to the offset of the "
4251 "byte following the last byte that was read.  If I<offset> is not NULL, then "
4252 "B<sendfile>()  does not modify the current file offset of I<in_fd>; "
4253 "otherwise the current file offset is adjusted to reflect the number of bytes "
4254 "read from I<in_fd>."
4255 msgstr ""
4256
4257 #. type: Plain text
4258 #: build/C/man2/sendfile.2:86
4259 msgid ""
4260 "If I<offset> is NULL, then data will be read from I<in_fd> starting at the "
4261 "current file offset, and the file offset will be updated by the call."
4262 msgstr ""
4263
4264 #. type: Plain text
4265 #: build/C/man2/sendfile.2:89
4266 msgid "I<count> is the number of bytes to copy between the file descriptors."
4267 msgstr ""
4268
4269 #. type: Plain text
4270 #: build/C/man2/sendfile.2:96
4271 msgid ""
4272 "The I<in_fd> argument must correspond to a file which supports "
4273 "B<mmap>(2)-like operations (i.e., it cannot be a socket)."
4274 msgstr ""
4275
4276 #. type: Plain text
4277 #: build/C/man2/sendfile.2:104
4278 msgid ""
4279 "In Linux kernels before 2.6.33, I<out_fd> must refer to a socket.  Since "
4280 "Linux 2.6.33 it can be any file.  If it is a regular file, then "
4281 "B<sendfile>()  changes the file offset appropriately."
4282 msgstr ""
4283
4284 #. type: Plain text
4285 #: build/C/man2/sendfile.2:111
4286 msgid ""
4287 "If the transfer was successful, the number of bytes written to I<out_fd> is "
4288 "returned.  On error, -1 is returned, and I<errno> is set appropriately."
4289 msgstr ""
4290
4291 #. type: Plain text
4292 #: build/C/man2/sendfile.2:117
4293 msgid ""
4294 "Nonblocking I/O has been selected using B<O_NONBLOCK> and the write would "
4295 "block."
4296 msgstr ""
4297
4298 #. type: TP
4299 #: build/C/man2/sendfile.2:117 build/C/man2/splice.2:143 build/C/man2/vmsplice.2:123
4300 #, no-wrap
4301 msgid "B<EBADF>"
4302 msgstr ""
4303
4304 #. type: Plain text
4305 #: build/C/man2/sendfile.2:121
4306 msgid ""
4307 "The input file was not opened for reading or the output file was not opened "
4308 "for writing."
4309 msgstr ""
4310
4311 #. type: Plain text
4312 #: build/C/man2/sendfile.2:124
4313 msgid "Bad address."
4314 msgstr ""
4315
4316 #. type: Plain text
4317 #: build/C/man2/sendfile.2:130
4318 msgid ""
4319 "Descriptor is not valid or locked, or an B<mmap>(2)-like operation is not "
4320 "available for I<in_fd>."
4321 msgstr ""
4322
4323 #. type: Plain text
4324 #: build/C/man2/sendfile.2:134
4325 msgid "Unspecified error while reading from I<in_fd>."
4326 msgstr ""
4327
4328 #. type: Plain text
4329 #: build/C/man2/sendfile.2:138
4330 msgid "Insufficient memory to read from I<in_fd>."
4331 msgstr ""
4332
4333 #. type: Plain text
4334 #: build/C/man2/sendfile.2:144
4335 msgid ""
4336 "B<sendfile>()  is a new feature in Linux 2.2.  The include file "
4337 "I<E<lt>sys/sendfile.hE<gt>> is present since glibc 2.1."
4338 msgstr ""
4339
4340 #. type: Plain text
4341 #: build/C/man2/sendfile.2:146
4342 msgid "Not specified in POSIX.1-2001, or other standards."
4343 msgstr ""
4344
4345 #. type: Plain text
4346 #: build/C/man2/sendfile.2:151
4347 msgid ""
4348 "Other UNIX systems implement B<sendfile>()  with different semantics and "
4349 "prototypes.  It should not be used in portable programs."
4350 msgstr ""
4351
4352 #. type: Plain text
4353 #: build/C/man2/sendfile.2:161
4354 msgid ""
4355 "If you plan to use B<sendfile>()  for sending files to a TCP socket, but "
4356 "need to send some header data in front of the file contents, you will find "
4357 "it useful to employ the B<TCP_CORK> option, described in B<tcp>(7), to "
4358 "minimize the number of packets and to tune performance."
4359 msgstr ""
4360
4361 #. type: Plain text
4362 #: build/C/man2/sendfile.2:167
4363 msgid ""
4364 "In Linux 2.4 and earlier, I<out_fd> could also refer to a regular file, and "
4365 "B<sendfile>()  changed the current offset of that file."
4366 msgstr ""
4367
4368 #. type: Plain text
4369 #: build/C/man2/sendfile.2:179
4370 msgid ""
4371 "The original Linux B<sendfile>()  system call was not designed to handle "
4372 "large file offsets.  Consequently, Linux 2.4 added B<sendfile64>(), with a "
4373 "wider type for the I<offset> argument.  The glibc B<sendfile>()  wrapper "
4374 "function transparently deals with the kernel differences."
4375 msgstr ""
4376
4377 #. type: Plain text
4378 #: build/C/man2/sendfile.2:188
4379 msgid ""
4380 "Applications may wish to fall back to B<read>(2)/B<write>(2)  in the case "
4381 "where B<sendfile>()  fails with B<EINVAL> or B<ENOSYS>."
4382 msgstr ""
4383
4384 #. type: Plain text
4385 #: build/C/man2/sendfile.2:193
4386 msgid ""
4387 "The Linux-specific B<splice>(2)  call supports transferring data between "
4388 "arbitrary files (e.g., a pair of sockets)."
4389 msgstr ""
4390
4391 #. type: Plain text
4392 #: build/C/man2/sendfile.2:198
4393 msgid "B<mmap>(2), B<open>(2), B<socket>(2), B<splice>(2)"
4394 msgstr ""
4395
4396 #. type: TH
4397 #: build/C/man2/set_tid_address.2:23
4398 #, no-wrap
4399 msgid "SET_TID_ADDRESS"
4400 msgstr ""
4401
4402 #. type: TH
4403 #: build/C/man2/set_tid_address.2:23
4404 #, no-wrap
4405 msgid "2004-09-10"
4406 msgstr ""
4407
4408 #. type: Plain text
4409 #: build/C/man2/set_tid_address.2:26
4410 msgid "set_tid_address - set pointer to thread ID"
4411 msgstr ""
4412
4413 #. type: Plain text
4414 #: build/C/man2/set_tid_address.2:29
4415 #, no-wrap
4416 msgid "B<#include E<lt>linux/unistd.hE<gt>>\n"
4417 msgstr ""
4418
4419 #. type: Plain text
4420 #: build/C/man2/set_tid_address.2:31
4421 #, no-wrap
4422 msgid "B<long set_tid_address(int *>I<tidptr>B<);>\n"
4423 msgstr ""
4424
4425 #. type: Plain text
4426 #: build/C/man2/set_tid_address.2:38
4427 msgid ""
4428 "The kernel keeps for each process two values called I<set_child_tid> and "
4429 "I<clear_child_tid> that are NULL by default."
4430 msgstr ""
4431
4432 #. type: SS
4433 #: build/C/man2/set_tid_address.2:38
4434 #, no-wrap
4435 msgid "set_child_tid"
4436 msgstr ""
4437
4438 #. type: Plain text
4439 #: build/C/man2/set_tid_address.2:48
4440 msgid ""
4441 "If a process is started using B<clone>(2)  with the B<CLONE_CHILD_SETTID> "
4442 "flag, I<set_child_tid> is set to I<child_tidptr>, the fifth argument of that "
4443 "system call."
4444 msgstr ""
4445
4446 #. type: Plain text
4447 #: build/C/man2/set_tid_address.2:53
4448 msgid ""
4449 "When I<set_child_tid> is set, the very first thing the new process does is "
4450 "writing its PID at this address."
4451 msgstr ""
4452
4453 #. type: SS
4454 #: build/C/man2/set_tid_address.2:53
4455 #, no-wrap
4456 msgid "clear_child_tid"
4457 msgstr ""
4458
4459 #. type: Plain text
4460 #: build/C/man2/set_tid_address.2:63
4461 msgid ""
4462 "If a process is started using B<clone>(2)  with the B<CLONE_CHILD_CLEARTID> "
4463 "flag, I<clear_child_tid> is set to I<child_tidptr>, the fifth argument of "
4464 "that system call."
4465 msgstr ""
4466
4467 #. type: Plain text
4468 #: build/C/man2/set_tid_address.2:70
4469 msgid ""
4470 "The system call B<set_tid_address>()  sets the I<clear_child_tid> value for "
4471 "the calling process to I<tidptr>."
4472 msgstr ""
4473
4474 #. type: Plain text
4475 #: build/C/man2/set_tid_address.2:80
4476 msgid ""
4477 "When I<clear_child_tid> is set, and the process exits, and the process was "
4478 "sharing memory with other processes or threads, then 0 is written at this "
4479 "address, and a I<futex(child_tidptr, FUTEX_WAKE, 1, NULL, NULL, 0);> call is "
4480 "done.  (That is, wake a single process waiting on this futex.)  Errors are "
4481 "ignored."
4482 msgstr ""
4483
4484 #. type: Plain text
4485 #: build/C/man2/set_tid_address.2:83
4486 msgid "B<set_tid_address>()  always returns the PID of the calling process."
4487 msgstr ""
4488
4489 #. type: Plain text
4490 #: build/C/man2/set_tid_address.2:86
4491 msgid "B<set_tid_address>()  always succeeds."
4492 msgstr ""
4493
4494 #. type: Plain text
4495 #: build/C/man2/set_tid_address.2:89
4496 msgid ""
4497 "This call is present since Linux 2.5.48.  Details as given here are valid "
4498 "since Linux 2.5.49."
4499 msgstr ""
4500
4501 #. type: Plain text
4502 #: build/C/man2/set_tid_address.2:94
4503 msgid "B<clone>(2), B<futex>(2)"
4504 msgstr ""
4505
4506 #. type: TH
4507 #: build/C/man2/splice.2:26
4508 #, no-wrap
4509 msgid "SPLICE"
4510 msgstr ""
4511
4512 #. type: TH
4513 #: build/C/man2/splice.2:26 build/C/man2/tee.2:26 build/C/man2/vmsplice.2:26
4514 #, no-wrap
4515 msgid "2009-09-15"
4516 msgstr ""
4517
4518 #. type: Plain text
4519 #: build/C/man2/splice.2:29
4520 msgid "splice - splice data to/from a pipe"
4521 msgstr ""
4522
4523 #. type: Plain text
4524 #: build/C/man2/splice.2:33 build/C/man2/tee.2:33
4525 #, no-wrap
4526 msgid ""
4527 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
4528 "B<#include E<lt>fcntl.hE<gt>>\n"
4529 msgstr ""
4530
4531 #.  Return type was long before glibc 2.7
4532 #. type: Plain text
4533 #: build/C/man2/splice.2:38
4534 #, no-wrap
4535 msgid ""
4536 "B<ssize_t splice(int >I<fd_in>B<, loff_t *>I<off_in>B<, int >I<fd_out>B<,>\n"
4537 "B<               loff_t *>I<off_out>B<, size_t >I<len>B<, unsigned int "
4538 ">I<flags>B<);>\n"
4539 msgstr ""
4540
4541 #. type: Plain text
4542 #: build/C/man2/splice.2:50
4543 msgid ""
4544 "B<splice>()  moves data between two file descriptors without copying between "
4545 "kernel address space and user address space.  It transfers up to I<len> "
4546 "bytes of data from the file descriptor I<fd_in> to the file descriptor "
4547 "I<fd_out>, where one of the descriptors must refer to a pipe."
4548 msgstr ""
4549
4550 #. type: Plain text
4551 #: build/C/man2/splice.2:80
4552 msgid ""
4553 "If I<fd_in> refers to a pipe, then I<off_in> must be NULL.  If I<fd_in> does "
4554 "not refer to a pipe and I<off_in> is NULL, then bytes are read from I<fd_in> "
4555 "starting from the current file offset, and the current file offset is "
4556 "adjusted appropriately.  If I<fd_in> does not refer to a pipe and I<off_in> "
4557 "is not NULL, then I<off_in> must point to a buffer which specifies the "
4558 "starting offset from which bytes will be read from I<fd_in>; in this case, "
4559 "the current file offset of I<fd_in> is not changed.  Analogous statements "
4560 "apply for I<fd_out> and I<off_out>."
4561 msgstr ""
4562
4563 #. type: Plain text
4564 #: build/C/man2/splice.2:85 build/C/man2/vmsplice.2:78
4565 msgid ""
4566 "The I<flags> argument is a bit mask that is composed by ORing together zero "
4567 "or more of the following values:"
4568 msgstr ""
4569
4570 #. type: TP
4571 #: build/C/man2/splice.2:85 build/C/man2/tee.2:62 build/C/man2/vmsplice.2:78
4572 #, no-wrap
4573 msgid "B<SPLICE_F_MOVE>"
4574 msgstr ""
4575
4576 #. type: Plain text
4577 #: build/C/man2/splice.2:98
4578 msgid ""
4579 "Attempt to move pages instead of copying.  This is only a hint to the "
4580 "kernel: pages may still be copied if the kernel cannot move the pages from "
4581 "the pipe, or if the pipe buffers don't refer to full pages.  The initial "
4582 "implementation of this flag was buggy: therefore starting in Linux 2.6.21 it "
4583 "is a no-op (but is still permitted in a B<splice>()  call); in the future, a "
4584 "correct implementation may be restored."
4585 msgstr ""
4586
4587 #. type: TP
4588 #: build/C/man2/splice.2:98 build/C/man2/tee.2:68 build/C/man2/vmsplice.2:84
4589 #, no-wrap
4590 msgid "B<SPLICE_F_NONBLOCK>"
4591 msgstr ""
4592
4593 #. type: Plain text
4594 #: build/C/man2/splice.2:107
4595 msgid ""
4596 "Do not block on I/O.  This makes the splice pipe operations nonblocking, but "
4597 "B<splice>()  may nevertheless block because the file descriptors that are "
4598 "spliced to/from may block (unless they have the B<O_NONBLOCK> flag set)."
4599 msgstr ""
4600
4601 #. type: TP
4602 #: build/C/man2/splice.2:107 build/C/man2/tee.2:73 build/C/man2/vmsplice.2:91
4603 #, no-wrap
4604 msgid "B<SPLICE_F_MORE>"
4605 msgstr ""
4606
4607 #. type: Plain text
4608 #: build/C/man2/splice.2:121
4609 msgid ""
4610 "More data will be coming in a subsequent splice.  This is a helpful hint "
4611 "when the I<fd_out> refers to a socket (see also the description of "
4612 "B<MSG_MORE> in B<send>(2), and the description of B<TCP_CORK> in B<tcp>(7))"
4613 msgstr ""
4614
4615 #. type: TP
4616 #: build/C/man2/splice.2:121 build/C/man2/tee.2:79 build/C/man2/vmsplice.2:97
4617 #, no-wrap
4618 msgid "B<SPLICE_F_GIFT>"
4619 msgstr ""
4620
4621 #. type: Plain text
4622 #: build/C/man2/splice.2:127
4623 msgid "Unused for B<splice>(); see B<vmsplice>(2)."
4624 msgstr ""
4625
4626 #. type: Plain text
4627 #: build/C/man2/splice.2:136
4628 msgid ""
4629 "Upon successful completion, B<splice>()  returns the number of bytes spliced "
4630 "to or from the pipe.  A return value of 0 means that there was no data to "
4631 "transfer, and it would not make sense to block, because there are no writers "
4632 "connected to the write end of the pipe referred to by I<fd_in>."
4633 msgstr ""
4634
4635 #. type: Plain text
4636 #: build/C/man2/splice.2:142
4637 msgid "On error, B<splice>()  returns -1 and I<errno> is set to indicate the error."
4638 msgstr ""
4639
4640 #. type: Plain text
4641 #: build/C/man2/splice.2:147
4642 msgid ""
4643 "One or both file descriptors are not valid, or do not have proper read-write "
4644 "mode."
4645 msgstr ""
4646
4647 #.  The append-mode error is given since 2.6.27; in earlier kernels,
4648 #.  splice() in append mode was broken
4649 #. type: Plain text
4650 #: build/C/man2/splice.2:155
4651 msgid ""
4652 "Target file system doesn't support splicing; target file is opened in append "
4653 "mode; neither of the descriptors refers to a pipe; or offset given for "
4654 "nonseekable device."
4655 msgstr ""
4656
4657 #. type: Plain text
4658 #: build/C/man2/splice.2:158 build/C/man2/tee.2:114 build/C/man2/vmsplice.2:138
4659 msgid "Out of memory."
4660 msgstr ""
4661
4662 #. type: TP
4663 #: build/C/man2/splice.2:158
4664 #, no-wrap
4665 msgid "B<ESPIPE>"
4666 msgstr ""
4667
4668 #. type: Plain text
4669 #: build/C/man2/splice.2:165
4670 msgid ""
4671 "Either I<off_in> or I<off_out> was not NULL, but the corresponding file "
4672 "descriptor refers to a pipe."
4673 msgstr ""
4674
4675 #. type: Plain text
4676 #: build/C/man2/splice.2:169
4677 msgid "The B<splice>()  system call first appeared in Linux 2.6.17."
4678 msgstr ""
4679
4680 #. type: Plain text
4681 #: build/C/man2/splice.2:181
4682 msgid ""
4683 "The three system calls B<splice>(), B<vmsplice>(2), and B<tee>(2), provide "
4684 "userspace programs with full control over an arbitrary kernel buffer, "
4685 "implemented within the kernel using the same type of buffer that is used for "
4686 "a pipe.  In overview, these system calls perform the following tasks:"
4687 msgstr ""
4688
4689 #. type: TP
4690 #: build/C/man2/splice.2:181
4691 #, no-wrap
4692 msgid "B<splice>()"
4693 msgstr ""
4694
4695 #. type: Plain text
4696 #: build/C/man2/splice.2:185
4697 msgid ""
4698 "moves data from the buffer to an arbitrary file descriptor, or vice versa, "
4699 "or from one buffer to another."
4700 msgstr ""
4701
4702 #. type: TP
4703 #: build/C/man2/splice.2:185
4704 #, no-wrap
4705 msgid "B<tee>(2)"
4706 msgstr ""
4707
4708 #. type: Plain text
4709 #: build/C/man2/splice.2:188
4710 msgid "\"copies\" the data from one buffer to another."
4711 msgstr ""
4712
4713 #. type: TP
4714 #: build/C/man2/splice.2:188
4715 #, no-wrap
4716 msgid "B<vmsplice>(2)"
4717 msgstr ""
4718
4719 #. type: Plain text
4720 #: build/C/man2/splice.2:191
4721 msgid "\"copies\" data from user space into the buffer."
4722 msgstr ""
4723
4724 #
4725 #.  Linus: Now, imagine using the above in a media server, for example.
4726 #.  Let's say that a year or two has passed, so that the video drivers
4727 #.  have been updated to be able to do the splice thing, and what can
4728 #.  you do? You can:
4729 #
4730 #.  - splice from the (mpeg or whatever - let's just assume that the video
4731 #.    input is either digital or does the encoding on its own - like they
4732 #.    pretty much all do) video input into a pipe (remember: no copies - the
4733 #.    video input will just DMA directly into memory, and splice will just
4734 #.    set up the pages in the pipe buffer)
4735 #.  - tee that pipe to split it up
4736 #.  - splice one end to a file (ie "save the compressed stream to disk")
4737 #.  - splice the other end to a real-time video decoder window for your
4738 #.    real-time viewing pleasure.
4739 #
4740 #.  Linus: Now, the advantage of splice()/tee() is that you can
4741 #.  do zero-copy movement of data, and unlike sendfile() you can
4742 #.  do it on _arbitrary_ data (and, as shown by "tee()", it's more
4743 #.  than just sending the data to somebody else: you can duplicate
4744 #.  the data and choose to forward it to two or more different
4745 #.  users - for things like logging etc.).
4746 #. type: Plain text
4747 #: build/C/man2/splice.2:222
4748 msgid ""
4749 "Though we talk of copying, actual copies are generally avoided.  The kernel "
4750 "does this by implementing a pipe buffer as a set of reference-counted "
4751 "pointers to pages of kernel memory.  The kernel creates \"copies\" of pages "
4752 "in a buffer by creating new pointers (for the output buffer) referring to "
4753 "the pages, and increasing the reference counts for the pages: only pointers "
4754 "are copied, not the pages of the buffer."
4755 msgstr ""
4756
4757 #. type: SH
4758 #: build/C/man2/splice.2:222 build/C/man2/tee.2:129
4759 #, no-wrap
4760 msgid "EXAMPLE"
4761 msgstr ""
4762
4763 #. type: Plain text
4764 #: build/C/man2/splice.2:225
4765 msgid "See B<tee>(2)."
4766 msgstr ""
4767
4768 #. type: Plain text
4769 #: build/C/man2/splice.2:229
4770 msgid "B<sendfile>(2), B<tee>(2), B<vmsplice>(2)"
4771 msgstr ""
4772
4773 #. type: TH
4774 #: build/C/man2/tee.2:26
4775 #, no-wrap
4776 msgid "TEE"
4777 msgstr ""
4778
4779 #. type: Plain text
4780 #: build/C/man2/tee.2:29
4781 msgid "tee - duplicating pipe content"
4782 msgstr ""
4783
4784 #. type: Plain text
4785 #: build/C/man2/tee.2:36
4786 #, no-wrap
4787 msgid ""
4788 "B<ssize_t tee(int >I<fd_in>B<, int >I<fd_out>B<, size_t >I<len>B<, unsigned "
4789 "int >I<flags>B<);>\n"
4790 msgstr ""
4791
4792 #.  Example programs http://brick.kernel.dk/snaps
4793 #
4794 #
4795 #.  add a "tee(in, out1, out2)" system call that duplicates the pages
4796 #.  (again, incrementing their reference count, not copying the data) from
4797 #.  one pipe to two other pipes.
4798 #. type: Plain text
4799 #: build/C/man2/tee.2:56
4800 msgid ""
4801 "B<tee>()  duplicates up to I<len> bytes of data from the pipe referred to by "
4802 "the file descriptor I<fd_in> to the pipe referred to by the file descriptor "
4803 "I<fd_out>.  It does not consume the data that is duplicated from I<fd_in>; "
4804 "therefore, that data can be copied by a subsequent B<splice>(2)."
4805 msgstr ""
4806
4807 #. type: Plain text
4808 #: build/C/man2/tee.2:62
4809 msgid ""
4810 "I<flags> is a series of modifier flags, which share the name space with "
4811 "B<splice>(2)  and B<vmsplice>(2):"
4812 msgstr ""
4813
4814 #. type: Plain text
4815 #: build/C/man2/tee.2:68
4816 msgid "Currently has no effect for B<tee>(); see B<splice>(2)."
4817 msgstr ""
4818
4819 #.  Not used for vmsplice
4820 #.  May be in the future -- therefore EAGAIN
4821 #. type: Plain text
4822 #: build/C/man2/tee.2:73 build/C/man2/vmsplice.2:91
4823 msgid "Do not block on I/O; see B<splice>(2)  for further details."
4824 msgstr ""
4825
4826 #. type: Plain text
4827 #: build/C/man2/tee.2:79
4828 msgid ""
4829 "Currently has no effect for B<tee>(), but may be implemented in the future; "
4830 "see B<splice>(2)."
4831 msgstr ""
4832
4833 #. type: Plain text
4834 #: build/C/man2/tee.2:85
4835 msgid "Unused for B<tee>(); see B<vmsplice>(2)."
4836 msgstr ""
4837
4838 #. type: Plain text
4839 #: build/C/man2/tee.2:94
4840 msgid ""
4841 "Upon successful completion, B<tee>()  returns the number of bytes that were "
4842 "duplicated between the input and output.  A return value of 0 means that "
4843 "there was no data to transfer, and it would not make sense to block, because "
4844 "there are no writers connected to the write end of the pipe referred to by "
4845 "I<fd_in>."
4846 msgstr ""
4847
4848 #. type: Plain text
4849 #: build/C/man2/tee.2:100
4850 msgid "On error, B<tee>()  returns -1 and I<errno> is set to indicate the error."
4851 msgstr ""
4852
4853 #. type: Plain text
4854 #: build/C/man2/tee.2:111
4855 msgid ""
4856 "I<fd_in> or I<fd_out> does not refer to a pipe; or I<fd_in> and I<fd_out> "
4857 "refer to the same pipe."
4858 msgstr ""
4859
4860 #. type: Plain text
4861 #: build/C/man2/tee.2:118
4862 msgid "The B<tee>()  system call first appeared in Linux 2.6.17."
4863 msgstr ""
4864
4865 #. type: Plain text
4866 #: build/C/man2/tee.2:129
4867 msgid ""
4868 "Conceptually, B<tee>()  copies the data between the two pipes.  In reality "
4869 "no real data copying takes place though: under the covers, B<tee>()  assigns "
4870 "data in the output by merely grabbing a reference to the input."
4871 msgstr ""
4872
4873 #. type: Plain text
4874 #: build/C/man2/tee.2:135
4875 msgid ""
4876 "The following example implements a basic B<tee>(1)  program using the "
4877 "B<tee>()  system call."
4878 msgstr ""
4879
4880 #. type: Plain text
4881 #: build/C/man2/tee.2:144
4882 #, no-wrap
4883 msgid ""
4884 "#define _GNU_SOURCE\n"
4885 "#include E<lt>fcntl.hE<gt>\n"
4886 "#include E<lt>stdio.hE<gt>\n"
4887 "#include E<lt>stdlib.hE<gt>\n"
4888 "#include E<lt>unistd.hE<gt>\n"
4889 "#include E<lt>errno.hE<gt>\n"
4890 "#include E<lt>limits.hE<gt>\n"
4891 msgstr ""
4892
4893 #. type: Plain text
4894 #: build/C/man2/tee.2:150
4895 #, no-wrap
4896 msgid ""
4897 "int\n"
4898 "main(int argc, char *argv[])\n"
4899 "{\n"
4900 "    int fd;\n"
4901 "    int len, slen;\n"
4902 msgstr ""
4903
4904 #. type: Plain text
4905 #: build/C/man2/tee.2:155
4906 #, no-wrap
4907 msgid ""
4908 "    if (argc != 2) {\n"
4909 "        fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
4910 "        exit(EXIT_FAILURE);\n"
4911 "    }\n"
4912 msgstr ""
4913
4914 #. type: Plain text
4915 #: build/C/man2/tee.2:161
4916 #, no-wrap
4917 msgid ""
4918 "    fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
4919 "    if (fd == -1) {\n"
4920 "        perror(\"open\");\n"
4921 "        exit(EXIT_FAILURE);\n"
4922 "    }\n"
4923 msgstr ""
4924
4925 #. type: Plain text
4926 #: build/C/man2/tee.2:168
4927 #, no-wrap
4928 msgid ""
4929 "    do {\n"
4930 "        /*\n"
4931 "         * tee stdin to stdout.\n"
4932 "         */\n"
4933 "        len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
4934 "                  INT_MAX, SPLICE_F_NONBLOCK);\n"
4935 msgstr ""
4936
4937 #. type: Plain text
4938 #: build/C/man2/tee.2:177
4939 #, no-wrap
4940 msgid ""
4941 "        if (len E<lt> 0) {\n"
4942 "            if (errno == EAGAIN)\n"
4943 "                continue;\n"
4944 "            perror(\"tee\");\n"
4945 "            exit(EXIT_FAILURE);\n"
4946 "        } else\n"
4947 "            if (len == 0)\n"
4948 "                break;\n"
4949 msgstr ""
4950
4951 #. type: Plain text
4952 #: build/C/man2/tee.2:191
4953 #, no-wrap
4954 msgid ""
4955 "        /*\n"
4956 "         * Consume stdin by splicing it to a file.\n"
4957 "         */\n"
4958 "        while (len E<gt> 0) {\n"
4959 "            slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
4960 "                          len, SPLICE_F_MOVE);\n"
4961 "            if (slen E<lt> 0) {\n"
4962 "                perror(\"splice\");\n"
4963 "                break;\n"
4964 "            }\n"
4965 "            len -= slen;\n"
4966 "        }\n"
4967 "    } while (1);\n"
4968 msgstr ""
4969
4970 #. type: Plain text
4971 #: build/C/man2/tee.2:195
4972 #, no-wrap
4973 msgid ""
4974 "    close(fd);\n"
4975 "    exit(EXIT_SUCCESS);\n"
4976 "}\n"
4977 msgstr ""
4978
4979 #. type: Plain text
4980 #: build/C/man2/tee.2:199
4981 msgid "B<splice>(2), B<vmsplice>(2)"
4982 msgstr ""
4983
4984 #. type: TH
4985 #: build/C/man2/vm86.2:26
4986 #, no-wrap
4987 msgid "VM86"
4988 msgstr ""
4989
4990 #. type: TH
4991 #: build/C/man2/vm86.2:26
4992 #, no-wrap
4993 msgid "2009-02-20"
4994 msgstr ""
4995
4996 #. type: Plain text
4997 #: build/C/man2/vm86.2:29
4998 msgid "vm86old, vm86 - enter virtual 8086 mode"
4999 msgstr ""
5000
5001 #. type: Plain text
5002 #: build/C/man2/vm86.2:31
5003 msgid "B<#include E<lt>sys/vm86.hE<gt>>"
5004 msgstr ""
5005
5006 #. type: Plain text
5007 #: build/C/man2/vm86.2:33
5008 msgid "B<int vm86old(struct vm86_struct *>I<info>B<);>"
5009 msgstr ""
5010
5011 #. type: Plain text
5012 #: build/C/man2/vm86.2:35
5013 msgid "B<int vm86(unsigned long >I<fn>B<, struct vm86plus_struct *>I<v86>B<);>"
5014 msgstr ""
5015
5016 #. type: Plain text
5017 #: build/C/man2/vm86.2:46
5018 msgid ""
5019 "The system call B<vm86>()  was introduced in Linux 0.97p2.  In Linux 2.1.15 "
5020 "and 2.0.28 it was renamed to B<vm86old>(), and a new B<vm86>()  was "
5021 "introduced.  The definition of I<struct vm86_struct> was changed in 1.1.8 "
5022 "and 1.1.9."
5023 msgstr ""
5024
5025 #. type: Plain text
5026 #: build/C/man2/vm86.2:50
5027 msgid ""
5028 "These calls cause the process to enter VM86 mode (virtual-8086 in Intel "
5029 "literature), and are used by B<dosemu>."
5030 msgstr ""
5031
5032 #. type: Plain text
5033 #: build/C/man2/vm86.2:52
5034 msgid "VM86 mode is an emulation of real mode within a protected mode task."
5035 msgstr ""
5036
5037 #. type: Plain text
5038 #: build/C/man2/vm86.2:62
5039 msgid ""
5040 "This return value is specific to i386 and indicates a problem with getting "
5041 "userspace data."
5042 msgstr ""
5043
5044 #. type: Plain text
5045 #: build/C/man2/vm86.2:66
5046 msgid ""
5047 "This return value indicates the call is not implemented on the present "
5048 "architecture."
5049 msgstr ""
5050
5051 #. type: Plain text
5052 #: build/C/man2/vm86.2:71
5053 msgid ""
5054 "Saved kernel stack exists.  (This is a kernel sanity check; the saved stack "
5055 "should only exist within vm86 mode itself.)"
5056 msgstr ""
5057
5058 #. type: Plain text
5059 #: build/C/man2/vm86.2:74
5060 msgid ""
5061 "This call is specific to Linux on 32-bit Intel processors, and should not be "
5062 "used in programs intended to be portable."
5063 msgstr ""
5064
5065 #. type: TH
5066 #: build/C/man2/vmsplice.2:26
5067 #, no-wrap
5068 msgid "VMSPLICE"
5069 msgstr ""
5070
5071 #. type: Plain text
5072 #: build/C/man2/vmsplice.2:29
5073 msgid "vmsplice - splice user pages into a pipe"
5074 msgstr ""
5075
5076 #. type: Plain text
5077 #: build/C/man2/vmsplice.2:34
5078 #, no-wrap
5079 msgid ""
5080 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
5081 "B<#include E<lt>fcntl.hE<gt>>\n"
5082 "B<#include E<lt>sys/uio.hE<gt>>\n"
5083 msgstr ""
5084
5085 #. type: Plain text
5086 #: build/C/man2/vmsplice.2:37
5087 #, no-wrap
5088 msgid ""
5089 "B<ssize_t vmsplice(int >I<fd>B<, const struct iovec *>I<iov>B<,>\n"
5090 "B<                 unsigned long >I<nr_segs>B<, unsigned int "
5091 ">I<flags>B<);>\n"
5092 msgstr ""
5093
5094 #.  Linus: vmsplice() system call to basically do a "write to
5095 #.  the buffer", but using the reference counting and VM traversal
5096 #.  to actually fill the buffer. This means that the user needs to
5097 #.  be careful not to reuse the user-space buffer it spliced into
5098 #.  the kernel-space one (contrast this to "write()", which copies
5099 #.  the actual data, and you can thus reuse the buffer immediately
5100 #.  after a successful write), but that is often easy to do.
5101 #. type: Plain text
5102 #: build/C/man2/vmsplice.2:57
5103 msgid ""
5104 "The B<vmsplice>()  system call maps I<nr_segs> ranges of user memory "
5105 "described by I<iov> into a pipe.  The file descriptor I<fd> must refer to a "
5106 "pipe."
5107 msgstr ""
5108
5109 #. type: Plain text
5110 #: build/C/man2/vmsplice.2:64
5111 msgid ""
5112 "The pointer I<iov> points to an array of I<iovec> structures as defined in "
5113 "I<E<lt>sys/uio.hE<gt>>:"
5114 msgstr ""
5115
5116 #. type: Plain text
5117 #: build/C/man2/vmsplice.2:71
5118 #, no-wrap
5119 msgid ""
5120 "struct iovec {\n"
5121 "    void  *iov_base;            /* Starting address */\n"
5122 "    size_t iov_len;             /* Number of bytes */\n"
5123 "};\n"
5124 msgstr ""
5125
5126 #. type: Plain text
5127 #: build/C/man2/vmsplice.2:84
5128 msgid "Unused for B<vmsplice>(); see B<splice>(2)."
5129 msgstr ""
5130
5131 #. type: Plain text
5132 #: build/C/man2/vmsplice.2:97
5133 msgid ""
5134 "Currently has no effect for B<vmsplice>(), but may be implemented in the "
5135 "future; see B<splice>(2)."
5136 msgstr ""
5137
5138 #.  FIXME Explain the following line in a little more detail:
5139 #.  .... if we expect to later SPLICE_F_MOVE to the cache.
5140 #. type: Plain text
5141 #: build/C/man2/vmsplice.2:113
5142 msgid ""
5143 "The user pages are a gift to the kernel.  The application may not modify "
5144 "this memory ever, or page cache and on-disk data may differ.  Gifting pages "
5145 "to the kernel means that a subsequent B<splice>(2)  B<SPLICE_F_MOVE> can "
5146 "successfully move the pages; if this flag is not specified, then a "
5147 "subsequent B<splice>(2)  B<SPLICE_F_MOVE> must copy the pages.  Data must "
5148 "also be properly page aligned, both in memory and length."
5149 msgstr ""
5150
5151 #. type: Plain text
5152 #: build/C/man2/vmsplice.2:122
5153 msgid ""
5154 "Upon successful completion, B<vmsplice>()  returns the number of bytes "
5155 "transferred to the pipe.  On error, B<vmsplice>()  returns -1 and I<errno> "
5156 "is set to indicate the error."
5157 msgstr ""
5158
5159 #. type: Plain text
5160 #: build/C/man2/vmsplice.2:127
5161 msgid "I<fd> either not valid, or doesn't refer to a pipe."
5162 msgstr ""
5163
5164 #. type: Plain text
5165 #: build/C/man2/vmsplice.2:135
5166 msgid ""
5167 "I<nr_segs> is 0 or greater than B<IOV_MAX>; or memory not aligned if "
5168 "B<SPLICE_F_GIFT> set."
5169 msgstr ""
5170
5171 #. type: Plain text
5172 #: build/C/man2/vmsplice.2:142
5173 msgid "The B<vmsplice>()  system call first appeared in Linux 2.6.17."
5174 msgstr ""
5175
5176 #. type: Plain text
5177 #: build/C/man2/vmsplice.2:153
5178 msgid ""
5179 "B<vmsplice>()  follows the other vectorized read/write type functions when "
5180 "it comes to limitations on number of segments being passed in.  This limit "
5181 "is B<IOV_MAX> as defined in I<E<lt>limits.hE<gt>>.  At the time of this "
5182 "writing, that limit is 1024."
5183 msgstr ""
5184
5185 #. type: Plain text
5186 #: build/C/man2/vmsplice.2:156
5187 msgid "B<splice>(2), B<tee>(2)"
5188 msgstr ""