OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.37.
[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-03-22 04:25+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:48 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:48 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:49 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:51 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:58 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:1566 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:1580 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:1584 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:1595 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:1605 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:1623 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:1625 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:1716 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:1730 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:1737 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.37 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:1581 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:1598 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:1661
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:48
1695 #, no-wrap
1696 msgid "PTRACE"
1697 msgstr ""
1698
1699 #. type: TH
1700 #: build/C/man2/ptrace.2:48
1701 #, no-wrap
1702 msgid "2012-03-06"
1703 msgstr ""
1704
1705 #. type: Plain text
1706 #: build/C/man2/ptrace.2:51
1707 msgid "ptrace - process trace"
1708 msgstr ""
1709
1710 #. type: Plain text
1711 #: build/C/man2/ptrace.2:54
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:57
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:66
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:77
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:79
1746 #, no-wrap
1747 msgid "    ptrace(PTRACE_foo, pid, ...)\n"
1748 msgstr ""
1749
1750 #. type: Plain text
1751 #: build/C/man2/ptrace.2:83
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:89
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:98
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:115
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:119
1787 msgid ""
1788 "When the tracer is finished tracing, it can cause the tracee to continue "
1789 "executing in a normal, untraced mode via B<PTRACE_DETACH>."
1790 msgstr ""
1791
1792 #. type: Plain text
1793 #: build/C/man2/ptrace.2:123
1794 msgid "The value of I<request> determines the action to be performed:"
1795 msgstr ""
1796
1797 #. type: TP
1798 #: build/C/man2/ptrace.2:123
1799 #, no-wrap
1800 msgid "B<PTRACE_TRACEME>"
1801 msgstr ""
1802
1803 #. type: Plain text
1804 #: build/C/man2/ptrace.2:145
1805 msgid ""
1806 "Indicate that this process is to be traced by its parent.  Any signal "
1807 "(except B<SIGKILL>)  delivered to this process will cause it to stop and its "
1808 "parent to be notified via B<waitpid>(2).  In addition, all subsequent calls "
1809 "to B<execve>(2)  by the traced process will cause a B<SIGTRAP> to be sent to "
1810 "it, giving the parent a chance to gain control before the new program begins "
1811 "execution.  A process probably shouldn't make this request if its parent "
1812 "isn't expecting to trace it.  (I<pid>, I<addr>, and I<data> are ignored.)"
1813 msgstr ""
1814
1815 #. type: Plain text
1816 #: build/C/man2/ptrace.2:156
1817 msgid ""
1818 "The B<PTRACE_TRACEME> request is used only by the tracee; the remaining "
1819 "requests are used only by the tracer.  In the following requests, I<pid> "
1820 "specifies the thread ID of the tracee to be acted on.  For requests other "
1821 "than B<PTRACE_KILL>, the tracee must be stopped."
1822 msgstr ""
1823
1824 #. type: TP
1825 #: build/C/man2/ptrace.2:156
1826 #, no-wrap
1827 msgid "B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>"
1828 msgstr ""
1829
1830 #. type: Plain text
1831 #: build/C/man2/ptrace.2:167
1832 msgid ""
1833 "Read a word at the address I<addr> in the tracee's memory, returning the "
1834 "word as the result of the B<ptrace>()  call.  Linux does not have separate "
1835 "text and data address spaces, so these two requests are currently "
1836 "equivalent.  (I<data> is ignored.)"
1837 msgstr ""
1838
1839 #. type: TP
1840 #: build/C/man2/ptrace.2:167
1841 #, no-wrap
1842 msgid "B<PTRACE_PEEKUSER>"
1843 msgstr ""
1844
1845 #.  PTRACE_PEEKUSR in kernel source, but glibc uses PTRACE_PEEKUSER,
1846 #.  and that is the name that seems common on other systems.
1847 #. type: Plain text
1848 #: build/C/man2/ptrace.2:185
1849 msgid ""
1850 "Read a word at offset I<addr> in the tracee's USER area, which holds the "
1851 "registers and other information about the process (see "
1852 "I<E<lt>sys/user.hE<gt>>).  The word is returned as the result of the "
1853 "B<ptrace>()  call.  Typically, the offset must be word-aligned, though this "
1854 "might vary by architecture.  See NOTES.  (I<data> is ignored.)"
1855 msgstr ""
1856
1857 #. type: TP
1858 #: build/C/man2/ptrace.2:185
1859 #, no-wrap
1860 msgid "B<PTRACE_POKETEXT>, B<PTRACE_POKEDATA>"
1861 msgstr ""
1862
1863 #. type: Plain text
1864 #: build/C/man2/ptrace.2:197
1865 msgid ""
1866 "Copy the word I<data> to the address I<addr> in the tracee's memory.  As for "
1867 "B<PTRACE_PEEKTEXT> and B<PTRACE_PEEKDATA>, these two requests are currently "
1868 "equivalent."
1869 msgstr ""
1870
1871 #. type: TP
1872 #: build/C/man2/ptrace.2:197
1873 #, no-wrap
1874 msgid "B<PTRACE_POKEUSER>"
1875 msgstr ""
1876
1877 #.  PTRACE_POKEUSR in kernel source, but glibc uses PTRACE_POKEUSER,
1878 #.  and that is the name that seems common on other systems.
1879 #.  FIXME In the preceding sentence, which modifications are disallowed,
1880 #.  and when they are disallowed, how does userspace discover that fact?
1881 #. type: Plain text
1882 #: build/C/man2/ptrace.2:213
1883 msgid ""
1884 "Copy the word I<data> to offset I<addr> in the tracee's USER area.  As for "
1885 "B<PTRACE_PEEKUSER>, the offset must typically be word-aligned.  In order to "
1886 "maintain the integrity of the kernel, some modifications to the USER area "
1887 "are disallowed."
1888 msgstr ""
1889
1890 #. type: TP
1891 #: build/C/man2/ptrace.2:213
1892 #, no-wrap
1893 msgid "B<PTRACE_GETREGS>, B<PTRACE_GETFPREGS>"
1894 msgstr ""
1895
1896 #. type: Plain text
1897 #: build/C/man2/ptrace.2:224
1898 msgid ""
1899 "Copy the tracee's general-purpose or floating-point registers, respectively, "
1900 "to the address I<data> in the tracer.  See I<E<lt>sys/user.hE<gt>> for "
1901 "information on the format of this data.  (I<addr> is ignored.)"
1902 msgstr ""
1903
1904 #. type: TP
1905 #: build/C/man2/ptrace.2:224
1906 #, no-wrap
1907 msgid "B<PTRACE_GETSIGINFO> (since Linux 2.3.99-pre6)"
1908 msgstr ""
1909
1910 #. type: Plain text
1911 #: build/C/man2/ptrace.2:236
1912 msgid ""
1913 "Retrieve information about the signal that caused the stop.  Copy a "
1914 "I<siginfo_t> structure (see B<sigaction>(2))  from the tracee to the address "
1915 "I<data> in the tracer.  (I<addr> is ignored.)"
1916 msgstr ""
1917
1918 #. type: TP
1919 #: build/C/man2/ptrace.2:236
1920 #, no-wrap
1921 msgid "B<PTRACE_SETREGS>, B<PTRACE_SETFPREGS>"
1922 msgstr ""
1923
1924 #.  FIXME In the preceding sentence, which modifications are disallowed,
1925 #.  and when they are disallowed, how does userspace discover that fact?
1926 #. type: Plain text
1927 #: build/C/man2/ptrace.2:249
1928 msgid ""
1929 "Copy the tracee's general-purpose or floating-point registers, respectively, "
1930 "from the address I<data> in the tracer.  As for B<PTRACE_POKEUSER>, some "
1931 "general-purpose register modifications may be disallowed.  (I<addr> is "
1932 "ignored.)"
1933 msgstr ""
1934
1935 #. type: TP
1936 #: build/C/man2/ptrace.2:249
1937 #, no-wrap
1938 msgid "B<PTRACE_SETSIGINFO> (since Linux 2.3.99-pre6)"
1939 msgstr ""
1940
1941 #. type: Plain text
1942 #: build/C/man2/ptrace.2:265
1943 msgid ""
1944 "Set signal information: copy a I<siginfo_t> structure from the address "
1945 "I<data> in the tracer to the tracee.  This will affect only signals that "
1946 "would normally be delivered to the tracee and were caught by the tracer.  It "
1947 "may be difficult to tell these normal signals from synthetic signals "
1948 "generated by B<ptrace>()  itself.  (I<addr> is ignored.)"
1949 msgstr ""
1950
1951 #. type: TP
1952 #: build/C/man2/ptrace.2:265
1953 #, no-wrap
1954 msgid "B<PTRACE_SETOPTIONS> (since Linux 2.4.6; see BUGS for caveats)"
1955 msgstr ""
1956
1957 #. type: Plain text
1958 #: build/C/man2/ptrace.2:274
1959 msgid ""
1960 "Set ptrace options from I<data>.  (I<addr> is ignored.)  I<data> is "
1961 "interpreted as a bit mask of options, which are specified by the following "
1962 "flags:"
1963 msgstr ""
1964
1965 #. type: TP
1966 #: build/C/man2/ptrace.2:275
1967 #, no-wrap
1968 msgid "B<PTRACE_O_TRACESYSGOOD> (since Linux 2.4.6)"
1969 msgstr ""
1970
1971 #. type: Plain text
1972 #: build/C/man2/ptrace.2:284
1973 msgid ""
1974 "When delivering system call traps, set bit 7 in the signal number (i.e., "
1975 "deliver I<SIGTRAP|0x80>).  This makes it easy for the tracer to distinguish "
1976 "normal traps from those caused by a system call.  (B<PTRACE_O_TRACESYSGOOD> "
1977 "may not work on all architectures.)"
1978 msgstr ""
1979
1980 #. type: TP
1981 #: build/C/man2/ptrace.2:284
1982 #, no-wrap
1983 msgid "B<PTRACE_O_TRACEFORK> (since Linux 2.5.46)"
1984 msgstr ""
1985
1986 #. type: Plain text
1987 #: build/C/man2/ptrace.2:296
1988 msgid ""
1989 "Stop the tracee at the next B<fork>(2)  and automatically start tracing the "
1990 "newly forked process, which will start with a B<SIGSTOP>.  A B<waitpid>(2)  "
1991 "by the tracer will return a I<status> value such that"
1992 msgstr ""
1993
1994 #. type: Plain text
1995 #: build/C/man2/ptrace.2:299
1996 #, no-wrap
1997 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_FORKE<lt>E<lt>8))\n"
1998 msgstr ""
1999
2000 #. type: Plain text
2001 #: build/C/man2/ptrace.2:303 build/C/man2/ptrace.2:322 build/C/man2/ptrace.2:341
2002 msgid "The PID of the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
2003 msgstr ""
2004
2005 #. type: TP
2006 #: build/C/man2/ptrace.2:303
2007 #, no-wrap
2008 msgid "B<PTRACE_O_TRACEVFORK> (since Linux 2.5.46)"
2009 msgstr ""
2010
2011 #. type: Plain text
2012 #: build/C/man2/ptrace.2:315
2013 msgid ""
2014 "Stop the tracee at the next B<vfork>(2)  and automatically start tracing the "
2015 "newly vforked process, which will start with a B<SIGSTOP>.  A B<waitpid>(2)  "
2016 "by the tracer will return a I<status> value such that"
2017 msgstr ""
2018
2019 #. type: Plain text
2020 #: build/C/man2/ptrace.2:318
2021 #, no-wrap
2022 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORKE<lt>E<lt>8))\n"
2023 msgstr ""
2024
2025 #. type: TP
2026 #: build/C/man2/ptrace.2:322
2027 #, no-wrap
2028 msgid "B<PTRACE_O_TRACECLONE> (since Linux 2.5.46)"
2029 msgstr ""
2030
2031 #. type: Plain text
2032 #: build/C/man2/ptrace.2:334
2033 msgid ""
2034 "Stop the tracee at the next B<clone>(2)  and automatically start tracing the "
2035 "newly cloned process, which will start with a B<SIGSTOP>.  A B<waitpid>(2)  "
2036 "by the tracer will return a I<status> value such that"
2037 msgstr ""
2038
2039 #. type: Plain text
2040 #: build/C/man2/ptrace.2:337
2041 #, no-wrap
2042 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_CLONEE<lt>E<lt>8))\n"
2043 msgstr ""
2044
2045 #. type: Plain text
2046 #: build/C/man2/ptrace.2:362
2047 msgid ""
2048 "This option may not catch B<clone>(2)  calls in all cases.  If the tracee "
2049 "calls B<clone>(2)  with the B<CLONE_VFORK> flag, B<PTRACE_EVENT_VFORK> will "
2050 "be delivered instead if B<PTRACE_O_TRACEVFORK> is set; otherwise if the "
2051 "tracee calls B<clone>(2)  with the exit signal set to B<SIGCHLD>, "
2052 "B<PTRACE_EVENT_FORK> will be delivered if B<PTRACE_O_TRACEFORK> is set."
2053 msgstr ""
2054
2055 #. type: TP
2056 #: build/C/man2/ptrace.2:362
2057 #, no-wrap
2058 msgid "B<PTRACE_O_TRACEEXEC> (since Linux 2.5.46)"
2059 msgstr ""
2060
2061 #. type: Plain text
2062 #: build/C/man2/ptrace.2:371
2063 msgid ""
2064 "Stop the tracee at the next B<execve>(2).  A B<waitpid>(2)  by the tracer "
2065 "will return a I<status> value such that"
2066 msgstr ""
2067
2068 #. type: Plain text
2069 #: build/C/man2/ptrace.2:374
2070 #, no-wrap
2071 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXECE<lt>E<lt>8))\n"
2072 msgstr ""
2073
2074 #. type: TP
2075 #: build/C/man2/ptrace.2:376
2076 #, no-wrap
2077 msgid "B<PTRACE_O_TRACEVFORKDONE> (since Linux 2.5.60)"
2078 msgstr ""
2079
2080 #. type: Plain text
2081 #: build/C/man2/ptrace.2:385
2082 msgid ""
2083 "Stop the tracee at the completion of the next B<vfork>(2).  A B<waitpid>(2)  "
2084 "by the tracer will return a I<status> value such that"
2085 msgstr ""
2086
2087 #. type: Plain text
2088 #: build/C/man2/ptrace.2:388
2089 #, no-wrap
2090 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORK_DONEE<lt>E<lt>8))\n"
2091 msgstr ""
2092
2093 #. type: Plain text
2094 #: build/C/man2/ptrace.2:392
2095 msgid ""
2096 "The PID of the new process can (since Linux 2.6.18) be retrieved with "
2097 "B<PTRACE_GETEVENTMSG>."
2098 msgstr ""
2099
2100 #. type: TP
2101 #: build/C/man2/ptrace.2:392
2102 #, no-wrap
2103 msgid "B<PTRACE_O_TRACEEXIT> (since Linux 2.5.60)"
2104 msgstr ""
2105
2106 #. type: Plain text
2107 #: build/C/man2/ptrace.2:400
2108 msgid ""
2109 "Stop the tracee at exit.  A B<waitpid>(2)  by the tracer will return a "
2110 "I<status> value such that"
2111 msgstr ""
2112
2113 #. type: Plain text
2114 #: build/C/man2/ptrace.2:403
2115 #, no-wrap
2116 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXITE<lt>E<lt>8))\n"
2117 msgstr ""
2118
2119 #. type: Plain text
2120 #: build/C/man2/ptrace.2:407
2121 msgid "The tracee's exit status can be retrieved with B<PTRACE_GETEVENTMSG>."
2122 msgstr ""
2123
2124 #. type: Plain text
2125 #: build/C/man2/ptrace.2:415
2126 msgid ""
2127 "The tracee is stopped early during process exit, when registers are still "
2128 "available, allowing the tracer to see where the exit occurred, whereas the "
2129 "normal exit notification is done after the process is finished exiting.  "
2130 "Even though context is available, the tracer cannot prevent the exit from "
2131 "happening at this point."
2132 msgstr ""
2133
2134 #. type: TP
2135 #: build/C/man2/ptrace.2:416
2136 #, no-wrap
2137 msgid "B<PTRACE_GETEVENTMSG> (since Linux 2.5.46)"
2138 msgstr ""
2139
2140 #. type: Plain text
2141 #: build/C/man2/ptrace.2:436
2142 msgid ""
2143 "Retrieve a message (as an I<unsigned long>)  about the ptrace event that "
2144 "just happened, placing it at the address I<data> in the tracer.  For "
2145 "B<PTRACE_EVENT_EXIT>, this is the tracee's exit status.  For "
2146 "B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK>, B<PTRACE_EVENT_VFORK_DONE>, and "
2147 "B<PTRACE_EVENT_CLONE>, this is the PID of the new process.  (I<addr> is "
2148 "ignored.)"
2149 msgstr ""
2150
2151 #. type: TP
2152 #: build/C/man2/ptrace.2:436
2153 #, no-wrap
2154 msgid "B<PTRACE_CONT>"
2155 msgstr ""
2156
2157 #. type: Plain text
2158 #: build/C/man2/ptrace.2:448
2159 msgid ""
2160 "Restart the stopped tracee process.  If I<data> is nonzero, it is "
2161 "interpreted as the number of a signal to be delivered to the tracee; "
2162 "otherwise, no signal is delivered.  Thus, for example, the tracer can "
2163 "control whether a signal sent to the tracee is delivered or not.  (I<addr> "
2164 "is ignored.)"
2165 msgstr ""
2166
2167 #. type: TP
2168 #: build/C/man2/ptrace.2:448
2169 #, no-wrap
2170 msgid "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>"
2171 msgstr ""
2172
2173 #. type: Plain text
2174 #: build/C/man2/ptrace.2:472
2175 msgid ""
2176 "Restart the stopped tracee as for B<PTRACE_CONT>, but arrange for the tracee "
2177 "to be stopped at the next entry to or exit from a system call, or after "
2178 "execution of a single instruction, respectively.  (The tracee will also, as "
2179 "usual, be stopped upon receipt of a signal.)  From the tracer's perspective, "
2180 "the tracee will appear to have been stopped by receipt of a B<SIGTRAP>.  So, "
2181 "for B<PTRACE_SYSCALL>, for example, the idea is to inspect the arguments to "
2182 "the system call at the first stop, then do another B<PTRACE_SYSCALL> and "
2183 "inspect the return value of the system call at the second stop.  The I<data> "
2184 "argument is treated as for B<PTRACE_CONT>.  (addr is ignored.)"
2185 msgstr ""
2186
2187 #. type: TP
2188 #: build/C/man2/ptrace.2:472
2189 #, no-wrap
2190 msgid "B<PTRACE_SYSEMU>, B<PTRACE_SYSEMU_SINGLESTEP> (since Linux 2.6.14)"
2191 msgstr ""
2192
2193 #. type: Plain text
2194 #: build/C/man2/ptrace.2:490
2195 msgid ""
2196 "For B<PTRACE_SYSEMU>, continue and stop on entry to the next system call, "
2197 "which will not be executed.  For B<PTRACE_SYSEMU_SINGLESTEP>, do the same "
2198 "but also singlestep if not a system call.  This call is used by programs "
2199 "like User Mode Linux that want to emulate all the tracee's system calls.  "
2200 "The I<data> argument is treated as for B<PTRACE_CONT>.  (I<addr> is ignored; "
2201 "not supported on all architectures.)"
2202 msgstr ""
2203
2204 #. type: TP
2205 #: build/C/man2/ptrace.2:490
2206 #, no-wrap
2207 msgid "B<PTRACE_KILL>"
2208 msgstr ""
2209
2210 #. type: Plain text
2211 #: build/C/man2/ptrace.2:499
2212 msgid ""
2213 "Send the tracee a B<SIGKILL> to terminate it.  (I<addr> and I<data> are "
2214 "ignored.)"
2215 msgstr ""
2216
2217 #.  [Note from Denys Vlasenko:
2218 #.      deprecation suggested by Oleg Nesterov. He prefers to deprecate it
2219 #.      instead of describing (and needing to support) PTRACE_KILL's quirks.]
2220 #. type: Plain text
2221 #: build/C/man2/ptrace.2:518
2222 msgid ""
2223 "I<This operation is deprecated; do not use it!> Instead, send a B<SIGKILL> "
2224 "directly using B<kill>(2)  or B<tgkill>(2).  The problem with B<PTRACE_KILL> "
2225 "is that it requires the tracee to be in signal-delivery-stop, otherwise it "
2226 "may not work (i.e., may complete successfully but won't kill the tracee).  "
2227 "By contrast, sending a B<SIGKILL> directly has no such limitation."
2228 msgstr ""
2229
2230 #. type: TP
2231 #: build/C/man2/ptrace.2:518
2232 #, no-wrap
2233 msgid "B<PTRACE_ATTACH>"
2234 msgstr ""
2235
2236 #.  No longer true (removed by Denys Vlasenko, 2011, who remarks:
2237 #.         "I think it isn't true in non-ancient 2.4 and in 2.6/3.x.
2238 #.          Basically, it's not true for any Linux in practical use.
2239 #.  ; the behavior of the tracee is as if it had done a
2240 #.  .BR PTRACE_TRACEME .
2241 #.  The calling process actually becomes the parent of the tracee
2242 #.  process for most purposes (e.g., it will receive
2243 #.  notification of tracee events and appears in
2244 #.  .BR ps (1)
2245 #.  output as the tracee's parent), but a
2246 #.  .BR getppid (2)
2247 #.  by the tracee will still return the PID of the original parent.
2248 #. type: Plain text
2249 #: build/C/man2/ptrace.2:546
2250 msgid ""
2251 "Attach to the process specified in I<pid>, making it a tracee of the calling "
2252 "process.  The tracee is sent a B<SIGSTOP>, but will not necessarily have "
2253 "stopped by the completion of this call; use B<waitpid>(2)  to wait for the "
2254 "tracee to stop.  See the \"Attaching and detaching\" subsection for "
2255 "additional information.  (I<addr> and I<data> are ignored.)"
2256 msgstr ""
2257
2258 #. type: TP
2259 #: build/C/man2/ptrace.2:546
2260 #, no-wrap
2261 msgid "B<PTRACE_DETACH>"
2262 msgstr ""
2263
2264 #
2265 #.  In the text below, we decided to avoid prettifying the text with markup:
2266 #.  it would make the source nearly impossible to edit, and we _do_ intend
2267 #.  to edit it often, in order to keep it updated:
2268 #.  ptrace API is full of quirks, no need to compound this situation by
2269 #.  making it excruciatingly painful to document them!
2270 #. type: Plain text
2271 #: build/C/man2/ptrace.2:562
2272 msgid ""
2273 "Restart the stopped tracee as for B<PTRACE_CONT>, but first detach from it.  "
2274 "Under Linux, a tracee can be detached in this way regardless of which method "
2275 "was used to initiate tracing.  (I<addr> is ignored.)"
2276 msgstr ""
2277
2278 #. type: SS
2279 #: build/C/man2/ptrace.2:562
2280 #, no-wrap
2281 msgid "Death under ptrace"
2282 msgstr ""
2283
2284 #. type: Plain text
2285 #: build/C/man2/ptrace.2:571
2286 msgid ""
2287 "When a (possibly multithreaded) process receives a killing signal (one whose "
2288 "disposition is set to B<SIG_DFL> and whose default action is to kill the "
2289 "process), all threads exit.  Tracees report their death to their tracer(s).  "
2290 "Notification of this event is delivered via B<waitpid>(2)."
2291 msgstr ""
2292
2293 #. type: Plain text
2294 #: build/C/man2/ptrace.2:580
2295 msgid ""
2296 "Note that the killing signal will first cause signal-delivery-stop (on one "
2297 "tracee only), and only after it is injected by the tracer (or after it was "
2298 "dispatched to a thread which isn't traced), will death from the signal "
2299 "happen on I<all> tracees within a multithreaded process.  (The term "
2300 "\"signal-delivery-stop\" is explained below.)"
2301 msgstr ""
2302
2303 #. type: Plain text
2304 #: build/C/man2/ptrace.2:594
2305 msgid ""
2306 "B<SIGKILL> operates similarly, with exceptions.  No signal-delivery-stop is "
2307 "generated for B<SIGKILL> and therefore the tracer can't suppress it.  "
2308 "B<SIGKILL> kills even within system calls (syscall-exit-stop is not "
2309 "generated prior to death by B<SIGKILL>).  The net effect is that B<SIGKILL> "
2310 "always kills the process (all its threads), even if some threads of the "
2311 "process are ptraced."
2312 msgstr ""
2313
2314 #. type: Plain text
2315 #: build/C/man2/ptrace.2:599
2316 msgid ""
2317 "When the tracee calls B<_exit>(2), it reports its death to its tracer.  "
2318 "Other threads are not affected."
2319 msgstr ""
2320
2321 #. type: Plain text
2322 #: build/C/man2/ptrace.2:603
2323 msgid ""
2324 "When any thread executes B<exit_group>(2), every tracee in its thread group "
2325 "reports its death to its tracer."
2326 msgstr ""
2327
2328 #. type: Plain text
2329 #: build/C/man2/ptrace.2:617
2330 msgid ""
2331 "If the B<PTRACE_O_TRACEEXIT> option is on, B<PTRACE_EVENT_EXIT> will happen "
2332 "before actual death.  This applies to exits via B<exit>(2), "
2333 "B<exit_group>(2), and signal deaths (except B<SIGKILL>), and when threads "
2334 "are torn down on B<execve>(2)  in a multithreaded process."
2335 msgstr ""
2336
2337 #. type: Plain text
2338 #: build/C/man2/ptrace.2:642
2339 msgid ""
2340 "The tracer cannot assume that the ptrace-stopped tracee exists.  There are "
2341 "many scenarios when the tracee may die while stopped (such as B<SIGKILL>).  "
2342 "Therefore, the tracer must be prepared to handle an B<ESRCH> error on any "
2343 "ptrace operation.  Unfortunately, the same error is returned if the tracee "
2344 "exists but is not ptrace-stopped (for commands which require a stopped "
2345 "tracee), or if it is not traced by the process which issued the ptrace "
2346 "call.  The tracer needs to keep track of the stopped/running state of the "
2347 "tracee, and interpret B<ESRCH> as \"tracee died unexpectedly\" only if it "
2348 "knows that the tracee has been observed to enter ptrace-stop.  Note that "
2349 "there is no guarantee that I<waitpid(WNOHANG)> will reliably report the "
2350 "tracee's death status if a ptrace operation returned B<ESRCH>.  "
2351 "I<waitpid(WNOHANG)> may return 0 instead.  In other words, the tracee may be "
2352 "\"not yet fully dead\", but already refusing ptrace requests."
2353 msgstr ""
2354
2355 #. type: Plain text
2356 #: build/C/man2/ptrace.2:656
2357 msgid ""
2358 "The tracer can't assume that the tracee I<always> ends its life by reporting "
2359 "I<WIFEXITED(status)> or I<WIFSIGNALED(status)>; there are cases where this "
2360 "does not occur.  For example, if a thread other than thread group leader "
2361 "does an B<execve>(2), it disappears; its PID will never be seen again, and "
2362 "any subsequent ptrace stops will be reported under the thread group leader's "
2363 "PID."
2364 msgstr ""
2365
2366 #. type: SS
2367 #: build/C/man2/ptrace.2:656
2368 #, no-wrap
2369 msgid "Stopped states"
2370 msgstr ""
2371
2372 #. type: Plain text
2373 #: build/C/man2/ptrace.2:658
2374 msgid "A tracee can be in two states: running or stopped."
2375 msgstr ""
2376
2377 #. type: Plain text
2378 #: build/C/man2/ptrace.2:662
2379 msgid ""
2380 "There are many kinds of states when the tracee is stopped, and in ptrace "
2381 "discussions they are often conflated.  Therefore, it is important to use "
2382 "precise terms."
2383 msgstr ""
2384
2385 #. type: Plain text
2386 #: build/C/man2/ptrace.2:673
2387 msgid ""
2388 "In this manual page, any stopped state in which the tracee is ready to "
2389 "accept ptrace commands from the tracer is called I<ptrace-stop>.  "
2390 "Ptrace-stops can be further subdivided into I<signal-delivery-stop>, "
2391 "I<group-stop>, I<syscall-stop>, and so on.  These stopped states are "
2392 "described in detail below."
2393 msgstr ""
2394
2395 #. type: Plain text
2396 #: build/C/man2/ptrace.2:678
2397 msgid ""
2398 "When the running tracee enters ptrace-stop, it notifies its tracer using "
2399 "B<waitpid>(2)  (or one of the other \"wait\" system calls).  Most of this "
2400 "manual page assumes that the tracer waits with:"
2401 msgstr ""
2402
2403 #. type: Plain text
2404 #: build/C/man2/ptrace.2:680
2405 #, no-wrap
2406 msgid "    pid = waitpid(pid_or_minus_1, &status, __WALL);\n"
2407 msgstr ""
2408
2409 #.  Denys Vlasenko:
2410 #.      Do we require __WALL usage, or will just using 0 be ok? (With 0,
2411 #.      I am not 100% sure there aren't ugly corner cases.) Are the
2412 #.      rules different if user wants to use waitid? Will waitid require
2413 #.      WEXITED?
2414 #. type: Plain text
2415 #: build/C/man2/ptrace.2:692
2416 msgid ""
2417 "Ptrace-stopped tracees are reported as returns with I<pid> greater than 0 "
2418 "and I<WIFSTOPPED(status)> true."
2419 msgstr ""
2420
2421 #. type: Plain text
2422 #: build/C/man2/ptrace.2:700
2423 msgid ""
2424 "The B<__WALL> flag does not include the B<WSTOPPED> and B<WEXITED> flags, "
2425 "but implies their functionality."
2426 msgstr ""
2427
2428 #. type: Plain text
2429 #: build/C/man2/ptrace.2:707
2430 msgid ""
2431 "Setting the B<WCONTINUED> flag when calling B<waitpid>(2)  is not "
2432 "recommended: the \"continued\" state is per-process and consuming it can "
2433 "confuse the real parent of the tracee."
2434 msgstr ""
2435
2436 #. type: Plain text
2437 #: build/C/man2/ptrace.2:715
2438 msgid ""
2439 "Use of the B<WNOHANG> flag may cause B<waitpid>(2)  to return 0 (\"no wait "
2440 "results available yet\")  even if the tracer knows there should be a "
2441 "notification.  Example:"
2442 msgstr ""
2443
2444 #. type: Plain text
2445 #: build/C/man2/ptrace.2:719
2446 #, no-wrap
2447 msgid ""
2448 "    kill(tracee, SIGKILL);\n"
2449 "    waitpid(tracee, &status, __WALL | WNOHANG);\n"
2450 msgstr ""
2451
2452 #. type: Plain text
2453 #: build/C/man2/ptrace.2:744
2454 msgid ""
2455 "The following kinds of ptrace-stops exist: signal-delivery-stops, "
2456 "group-stop, PTRACE_EVENT stops, syscall-stops B<PTRACE_SINGLESTEP>, "
2457 "B<PTRACE_SYSEMU>, and B<PTRACE_SYSEMU_SINGLESTEP>.  They all are reported by "
2458 "B<waitpid>(2)  with I<WIFSTOPPED(status)> true.  They may be differentiated "
2459 "by examining the value I<statusE<gt>E<gt>8>, and if there is ambiguity in "
2460 "that value, by querying B<PTRACE_GETSIGINFO>.  (Note: the "
2461 "I<WSTOPSIG(status)> macro can't be used to perform this examination, because "
2462 "it returns the value (I<status\\E<gt>E<gt>8)\\ >B<&\\ 0xff>B<.)>"
2463 msgstr ""
2464
2465 #. type: SS
2466 #: build/C/man2/ptrace.2:744
2467 #, no-wrap
2468 msgid "Signal-delivery-stop"
2469 msgstr ""
2470
2471 #. type: Plain text
2472 #: build/C/man2/ptrace.2:764
2473 msgid ""
2474 "When a (possibly multithreaded) process receives any signal except "
2475 "B<SIGKILL>, the kernel selects an arbitrary thread which handles the "
2476 "signal.  (If the signal is generated with B<tgkill>(2), the target thread "
2477 "can be explicitly selected by the caller.)  If the selected thread is "
2478 "traced, it enters signal-delivery-stop.  At this point, the signal is not "
2479 "yet delivered to the process, and can be suppressed by the tracer.  If the "
2480 "tracer doesn't suppress the signal, it passes the signal to the tracee in "
2481 "the next ptrace restart request.  This second step of signal delivery is "
2482 "called I<signal injection> in this manual page.  Note that if the signal is "
2483 "blocked, signal-delivery-stop doesn't happen until the signal is unblocked, "
2484 "with the usual exception that B<SIGSTOP> can't be blocked."
2485 msgstr ""
2486
2487 #. type: Plain text
2488 #: build/C/man2/ptrace.2:778
2489 msgid ""
2490 "Signal-delivery-stop is observed by the tracer as B<waitpid>(2)  returning "
2491 "with I<WIFSTOPPED(status)> true, with the stopping signal returned by "
2492 "I<WSTOPSIG(status)>.  If the stopping signal is B<SIGTRAP>, this may be a "
2493 "different kind of ptrace-stop; see the \"Syscall-stops\" and \"execve\" "
2494 "sections below for details.  If I<WSTOPSIG(status)> returns a stopping "
2495 "signal, this may be a group-stop; see below."
2496 msgstr ""
2497
2498 #. type: SS
2499 #: build/C/man2/ptrace.2:778
2500 #, no-wrap
2501 msgid "Signal injection and suppression"
2502 msgstr ""
2503
2504 #. type: Plain text
2505 #: build/C/man2/ptrace.2:781
2506 msgid ""
2507 "After signal-delivery-stop is observed by the tracer, the tracer should "
2508 "restart the tracee with the call"
2509 msgstr ""
2510
2511 #. type: Plain text
2512 #: build/C/man2/ptrace.2:783
2513 #, no-wrap
2514 msgid "    ptrace(PTRACE_restart, pid, 0, sig)\n"
2515 msgstr ""
2516
2517 #. type: Plain text
2518 #: build/C/man2/ptrace.2:796
2519 msgid ""
2520 "where B<PTRACE_restart> is one of the restarting ptrace requests.  If I<sig> "
2521 "is 0, then a signal is not delivered.  Otherwise, the signal I<sig> is "
2522 "delivered.  This operation is called I<signal injection> in this manual "
2523 "page, to distinguish it from signal-delivery-stop."
2524 msgstr ""
2525
2526 #. type: Plain text
2527 #: build/C/man2/ptrace.2:802
2528 msgid ""
2529 "The I<sig> value may be different from the I<WSTOPSIG(status)> value: the "
2530 "tracer can cause a different signal to be injected."
2531 msgstr ""
2532
2533 #. type: Plain text
2534 #: build/C/man2/ptrace.2:813
2535 msgid ""
2536 "Note that a suppressed signal still causes system calls to return "
2537 "prematurely.  Restartable system calls will be restarted (the tracer will "
2538 "observe the tracee to execute B<restart_syscall(2)> if the tracer uses "
2539 "B<PTRACE_SYSCALL>); non-restartable system calls may fail with B<EINTR> even "
2540 "though no observable signal is injected to the tracee."
2541 msgstr ""
2542
2543 #. type: Plain text
2544 #: build/C/man2/ptrace.2:824
2545 msgid ""
2546 "Restarting ptrace commands issued in ptrace-stops other than "
2547 "signal-delivery-stop are not guaranteed to inject a signal, even if I<sig> "
2548 "is nonzero.  No error is reported; a nonzero I<sig> may simply be ignored.  "
2549 "Ptrace users should not try to \"create a new signal\" this way: use "
2550 "B<tgkill>(2)  instead."
2551 msgstr ""
2552
2553 #. type: Plain text
2554 #: build/C/man2/ptrace.2:831
2555 msgid ""
2556 "The fact that signal injection requests may be ignored when restarting the "
2557 "tracee after ptrace stops that are not signal-delivery-stops is a cause of "
2558 "confusion among ptrace users.  One typical scenario is that the tracer "
2559 "observes group-stop, mistakes it for signal-delivery-stop, restarts the "
2560 "tracee with"
2561 msgstr ""
2562
2563 #. type: Plain text
2564 #: build/C/man2/ptrace.2:833
2565 #, no-wrap
2566 msgid "    ptrace(PTRACE_rest, pid, 0, stopsig)\n"
2567 msgstr ""
2568
2569 #. type: Plain text
2570 #: build/C/man2/ptrace.2:839
2571 msgid ""
2572 "with the intention of injecting I<stopsig>, but I<stopsig> gets ignored and "
2573 "the tracee continues to run."
2574 msgstr ""
2575
2576 #. type: Plain text
2577 #: build/C/man2/ptrace.2:859
2578 msgid ""
2579 "The B<SIGCONT> signal has a side effect of waking up (all threads of)  a "
2580 "group-stopped process.  This side effect happens before "
2581 "signal-delivery-stop.  The tracer can't suppress this side-effect (it can "
2582 "only suppress signal injection, which only causes the B<SIGCONT> handler to "
2583 "not be executed in the tracee, if such a handler is installed).  In fact, "
2584 "waking up from group-stop may be followed by signal-delivery-stop for "
2585 "signal(s)  I<other than> B<SIGCONT>, if they were pending when B<SIGCONT> "
2586 "was delivered.  In other words, B<SIGCONT> may be not the first signal "
2587 "observed by the tracee after it was sent."
2588 msgstr ""
2589
2590 #. type: Plain text
2591 #: build/C/man2/ptrace.2:863
2592 msgid ""
2593 "Stopping signals cause (all threads of) a process to enter group-stop.  This "
2594 "side effect happens after signal injection, and therefore can be suppressed "
2595 "by the tracer."
2596 msgstr ""
2597
2598 #.  In the Linux 2.4 sources, in arch/i386/kernel/signal.c::do_signal(),
2599 #.  there is:
2600 #
2601 #.              /* The debugger continued.  Ignore SIGSTOP.  */
2602 #.              if (signr == SIGSTOP)
2603 #.                      continue;
2604 #. type: Plain text
2605 #: build/C/man2/ptrace.2:873
2606 msgid "In Linux 2.4 and earlier, the B<SIGSTOP> signal can't be injected."
2607 msgstr ""
2608
2609 #. type: Plain text
2610 #: build/C/man2/ptrace.2:890
2611 msgid ""
2612 "B<PTRACE_GETSIGINFO> can be used to retrieve a I<siginfo_t> structure which "
2613 "corresponds to the delivered signal.  B<PTRACE_SETSIGINFO> may be used to "
2614 "modify it.  If B<PTRACE_SETSIGINFO> has been used to alter I<siginfo_t>, the "
2615 "I<si_signo> field and the I<sig> parameter in the restarting command must "
2616 "match, otherwise the result is undefined."
2617 msgstr ""
2618
2619 #. type: SS
2620 #: build/C/man2/ptrace.2:890
2621 #, no-wrap
2622 msgid "Group-stop"
2623 msgstr ""
2624
2625 #. type: Plain text
2626 #: build/C/man2/ptrace.2:902
2627 msgid ""
2628 "When a (possibly multithreaded) process receives a stopping signal, all "
2629 "threads stop.  If some threads are traced, they enter a group-stop.  Note "
2630 "that the stopping signal will first cause signal-delivery-stop (on one "
2631 "tracee only), and only after it is injected by the tracer (or after it was "
2632 "dispatched to a thread which isn't traced), will group-stop be initiated on "
2633 "I<all> tracees within the multithreaded process.  As usual, every tracee "
2634 "reports its group-stop separately to the corresponding tracer."
2635 msgstr ""
2636
2637 #. type: Plain text
2638 #: build/C/man2/ptrace.2:911
2639 msgid ""
2640 "Group-stop is observed by the tracer as B<waitpid>(2)  returning with "
2641 "I<WIFSTOPPED(status)> true, with the stopping signal available via "
2642 "I<WSTOPSIG(status)>.  The same result is returned by some other classes of "
2643 "ptrace-stops, therefore the recommended practice is to perform the call"
2644 msgstr ""
2645
2646 #. type: Plain text
2647 #: build/C/man2/ptrace.2:913
2648 #, no-wrap
2649 msgid "    ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo)\n"
2650 msgstr ""
2651
2652 #. type: Plain text
2653 #: build/C/man2/ptrace.2:934
2654 msgid ""
2655 "The call can be avoided if the signal is not B<SIGSTOP>, B<SIGTSTP>, "
2656 "B<SIGTTIN>, or B<SIGTTOU>; only these four signals are stopping signals.  If "
2657 "the tracer sees something else, it can't be a group-stop.  Otherwise, the "
2658 "tracer needs to call B<PTRACE_GETSIGINFO>.  If B<PTRACE_GETSIGINFO> fails "
2659 "with B<EINVAL>, then it is definitely a group-stop.  (Other failure codes "
2660 "are possible, such as B<ESRCH> (\"no such process\") if a B<SIGKILL> killed "
2661 "the tracee.)"
2662 msgstr ""
2663
2664 #. type: Plain text
2665 #: build/C/man2/ptrace.2:943
2666 msgid ""
2667 "As of kernel 2.6.38, after the tracer sees the tracee ptrace-stop and until "
2668 "it restarts or kills it, the tracee will not run, and will not send "
2669 "notifications (except B<SIGKILL> death) to the tracer, even if the tracer "
2670 "enters into another B<waitpid>(2)  call."
2671 msgstr ""
2672
2673 #. type: Plain text
2674 #: build/C/man2/ptrace.2:957
2675 msgid ""
2676 "The kernel behavior described in the previous paragraph causes a problem "
2677 "with transparent handling of stopping signals.  If the tracer restarts the "
2678 "tracee after group-stop, the stopping signal is effectively ignored\\(emthe "
2679 "tracee doesn't remain stopped, it runs.  If the tracer doesn't restart the "
2680 "tracee before entering into the next B<waitpid>(2), future B<SIGCONT> "
2681 "signals will not be reported to the tracer; this would cause the B<SIGCONT> "
2682 "signals to have no effect on the tracee."
2683 msgstr ""
2684
2685 #. type: SS
2686 #: build/C/man2/ptrace.2:957
2687 #, no-wrap
2688 msgid "PTRACE_EVENT stops"
2689 msgstr ""
2690
2691 #. type: Plain text
2692 #: build/C/man2/ptrace.2:963
2693 msgid ""
2694 "If the tracer sets B<PTRACE_O_TRACE_*> options, the tracee will enter "
2695 "ptrace-stops called B<PTRACE_EVENT> stops."
2696 msgstr ""
2697
2698 #. type: Plain text
2699 #: build/C/man2/ptrace.2:977
2700 msgid ""
2701 "B<PTRACE_EVENT> stops are observed by the tracer as B<waitpid>(2)  returning "
2702 "with I<WIFSTOPPED(status)>, and I<WSTOPSIG(status)> returns B<SIGTRAP>.  An "
2703 "additional bit is set in the higher byte of the status word: the value "
2704 "I<statusE<gt>E<gt>8> will be"
2705 msgstr ""
2706
2707 #. type: Plain text
2708 #: build/C/man2/ptrace.2:979
2709 #, no-wrap
2710 msgid "    (SIGTRAP | PTRACE_EVENT_foo E<lt>E<lt> 8).\n"
2711 msgstr ""
2712
2713 #. type: Plain text
2714 #: build/C/man2/ptrace.2:981
2715 msgid "The following events exist:"
2716 msgstr ""
2717
2718 #. type: TP
2719 #: build/C/man2/ptrace.2:981
2720 #, no-wrap
2721 msgid "B<PTRACE_EVENT_VFORK>"
2722 msgstr ""
2723
2724 #. type: Plain text
2725 #: build/C/man2/ptrace.2:994
2726 msgid ""
2727 "Stop before return from B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> "
2728 "flag.  When the tracee is continued after this stop, it will wait for child "
2729 "to exit/exec before continuing its execution (in other words, the usual "
2730 "behavior on B<vfork>(2))."
2731 msgstr ""
2732
2733 #. type: TP
2734 #: build/C/man2/ptrace.2:994
2735 #, no-wrap
2736 msgid "B<PTRACE_EVENT_FORK>"
2737 msgstr ""
2738
2739 #. type: Plain text
2740 #: build/C/man2/ptrace.2:1002
2741 msgid ""
2742 "Stop before return from B<fork>(2)  or B<clone>(2)  with the exit signal set "
2743 "to B<SIGCHLD>."
2744 msgstr ""
2745
2746 #. type: TP
2747 #: build/C/man2/ptrace.2:1002
2748 #, no-wrap
2749 msgid "B<PTRACE_EVENT_CLONE>"
2750 msgstr ""
2751
2752 #. type: Plain text
2753 #: build/C/man2/ptrace.2:1006
2754 msgid "Stop before return from B<clone>(2)"
2755 msgstr ""
2756
2757 #. type: TP
2758 #: build/C/man2/ptrace.2:1006
2759 #, no-wrap
2760 msgid "B<PTRACE_EVENT_VFORK_DONE>"
2761 msgstr ""
2762
2763 #. type: Plain text
2764 #: build/C/man2/ptrace.2:1016
2765 msgid ""
2766 "Stop before return from B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> "
2767 "flag, but after the child unblocked this tracee by exiting or execing."
2768 msgstr ""
2769
2770 #. type: Plain text
2771 #: build/C/man2/ptrace.2:1022
2772 msgid ""
2773 "For all four stops described above, the stop occurs in the parent (i.e., the "
2774 "tracee), not in the newly created thread.  B<PTRACE_GETEVENTMSG> can be used "
2775 "to retrieve the new thread's ID."
2776 msgstr ""
2777
2778 #. type: TP
2779 #: build/C/man2/ptrace.2:1022
2780 #, no-wrap
2781 msgid "B<PTRACE_EVENT_EXEC>"
2782 msgstr ""
2783
2784 #. type: Plain text
2785 #: build/C/man2/ptrace.2:1026
2786 msgid "Stop before return from B<execve>(2)."
2787 msgstr ""
2788
2789 #. type: TP
2790 #: build/C/man2/ptrace.2:1026
2791 #, no-wrap
2792 msgid "B<PTRACE_EVENT_EXIT>"
2793 msgstr ""
2794
2795 #. type: Plain text
2796 #: build/C/man2/ptrace.2:1042
2797 msgid ""
2798 "Stop before exit (including death from B<exit_group>(2)), signal death, or "
2799 "exit caused by B<execve>(2)  in a multithreaded process.  "
2800 "B<PTRACE_GETEVENTMSG> returns the exit status.  Registers can be examined "
2801 "(unlike when \"real\" exit happens).  The tracee is still alive; it needs to "
2802 "be B<PTRACE_CONT>ed or B<PTRACE_DETACH>ed to finish exiting."
2803 msgstr ""
2804
2805 #. type: Plain text
2806 #: build/C/man2/ptrace.2:1053
2807 msgid ""
2808 "B<PTRACE_GETSIGINFO> on B<PTRACE_EVENT> stops returns B<SIGTRAP in> "
2809 "I<si_signo>, with I<si_code> set to I<(eventE<lt>E<lt>8)\\ |\\ SIGTRAP>."
2810 msgstr ""
2811
2812 #. type: SS
2813 #: build/C/man2/ptrace.2:1053
2814 #, no-wrap
2815 msgid "Syscall-stops"
2816 msgstr ""
2817
2818 #. type: Plain text
2819 #: build/C/man2/ptrace.2:1066
2820 msgid ""
2821 "If the tracee was restarted by B<PTRACE_SYSCALL>, the tracee enters "
2822 "syscall-enter-stop just prior to entering any system call.  If the tracer "
2823 "restarts the tracee with B<PTRACE_SYSCALL>, the tracee enters "
2824 "syscall-exit-stop when the system call is finished, or if it is interrupted "
2825 "by a signal.  (That is, signal-delivery-stop never happens between "
2826 "syscall-enter-stop and syscall-exit-stop; it happens I<after> "
2827 "syscall-exit-stop.)"
2828 msgstr ""
2829
2830 #. type: Plain text
2831 #: build/C/man2/ptrace.2:1080
2832 msgid ""
2833 "Other possibilities are that the tracee may stop in a B<PTRACE_EVENT> stop, "
2834 "exit (if it entered B<_exit>(2)  or B<exit_group>(2)), be killed by "
2835 "B<SIGKILL>, or die silently (if it is a thread group leader, the "
2836 "B<execve>(2)  happened in another thread, and that thread is not traced by "
2837 "the same tracer; this situation is discussed later)."
2838 msgstr ""
2839
2840 #. type: Plain text
2841 #: build/C/man2/ptrace.2:1095
2842 msgid ""
2843 "Syscall-enter-stop and syscall-exit-stop are observed by the tracer as "
2844 "B<waitpid>(2)  returning with I<WIFSTOPPED(status)> true, and "
2845 "I<WSTOPSIG(status)> giving B<SIGTRAP>.  If the B<PTRACE_O_TRACESYSGOOD> "
2846 "option was set by the tracer, then I<WSTOPSIG(status)> will give the value "
2847 "I<(SIGTRAP\\ |\\ 0x80)>."
2848 msgstr ""
2849
2850 #. type: Plain text
2851 #: build/C/man2/ptrace.2:1101
2852 msgid ""
2853 "Syscall-stops can be distinguished from signal-delivery-stop with B<SIGTRAP> "
2854 "by querying B<PTRACE_GETSIGINFO> for the following cases:"
2855 msgstr ""
2856
2857 #. type: TP
2858 #: build/C/man2/ptrace.2:1101
2859 #, no-wrap
2860 msgid "I<si_code> E<lt>= 0"
2861 msgstr ""
2862
2863 #. type: Plain text
2864 #: build/C/man2/ptrace.2:1113
2865 msgid ""
2866 "B<SIGTRAP> was delivered as a result of a userspace action, for example, a "
2867 "system call (B<tgkill>(2), B<kill>(2), B<sigqueue>(3), etc.), expiration of "
2868 "a POSIX timer, change of state on a POSIX message queue, or completion of an "
2869 "asynchronous I/O request."
2870 msgstr ""
2871
2872 #. type: TP
2873 #: build/C/man2/ptrace.2:1113
2874 #, no-wrap
2875 msgid "I<si_code> == SI_KERNEL (0x80)"
2876 msgstr ""
2877
2878 #. type: Plain text
2879 #: build/C/man2/ptrace.2:1117
2880 msgid "B<SIGTRAP> was sent by the kernel."
2881 msgstr ""
2882
2883 #. type: TP
2884 #: build/C/man2/ptrace.2:1117
2885 #, no-wrap
2886 msgid "I<si_code> == SIGTRAP or I<si_code> == (SIGTRAP|0x80)"
2887 msgstr ""
2888
2889 #. type: Plain text
2890 #: build/C/man2/ptrace.2:1120
2891 msgid "This is a syscall-stop."
2892 msgstr ""
2893
2894 #. type: Plain text
2895 #: build/C/man2/ptrace.2:1125
2896 msgid ""
2897 "However, syscall-stops happen very often (twice per system call), and "
2898 "performing B<PTRACE_GETSIGINFO> for every syscall-stop may be somewhat "
2899 "expensive."
2900 msgstr ""
2901
2902 #. type: Plain text
2903 #: build/C/man2/ptrace.2:1148
2904 msgid ""
2905 "Some architectures allow the cases to be distinguished by examining "
2906 "registers.  For example, on x86, I<rax> == -B<ENOSYS> in "
2907 "syscall-enter-stop.  Since B<SIGTRAP> (like any other signal) always happens "
2908 "I<after> syscall-exit-stop, and at this point I<rax> almost never contains "
2909 "-B<ENOSYS>, the B<SIGTRAP> looks like \"syscall-stop which is not "
2910 "syscall-enter-stop\"; in other words, it looks like a \"stray "
2911 "syscall-exit-stop\" and can be detected this way.  But such detection is "
2912 "fragile and is best avoided."
2913 msgstr ""
2914
2915 #. type: Plain text
2916 #: build/C/man2/ptrace.2:1154
2917 msgid ""
2918 "Using the B<PTRACE_O_TRACESYSGOOD> option is the recommended method to "
2919 "distinquish syscall-stops from other kinds of ptrace-stops, since it is "
2920 "reliable and does not incur a performance penalty."
2921 msgstr ""
2922
2923 #. type: Plain text
2924 #: build/C/man2/ptrace.2:1165
2925 msgid ""
2926 "Syscall-enter-stop and syscall-exit-stop are indistinguishable from each "
2927 "other by the tracer.  The tracer needs to keep track of the sequence of "
2928 "ptrace-stops in order to not misinterpret syscall-enter-stop as "
2929 "syscall-exit-stop or vice versa.  The rule is that syscall-enter-stop is "
2930 "always followed by syscall-exit-stop, B<PTRACE_EVENT> stop or the tracee's "
2931 "death; no other kinds of ptrace-stop can occur in between."
2932 msgstr ""
2933
2934 #. type: Plain text
2935 #: build/C/man2/ptrace.2:1170
2936 msgid ""
2937 "If after syscall-enter-stop, the tracer uses a restarting command other than "
2938 "B<PTRACE_SYSCALL>, syscall-exit-stop is not generated."
2939 msgstr ""
2940
2941 #. type: Plain text
2942 #: build/C/man2/ptrace.2:1182
2943 msgid ""
2944 "B<PTRACE_GETSIGINFO> on syscall-stops returns B<SIGTRAP> in I<si_signo>, "
2945 "with I<si_code> set to B<SIGTRAP> or I<(SIGTRAP|0x80)>."
2946 msgstr ""
2947
2948 #. type: SS
2949 #: build/C/man2/ptrace.2:1182
2950 #, no-wrap
2951 msgid "PTRACE_SINGLESTEP, PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP stops"
2952 msgstr ""
2953
2954 #
2955 #.  FIXME
2956 #.  document stops occurring with PTRACE_SINGLESTEP, PTRACE_SYSEMU,
2957 #.  PTRACE_SYSEMU_SINGLESTEP
2958 #. type: Plain text
2959 #: build/C/man2/ptrace.2:1188
2960 msgid "[Details of these kinds of stops are yet to be documented.]"
2961 msgstr ""
2962
2963 #. type: SS
2964 #: build/C/man2/ptrace.2:1188
2965 #, no-wrap
2966 msgid "Informational and restarting ptrace commands"
2967 msgstr ""
2968
2969 #. type: Plain text
2970 #: build/C/man2/ptrace.2:1196
2971 msgid ""
2972 "Most ptrace commands (all except B<PTRACE_ATTACH>, B<PTRACE_TRACEME>, and "
2973 "B<PTRACE_KILL>)  require the tracee to be in a ptrace-stop, otherwise they "
2974 "fail with B<ESRCH>."
2975 msgstr ""
2976
2977 #. type: Plain text
2978 #: build/C/man2/ptrace.2:1201
2979 msgid ""
2980 "When the tracee is in ptrace-stop, the tracer can read and write data to the "
2981 "tracee using informational commands.  These commands leave the tracee in "
2982 "ptrace-stopped state:"
2983 msgstr ""
2984
2985 #. type: Plain text
2986 #: build/C/man2/ptrace.2:1211
2987 #, no-wrap
2988 msgid ""
2989 "    ptrace(PTRACE_PEEKTEXT/PEEKDATA/PEEKUSER, pid, addr, 0);\n"
2990 "    ptrace(PTRACE_POKETEXT/POKEDATA/POKEUSER, pid, addr, long_val);\n"
2991 "    ptrace(PTRACE_GETREGS/GETFPREGS, pid, 0, &struct);\n"
2992 "    ptrace(PTRACE_SETREGS/SETFPREGS, pid, 0, &struct);\n"
2993 "    ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo);\n"
2994 "    ptrace(PTRACE_SETSIGINFO, pid, 0, &siginfo);\n"
2995 "    ptrace(PTRACE_GETEVENTMSG, pid, 0, &long_var);\n"
2996 "    ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
2997 msgstr ""
2998
2999 #. type: Plain text
3000 #: build/C/man2/ptrace.2:1223
3001 msgid ""
3002 "Note that some errors are not reported.  For example, setting signal "
3003 "information (I<siginfo>)  may have no effect in some ptrace-stops, yet the "
3004 "call may succeed (return 0 and not set I<errno>); querying "
3005 "B<PTRACE_GETEVENTMSG> may succeed and return some random value if current "
3006 "ptrace-stop is not documented as returning a meaningful event message."
3007 msgstr ""
3008
3009 #. type: Plain text
3010 #: build/C/man2/ptrace.2:1225
3011 msgid "The call"
3012 msgstr ""
3013
3014 #. type: Plain text
3015 #: build/C/man2/ptrace.2:1227
3016 #, no-wrap
3017 msgid "    ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
3018 msgstr ""
3019
3020 #. type: Plain text
3021 #: build/C/man2/ptrace.2:1236
3022 msgid ""
3023 "affects one tracee.  The tracee's current flags are replaced.  Flags are "
3024 "inherited by new tracees created and \"auto-attached\" via active "
3025 "B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or B<PTRACE_O_TRACECLONE> "
3026 "options."
3027 msgstr ""
3028
3029 #. type: Plain text
3030 #: build/C/man2/ptrace.2:1239
3031 msgid ""
3032 "Another group of commands makes the ptrace-stopped tracee run.  They have "
3033 "the form:"
3034 msgstr ""
3035
3036 #. type: Plain text
3037 #: build/C/man2/ptrace.2:1241
3038 #, no-wrap
3039 msgid "    ptrace(cmd, pid, 0, sig);\n"
3040 msgstr ""
3041
3042 #. type: Plain text
3043 #: build/C/man2/ptrace.2:1261
3044 msgid ""
3045 "where I<cmd> is B<PTRACE_CONT>, B<PTRACE_DETACH>, B<PTRACE_SYSCALL>, "
3046 "B<PTRACE_SINGLESTEP>, B<PTRACE_SYSEMU>, or B<PTRACE_SYSEMU_SINGLESTEP.> If "
3047 "the tracee is in signal-delivery-stop, I<sig> is the signal to be injected "
3048 "(if it is nonzero).  Otherwise, I<sig> may be ignored.  (When restarting a "
3049 "tracee from a ptrace-stop other than signal-delivery-stop, recommended "
3050 "practice is to always pass 0 in I<sig .)>"
3051 msgstr ""
3052
3053 #. type: SS
3054 #: build/C/man2/ptrace.2:1261
3055 #, no-wrap
3056 msgid "Attaching and detaching"
3057 msgstr ""
3058
3059 #. type: Plain text
3060 #: build/C/man2/ptrace.2:1263
3061 msgid "A thread can be attached to the tracer using the call"
3062 msgstr ""
3063
3064 #. type: Plain text
3065 #: build/C/man2/ptrace.2:1265
3066 #, no-wrap
3067 msgid "    ptrace(PTRACE_ATTACH, pid, 0, 0);\n"
3068 msgstr ""
3069
3070 #
3071 #.  FIXME: Describe how to attach to a thread which is already
3072 #.         group-stopped.
3073 #. type: Plain text
3074 #: build/C/man2/ptrace.2:1289
3075 msgid ""
3076 "This also sends B<SIGSTOP> to this thread.  If the tracer wants this "
3077 "B<SIGSTOP> to have no effect, it needs to suppress it.  Note that if other "
3078 "signals are concurrently sent to this thread during attach, the tracer may "
3079 "see the tracee enter signal-delivery-stop with other signal(s) first! The "
3080 "usual practice is to reinject these signals until B<SIGSTOP> is seen, then "
3081 "suppress B<SIGSTOP> injection.  The design bug here is that a ptrace attach "
3082 "and a concurrently delivered B<SIGSTOP> may race and the concurrent "
3083 "B<SIGSTOP> may be lost."
3084 msgstr ""
3085
3086 #. type: Plain text
3087 #: build/C/man2/ptrace.2:1296
3088 msgid ""
3089 "Since attaching sends B<SIGSTOP> and the tracer usually suppresses it, this "
3090 "may cause a stray I<EINTR> return from the currently executing system call "
3091 "in the tracee, as described in the \"signal injection and suppression\" "
3092 "section."
3093 msgstr ""
3094
3095 #. type: Plain text
3096 #: build/C/man2/ptrace.2:1298
3097 msgid "The request"
3098 msgstr ""
3099
3100 #. type: Plain text
3101 #: build/C/man2/ptrace.2:1300
3102 #, no-wrap
3103 msgid "    ptrace(PTRACE_TRACEME, 0, 0, 0);\n"
3104 msgstr ""
3105
3106 #. type: Plain text
3107 #: build/C/man2/ptrace.2:1306
3108 msgid ""
3109 "turns the calling thread into a tracee.  The thread continues to run "
3110 "(doesn't enter ptrace-stop).  A common practice is to follow the "
3111 "B<PTRACE_TRACEME> with"
3112 msgstr ""
3113
3114 #. type: Plain text
3115 #: build/C/man2/ptrace.2:1308
3116 #, no-wrap
3117 msgid "    raise(SIGSTOP);\n"
3118 msgstr ""
3119
3120 #. type: Plain text
3121 #: build/C/man2/ptrace.2:1311
3122 msgid ""
3123 "and allow the parent (which is our tracer now) to observe our "
3124 "signal-delivery-stop."
3125 msgstr ""
3126
3127 #. type: Plain text
3128 #: build/C/man2/ptrace.2:1335
3129 msgid ""
3130 "If the B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or "
3131 "B<PTRACE_O_TRACECLONE> options are in effect, then children created by, "
3132 "respectively, B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> flag, "
3133 "B<fork>(2)  or B<clone>(2)  with the exit signal set to B<SIGCHLD>, and "
3134 "other kinds of B<clone>(2), are automatically attached to the same tracer "
3135 "which traced their parent.  B<SIGSTOP> is delivered to the children, causing "
3136 "them to enter signal-delivery-stop after they exit the system call which "
3137 "created them."
3138 msgstr ""
3139
3140 #. type: Plain text
3141 #: build/C/man2/ptrace.2:1337
3142 msgid "Detaching of the tracee is performed by:"
3143 msgstr ""
3144
3145 #. type: Plain text
3146 #: build/C/man2/ptrace.2:1339
3147 #, no-wrap
3148 msgid "    ptrace(PTRACE_DETACH, pid, 0, sig);\n"
3149 msgstr ""
3150
3151 #. type: Plain text
3152 #: build/C/man2/ptrace.2:1347
3153 msgid ""
3154 "B<PTRACE_DETACH> is a restarting operation; therefore it requires the tracee "
3155 "to be in ptrace-stop.  If the tracee is in signal-delivery-stop, a signal "
3156 "can be injected.  Otherwise, the I<sig> parameter may be silently ignored."
3157 msgstr ""
3158
3159 #.  FIXME: Describe how to detach from a group-stopped tracee so that it
3160 #.         doesn't run, but continues to wait for SIGCONT.
3161 #. type: Plain text
3162 #: build/C/man2/ptrace.2:1371
3163 msgid ""
3164 "If the tracee is running when the tracer wants to detach it, the usual "
3165 "solution is to send B<SIGSTOP> (using B<tgkill>(2), to make sure it goes to "
3166 "the correct thread), wait for the tracee to stop in signal-delivery-stop for "
3167 "B<SIGSTOP> and then detach it (suppressing B<SIGSTOP> injection).  A design "
3168 "bug is that this can race with concurrent B<SIGSTOP>s.  Another complication "
3169 "is that the tracee may enter other ptrace-stops and needs to be restarted "
3170 "and waited for again, until B<SIGSTOP> is seen.  Yet another complication is "
3171 "to be sure that the tracee is not already ptrace-stopped, because no signal "
3172 "delivery happens while it is\\(emnot even B<SIGSTOP>."
3173 msgstr ""
3174
3175 #. type: Plain text
3176 #: build/C/man2/ptrace.2:1379
3177 msgid ""
3178 "If the tracer dies, all tracees are automatically detached and restarted, "
3179 "unless they were in group-stop.  Handling of restart from group-stop is "
3180 "currently buggy, but the \"as planned\" behavior is to leave tracee stopped "
3181 "and waiting for B<SIGCONT>.  If the tracee is restarted from "
3182 "signal-delivery-stop, the pending signal is injected."
3183 msgstr ""
3184
3185 #. type: SS
3186 #: build/C/man2/ptrace.2:1379
3187 #, no-wrap
3188 msgid "execve(2) under ptrace"
3189 msgstr ""
3190
3191 #.  clone(2) THREAD_CLONE says:
3192 #.      If  any  of the threads in a thread group performs an execve(2),
3193 #.      then all threads other than the thread group leader are terminated,
3194 #.      and the new program is executed in the thread group leader.
3195 #
3196 #.  In kernel 3.1 sources, see fs/exec.c::de_thread()
3197 #. type: Plain text
3198 #: build/C/man2/ptrace.2:1398
3199 msgid ""
3200 "When one thread in a multithreaded process calls B<execve>(2), the kernel "
3201 "destroys all other threads in the process, and resets the thread ID of the "
3202 "execing thread to the thread group ID (process ID).  (Or, to put things "
3203 "another way, when a multithreaded process does an B<execve>(2), at "
3204 "completion of the call, it appears as though the B<execve>(2)  occurred in "
3205 "the thread group leader, regardless of which thread did the B<execve>(2).)  "
3206 "This resetting of the thread ID looks very confusing to tracers:"
3207 msgstr ""
3208
3209 #. type: IP
3210 #: build/C/man2/ptrace.2:1398 build/C/man2/ptrace.2:1408 build/C/man2/ptrace.2:1414 build/C/man2/ptrace.2:1422 build/C/man2/ptrace.2:1558
3211 #, no-wrap
3212 msgid "*"
3213 msgstr ""
3214
3215 #. type: Plain text
3216 #: build/C/man2/ptrace.2:1408
3217 msgid ""
3218 "All other threads stop in B<PTRACE_EVENT_EXIT> stop, if the "
3219 "B<PTRACE_O_TRACEEXIT> option was turned on.  Then all other threads except "
3220 "the thread group leader report death as if they exited via B<_exit>(2)  with "
3221 "exit code 0."
3222 msgstr ""
3223
3224 #. type: Plain text
3225 #: build/C/man2/ptrace.2:1414
3226 msgid ""
3227 "Then a B<PTRACE_EVENT_EXEC> stop happens, if the B<PTRACE_O_TRACEEXEC> "
3228 "option was turned on."
3229 msgstr ""
3230
3231 #. type: Plain text
3232 #: build/C/man2/ptrace.2:1422
3233 msgid ""
3234 "The execing tracee changes its thread ID while it is in the B<execve>(2).  "
3235 "(Remember, under ptrace, the \"pid\" returned from B<waitpid>(2), or fed "
3236 "into ptrace calls, is the tracee's thread ID.)  That is, the tracee's thread "
3237 "ID is reset to be the same as its process ID, which is the same as the "
3238 "thread group leader's thread ID."
3239 msgstr ""
3240
3241 #. type: Plain text
3242 #: build/C/man2/ptrace.2:1436
3243 msgid ""
3244 "If the thread group leader has reported its death by this time, it appears "
3245 "to the tracer that the dead thread leader \"reappears from nowhere\".  If "
3246 "the thread group leader was still alive, for the tracer this may look as if "
3247 "thread group leader returns from a different system call than it entered, or "
3248 "even \"returned from a system call even though it was not in any system "
3249 "call\".  If the thread group leader was not traced (or was traced by a "
3250 "different tracer), then during B<execve>(2)  it will appear as if it has "
3251 "become a tracee of the tracer of the execing tracee."
3252 msgstr ""
3253
3254 #. type: Plain text
3255 #: build/C/man2/ptrace.2:1439
3256 msgid ""
3257 "All of the above effects are the artifacts of the thread ID change in the "
3258 "tracee."
3259 msgstr ""
3260
3261 #. type: Plain text
3262 #: build/C/man2/ptrace.2:1463
3263 msgid ""
3264 "The B<PTRACE_O_TRACEEXEC> option is the recommended tool for dealing with "
3265 "this situation.  It enables B<PTRACE_EVENT_EXEC> stop, which occurs before "
3266 "B<execve>(2)  returns.  First, it enables B<PTRACE_EVENT_EXEC>-stop, which "
3267 "occurs before B<execve(2)> returns.  In this stop, the tracer can use "
3268 "B<PTRACE_GETEVENTMSG> to retrieve the tracee's former thread ID.  (This "
3269 "feature was introduced in Linux 3.0).  Second, the B<PTRACE_O_TRACEEXEC> "
3270 "option disables legacy B<SIGTRAP> generation on B<execve>(2)."
3271 msgstr ""
3272
3273 #. type: Plain text
3274 #: build/C/man2/ptrace.2:1469
3275 msgid ""
3276 "When the tracer receives B<PTRACE_EVENT_EXEC> stop notification, it is "
3277 "guaranteed that except this tracee and the thread group leader, no other "
3278 "threads from the process are alive."
3279 msgstr ""
3280
3281 #. type: Plain text
3282 #: build/C/man2/ptrace.2:1477
3283 msgid ""
3284 "On receiving the B<PTRACE_EVENT_EXEC> stop notification, the tracer should "
3285 "clean up all its internal data structures describing the threads of this "
3286 "process, and retain only one data structure\\(emone which describes the "
3287 "single still running tracee, with"
3288 msgstr ""
3289
3290 #. type: Plain text
3291 #: build/C/man2/ptrace.2:1479
3292 #, no-wrap
3293 msgid "    thread ID == thread group ID == process id.\n"
3294 msgstr ""
3295
3296 #. type: Plain text
3297 #: build/C/man2/ptrace.2:1485
3298 msgid ""
3299 "Currently, there is no way to retrieve the former thread ID of the execing "
3300 "tracee.  If the tracer doesn't keep track of its tracees' thread group "
3301 "relations, it may be unable to know which tracee execed and therefore no "
3302 "longer exists under the old thread ID due to a thread ID change."
3303 msgstr ""
3304
3305 #. type: Plain text
3306 #: build/C/man2/ptrace.2:1489
3307 msgid "Example: two threads call B<execve>(2)  at the same time:"
3308 msgstr ""
3309
3310 #. type: Plain text
3311 #: build/C/man2/ptrace.2:1500
3312 #, no-wrap
3313 msgid ""
3314 "*** we get syscall-entry-stop in thread 1: **\n"
3315 "PID1 execve(\"/bin/foo\", \"foo\" E<lt>unfinished ...E<gt>\n"
3316 "*** we issue PTRACE_SYSCALL for thread 1 **\n"
3317 "*** we get syscall-entry-stop in thread 2: **\n"
3318 "PID2 execve(\"/bin/bar\", \"bar\" E<lt>unfinished ...E<gt>\n"
3319 "*** we issue PTRACE_SYSCALL for thread 2 **\n"
3320 "*** we get PTRACE_EVENT_EXEC for PID0, we issue PTRACE_SYSCALL **\n"
3321 "*** we get syscall-exit-stop for PID0: **\n"
3322 "PID0 E<lt>... execve resumedE<gt> )             = 0\n"
3323 msgstr ""
3324
3325 #. type: Plain text
3326 #: build/C/man2/ptrace.2:1505
3327 msgid "In this situation, there is no way to know which B<execve>(2)  succeeded."
3328 msgstr ""
3329
3330 #. type: Plain text
3331 #: build/C/man2/ptrace.2:1527
3332 msgid ""
3333 "If the B<PTRACE_O_TRACEEXEC> option is I<not> in effect for the execing "
3334 "tracee, the kernel delivers an extra B<SIGTRAP> to the tracee after "
3335 "B<execve>(2)  returns.  This is an ordinary signal (similar to one which can "
3336 "be generated by I<kill -TRAP>), not a special kind of ptrace-stop.  "
3337 "Employing B<PTRACE_GETSIGINFO> for this signal returns I<si_code> set to 0 "
3338 "(I<SI_USER>).  This signal may be blocked by signal mask, and thus may be "
3339 "delivered (much) later."
3340 msgstr ""
3341
3342 #. type: Plain text
3343 #: build/C/man2/ptrace.2:1546
3344 msgid ""
3345 "Usually, the tracer (for example, B<strace>(1))  would not want to show this "
3346 "extra post-execve B<SIGTRAP> signal to the user, and would suppress its "
3347 "delivery to the tracee (if B<SIGTRAP> is set to B<SIG_DFL>, it is a killing "
3348 "signal).  However, determining I<which> B<SIGTRAP> to suppress is not easy.  "
3349 "Setting the B<PTRACE_O_TRACEEXEC> option and thus suppressing this extra "
3350 "B<SIGTRAP> is the recommended approach."
3351 msgstr ""
3352
3353 #. type: SS
3354 #: build/C/man2/ptrace.2:1546
3355 #, no-wrap
3356 msgid "Real parent"
3357 msgstr ""
3358
3359 #. type: Plain text
3360 #: build/C/man2/ptrace.2:1553
3361 msgid ""
3362 "The ptrace API (ab)uses the standard UNIX parent/child signaling over "
3363 "B<waitpid>(2).  This used to cause the real parent of the process to stop "
3364 "receiving several kinds of B<waitpid>(2)  notifications when the child "
3365 "process is traced by some other process."
3366 msgstr ""
3367
3368 #. type: Plain text
3369 #: build/C/man2/ptrace.2:1556
3370 msgid ""
3371 "Many of these bugs have been fixed, but as of Linux 2.6.38 several still "
3372 "exist; see BUGS below."
3373 msgstr ""
3374
3375 #. type: Plain text
3376 #: build/C/man2/ptrace.2:1558
3377 msgid "As of Linux 2.6.38, the following is believed to work correctly:"
3378 msgstr ""
3379
3380 #. type: Plain text
3381 #: build/C/man2/ptrace.2:1566
3382 msgid ""
3383 "exit/death by signal is reported first to the tracer, then, when the tracer "
3384 "consumes the B<waitpid>(2)  result, to the real parent (to the real parent "
3385 "only when the whole multithreaded process exits).  If the tracer and the "
3386 "real parent are the same process, the report is sent only once."
3387 msgstr ""
3388
3389 #. type: Plain text
3390 #: build/C/man2/ptrace.2:1580
3391 msgid ""
3392 "On success, B<PTRACE_PEEK*> requests return the requested data, while other "
3393 "requests return zero.  On error, all requests return -1, and I<errno> is set "
3394 "appropriately.  Since the value returned by a successful B<PTRACE_PEEK*> "
3395 "request may be -1, the caller must clear I<errno> before the call, and then "
3396 "check it afterward to determine whether or not an error occurred."
3397 msgstr ""
3398
3399 #. type: Plain text
3400 #: build/C/man2/ptrace.2:1584
3401 msgid "(i386 only) There was an error with allocating or freeing a debug register."
3402 msgstr ""
3403
3404 #. type: Plain text
3405 #: build/C/man2/ptrace.2:1595
3406 msgid ""
3407 "There was an attempt to read from or write to an invalid area in the "
3408 "tracer's or the tracee's memory, probably because the area wasn't mapped or "
3409 "accessible.  Unfortunately, under Linux, different variations of this fault "
3410 "will return B<EIO> or B<EFAULT> more or less arbitrarily."
3411 msgstr ""
3412
3413 #. type: Plain text
3414 #: build/C/man2/ptrace.2:1598
3415 msgid "An attempt was made to set an invalid option."
3416 msgstr ""
3417
3418 #. type: Plain text
3419 #: build/C/man2/ptrace.2:1605
3420 msgid ""
3421 "I<request> is invalid, or an attempt was made to read from or write to an "
3422 "invalid area in the tracer's or the tracee's memory, or there was a "
3423 "word-alignment violation, or an invalid signal was specified during a "
3424 "restart request."
3425 msgstr ""
3426
3427 #. type: Plain text
3428 #: build/C/man2/ptrace.2:1618
3429 msgid ""
3430 "The specified process cannot be traced.  This could be because the tracer "
3431 "has insufficient privileges (the required capability is B<CAP_SYS_PTRACE>); "
3432 "unprivileged processes cannot trace processes that they cannot send signals "
3433 "to or those running set-user-ID/set-group-ID programs, for obvious reasons.  "
3434 "Alternatively, the process may already be being traced, or (on kernels "
3435 "before 2.6.26) be B<init>(8)  (PID 1)."
3436 msgstr ""
3437
3438 #. type: TP
3439 #: build/C/man2/ptrace.2:1618 build/C/man2/quotactl.2:459 build/C/man2/quotactl.2:502
3440 #, no-wrap
3441 msgid "B<ESRCH>"
3442 msgstr ""
3443
3444 #. type: Plain text
3445 #: build/C/man2/ptrace.2:1623
3446 msgid ""
3447 "The specified process does not exist, or is not currently being traced by "
3448 "the caller, or is not stopped (for requests that require a stopped tracee)."
3449 msgstr ""
3450
3451 #. type: Plain text
3452 #: build/C/man2/ptrace.2:1625
3453 msgid "SVr4, 4.3BSD."
3454 msgstr ""
3455
3456 #. type: Plain text
3457 #: build/C/man2/ptrace.2:1638
3458 msgid ""
3459 "Although arguments to B<ptrace>()  are interpreted according to the "
3460 "prototype given, glibc currently declares B<ptrace>()  as a variadic "
3461 "function with only the I<request> argument fixed.  This means that unneeded "
3462 "trailing arguments may be omitted, though doing so makes use of undocumented "
3463 "B<gcc>(1)  behavior."
3464 msgstr ""
3465
3466 #.  See commit 00cd5c37afd5f431ac186dd131705048c0a11fdb
3467 #. type: Plain text
3468 #: build/C/man2/ptrace.2:1643
3469 msgid ""
3470 "In Linux kernels before 2.6.26, B<init>(8), the process with PID 1, may not "
3471 "be traced."
3472 msgstr ""
3473
3474 #.  See http://lkml.org/lkml/2008/5/8/375
3475 #. type: Plain text
3476 #: build/C/man2/ptrace.2:1650
3477 msgid ""
3478 "The layout of the contents of memory and the USER area are quite "
3479 "operating-system- and architecture-specific.  The offset supplied, and the "
3480 "data returned, might not entirely match with the definition of I<struct "
3481 "user>."
3482 msgstr ""
3483
3484 #. type: Plain text
3485 #: build/C/man2/ptrace.2:1653
3486 msgid ""
3487 "The size of a \"word\" is determined by the operating-system variant (e.g., "
3488 "for 32-bit Linux it is 32 bits, etc.)."
3489 msgstr ""
3490
3491 #. type: Plain text
3492 #: build/C/man2/ptrace.2:1661
3493 msgid ""
3494 "This page documents the way the B<ptrace>()  call works currently in Linux.  "
3495 "Its behavior differs noticeably on other flavors of UNIX.  In any case, use "
3496 "of B<ptrace>()  is highly specific to the operating system and architecture."
3497 msgstr ""
3498
3499 #. type: Plain text
3500 #: build/C/man2/ptrace.2:1672
3501 msgid ""
3502 "On hosts with 2.6 kernel headers, B<PTRACE_SETOPTIONS> is declared with a "
3503 "different value than the one for 2.4.  This leads to applications compiled "
3504 "with 2.6 kernel headers failing when run on 2.4 kernels.  This can be worked "
3505 "around by redefining B<PTRACE_SETOPTIONS> to B<PTRACE_OLDSETOPTIONS>, if "
3506 "that is defined."
3507 msgstr ""
3508
3509 #. type: Plain text
3510 #: build/C/man2/ptrace.2:1675
3511 msgid ""
3512 "Group-stop notifications are sent to the tracer, but not to real parent.  "
3513 "Last confirmed on 2.6.38.6."
3514 msgstr ""
3515
3516 #.  Note from Denys Vlasenko:
3517 #.      Here "exits" means any kind of death - _exit, exit_group,
3518 #.      signal death. Signal death and exit_group cases are trivial,
3519 #.      though: since signal death and exit_group kill all other threads
3520 #.      too, "until all other threads exit" thing happens rather soon
3521 #.      in these cases. Therefore, only _exit presents observably
3522 #.      puzzling behavior to ptrace users: thread leader _exit's,
3523 #.      but WIFEXITED isn't reported! We are trying to explain here
3524 #.      why it is so.
3525 #.   FIXME: ^^^ need to test/verify this scenario
3526 #. type: Plain text
3527 #: build/C/man2/ptrace.2:1706
3528 msgid ""
3529 "If a thread group leader is traced and exits by calling B<_exit>(2), a "
3530 "B<PTRACE_EVENT_EXIT> stop will happen for it (if requested), but the "
3531 "subsequent B<WIFEXITED> notification will not be delivered until all other "
3532 "threads exit.  As explained above, if one of other threads calls "
3533 "B<execve>(2), the death of the thread group leader will I<never> be "
3534 "reported.  If the execed thread is not traced by this tracer, the tracer "
3535 "will never know that B<execve>(2)  happened.  One possible workaround is to "
3536 "B<PTRACE_DETACH> the thread group leader instead of restarting it in this "
3537 "case.  Last confirmed on 2.6.38.6."
3538 msgstr ""
3539
3540 #. type: Plain text
3541 #: build/C/man2/ptrace.2:1716
3542 msgid ""
3543 "A B<SIGKILL> signal may still cause a B<PTRACE_EVENT_EXIT> stop before "
3544 "actual signal death.  This may be changed in the future; B<SIGKILL> is meant "
3545 "to always immediately kill tasks even under ptrace.  Last confirmed on "
3546 "2.6.38.6."
3547 msgstr ""
3548
3549 #. type: Plain text
3550 #: build/C/man2/ptrace.2:1730
3551 msgid ""
3552 "B<gdb>(1), B<strace>(1), B<clone>(2), B<execve>(2), B<fork>(2), "
3553 "B<gettid>(2), B<sigaction>(2), B<tgkill>(2), B<vfork>(2), B<waitpid>(2), "
3554 "B<exec>(3), B<capabilities>(7), B<signal>(7)"
3555 msgstr ""
3556
3557 #. type: TH
3558 #: build/C/man2/quotactl.2:25
3559 #, no-wrap
3560 msgid "QUOTACTL"
3561 msgstr ""
3562
3563 #. type: TH
3564 #: build/C/man2/quotactl.2:25
3565 #, no-wrap
3566 msgid "2010-06-16"
3567 msgstr ""
3568
3569 #. type: Plain text
3570 #: build/C/man2/quotactl.2:28
3571 msgid "quotactl - manipulate disk quotas"
3572 msgstr ""
3573
3574 #. type: Plain text
3575 #: build/C/man2/quotactl.2:32
3576 #, no-wrap
3577 msgid ""
3578 "B<#include E<lt>sys/quota.hE<gt>>\n"
3579 "B<#include E<lt>xfs/xqm.hE<gt>>\n"
3580 msgstr ""
3581
3582 #. type: Plain text
3583 #: build/C/man2/quotactl.2:35
3584 #, no-wrap
3585 msgid ""
3586 "B<int quotactl(int >I<cmd>B<, const char *>I<special>B<, int >I<id>B<, "
3587 "caddr_t >I<addr>B<);>\n"
3588 msgstr ""
3589
3590 #. type: Plain text
3591 #: build/C/man2/quotactl.2:47
3592 msgid ""
3593 "The quota system can be used to set per-user and per-group limits on the "
3594 "amount of disk space used on a file system.  For each user and/or group, a "
3595 "soft limit and a hard limit can be set for each file system.  The hard limit "
3596 "can't be exceeded.  The soft limit can be exceeded, but warnings will "
3597 "ensue.  Moreover, the user can't exceed the soft limit for more than one "
3598 "week (by default) at a time; after this time, the soft limit counts as a "
3599 "hard limit."
3600 msgstr ""
3601
3602 #. type: Plain text
3603 #: build/C/man2/quotactl.2:72
3604 msgid ""
3605 "The B<quotactl>()  call manipulates disk quotas.  The I<cmd> argument "
3606 "indicates a command to be applied to the user or group ID specified in "
3607 "I<id>.  To initialize the I<cmd> argument, use the I<QCMD(subcmd, type)> "
3608 "macro.  The I<type> value is either B<USRQUOTA>, for user quotas, or "
3609 "B<GRPQUOTA>, for group quotas.  The I<subcmd> value is described below."
3610 msgstr ""
3611
3612 #. type: Plain text
3613 #: build/C/man2/quotactl.2:77
3614 msgid ""
3615 "The I<special> argument is a pointer to a null-terminated string containing "
3616 "the pathname of the (mounted) block special device for the file system being "
3617 "manipulated."
3618 msgstr ""
3619
3620 #. type: Plain text
3621 #: build/C/man2/quotactl.2:85
3622 msgid ""
3623 "The I<addr> argument is the address of an optional, command-specific, data "
3624 "structure that is copied in or out of the system.  The interpretation of "
3625 "I<addr> is given with each command below."
3626 msgstr ""
3627
3628 #. type: Plain text
3629 #: build/C/man2/quotactl.2:89
3630 msgid "The I<subcmd> value is one of the following:"
3631 msgstr ""
3632
3633 #. type: TP
3634 #: build/C/man2/quotactl.2:89
3635 #, no-wrap
3636 msgid "B<Q_QUOTAON>"
3637 msgstr ""
3638
3639 #. type: Plain text
3640 #: build/C/man2/quotactl.2:96
3641 msgid ""
3642 "Turn on quotas for a file system.  The I<id> argument is the identification "
3643 "number of the quota format to be used.  Currently, there are three supported "
3644 "quota formats:"
3645 msgstr ""
3646
3647 #. type: TP
3648 #: build/C/man2/quotactl.2:97
3649 #, no-wrap
3650 msgid "B<QFMT_VFS_OLD>"
3651 msgstr ""
3652
3653 #. type: Plain text
3654 #: build/C/man2/quotactl.2:100
3655 msgid "The original quota format."
3656 msgstr ""
3657
3658 #. type: TP
3659 #: build/C/man2/quotactl.2:100
3660 #, no-wrap
3661 msgid "B<QFMT_VFS_V0>"
3662 msgstr ""
3663
3664 #. type: Plain text
3665 #: build/C/man2/quotactl.2:104
3666 msgid ""
3667 "The standard VFS v0 quota format, which can handle 32-bit UIDs and GIDs and "
3668 "quota limits up to 2^42 bytes and 2^32 inodes."
3669 msgstr ""
3670
3671 #. type: TP
3672 #: build/C/man2/quotactl.2:104
3673 #, no-wrap
3674 msgid "B<QFMT_VFS_V1>"
3675 msgstr ""
3676
3677 #. type: Plain text
3678 #: build/C/man2/quotactl.2:108
3679 msgid ""
3680 "A quota format that can handle 32-bit UIDs and GIDs and quota limits of 2^64 "
3681 "bytes and 2^64 inodes."
3682 msgstr ""
3683
3684 #. type: Plain text
3685 #: build/C/man2/quotactl.2:119
3686 msgid ""
3687 "The I<addr> argument points to the pathname of a file containing the quotas "
3688 "for the file system.  The quota file must exist; it is normally created with "
3689 "the B<quotacheck>(8)  program.  This operation requires privilege "
3690 "(B<CAP_SYS_ADMIN>)."
3691 msgstr ""
3692
3693 #. type: TP
3694 #: build/C/man2/quotactl.2:119
3695 #, no-wrap
3696 msgid "B<Q_QUOTAOFF>"
3697 msgstr ""
3698
3699 #. type: Plain text
3700 #: build/C/man2/quotactl.2:129
3701 msgid ""
3702 "Turn off quotas for a file system.  The I<addr> and I<id> arguments are "
3703 "ignored.  This operation requires privilege (B<CAP_SYS_ADMIN>)."
3704 msgstr ""
3705
3706 #. type: TP
3707 #: build/C/man2/quotactl.2:129
3708 #, no-wrap
3709 msgid "B<Q_GETQUOTA>"
3710 msgstr ""
3711
3712 #. type: Plain text
3713 #: build/C/man2/quotactl.2:140
3714 msgid ""
3715 "Get disk quota limits and current usage for user or group I<id>.  The "
3716 "I<addr> argument is a pointer to a I<dqblk> structure defined in "
3717 "I<E<lt>sys/quota.hE<gt>> as follows:"
3718 msgstr ""
3719
3720 #. type: Plain text
3721 #: build/C/man2/quotactl.2:145 build/C/man2/quotactl.2:232
3722 #, no-wrap
3723 msgid ""
3724 "/* uint64_t is an unsigned 64-bit integer;\n"
3725 "   uint32_t is an unsigned 32-bit integer */\n"
3726 msgstr ""
3727
3728 #. type: Plain text
3729 #: build/C/man2/quotactl.2:165
3730 #, no-wrap
3731 msgid ""
3732 "struct dqblk {          /* Definition since Linux 2.4.22 */\n"
3733 "    uint64_t dqb_bhardlimit;   /* absolute limit on disk\n"
3734 "                                  quota blocks alloc */\n"
3735 "    uint64_t dqb_bsoftlimit;   /* preferred limit on\n"
3736 "                                  disk quota blocks */\n"
3737 "    uint64_t dqb_curspace;     /* current quota block\n"
3738 "                                  count */\n"
3739 "    uint64_t dqb_ihardlimit;   /* maximum number of\n"
3740 "                                  allocated inodes */\n"
3741 "    uint64_t dqb_isoftlimit;   /* preferred inode limit */\n"
3742 "    uint64_t dqb_curinodes;    /* current number of\n"
3743 "                                  allocated inodes */\n"
3744 "    uint64_t dqb_btime;        /* time limit for excessive\n"
3745 "                                  disk use */\n"
3746 "    uint64_t dqb_itime;        /* time limit for excessive\n"
3747 "                                  files */\n"
3748 "    uint32_t dqb_valid;        /* bit mask of QIF_*\n"
3749 "                                  constants */\n"
3750 "};\n"
3751 msgstr ""
3752
3753 #. type: Plain text
3754 #: build/C/man2/quotactl.2:168
3755 #, no-wrap
3756 msgid ""
3757 "/* Flags in dqb_valid that indicate which fields in\n"
3758 "   dqblk structure are valid. */\n"
3759 msgstr ""
3760
3761 #. type: Plain text
3762 #: build/C/man2/quotactl.2:179
3763 #, no-wrap
3764 msgid ""
3765 "#define QIF_BLIMITS   1\n"
3766 "#define QIF_SPACE     2\n"
3767 "#define QIF_ILIMITS   4\n"
3768 "#define QIF_INODES    8\n"
3769 "#define QIF_BTIME     16\n"
3770 "#define QIF_ITIME     32\n"
3771 "#define QIF_LIMITS    (QIF_BLIMITS | QIF_ILIMITS)\n"
3772 "#define QIF_USAGE     (QIF_SPACE | QIF_INODES)\n"
3773 "#define QIF_TIMES     (QIF_BTIME | QIF_ITIME)\n"
3774 "#define QIF_ALL       (QIF_LIMITS | QIF_USAGE | QIF_TIMES)\n"
3775 msgstr ""
3776
3777 #. type: Plain text
3778 #: build/C/man2/quotactl.2:196
3779 msgid ""
3780 "The I<dqb_valid> field is a bit mask that is set to indicate the entries in "
3781 "the I<dqblk> structure that are valid.  Currently, the kernel fills in all "
3782 "entries of the I<dqblk> structure and marks them as valid in the "
3783 "I<dqb_valid> field.  Unprivileged users may retrieve only their own quotas; "
3784 "a privileged user (B<CAP_SYS_ADMIN>)  can retrieve the quotas of any user."
3785 msgstr ""
3786
3787 #. type: TP
3788 #: build/C/man2/quotactl.2:196
3789 #, no-wrap
3790 msgid "B<Q_SETQUOTA>"
3791 msgstr ""
3792
3793 #. type: Plain text
3794 #: build/C/man2/quotactl.2:216
3795 msgid ""
3796 "Set quota information for user or group I<id>, using the information "
3797 "supplied in the I<dqblk> structure pointed to by I<addr>.  The I<dqb_valid> "
3798 "field of the I<dqblk> structure indicates which entries in the structure "
3799 "have been set by the caller.  This operation supersedes the B<Q_SETQLIM> and "
3800 "B<Q_SETUSE> operations in the previous quota interfaces.  This operation "
3801 "requires privilege (B<CAP_SYS_ADMIN>)."
3802 msgstr ""
3803
3804 #. type: TP
3805 #: build/C/man2/quotactl.2:216
3806 #, no-wrap
3807 msgid "B<Q_GETINFO>"
3808 msgstr ""
3809
3810 #. type: Plain text
3811 #: build/C/man2/quotactl.2:227
3812 msgid ""
3813 "Get information (like grace times) about quotafile.  The I<addr> argument "
3814 "should be a pointer to a I<dqinfo> structure.  This structure is defined in "
3815 "I<E<lt>sys/quota.hE<gt>> as follows:"
3816 msgstr ""
3817
3818 #. type: Plain text
3819 #: build/C/man2/quotactl.2:236
3820 #, no-wrap
3821 msgid ""
3822 "struct dqinfo {         /* Defined since kernel 2.4.22 */\n"
3823 "    uint64_t dqi_bgrace;    /* Time before block soft limit\n"
3824 "                               becomes hard limit */\n"
3825 msgstr ""
3826
3827 #. type: Plain text
3828 #: build/C/man2/quotactl.2:243
3829 #, no-wrap
3830 msgid ""
3831 "    uint64_t dqi_igrace;    /* Time before inode soft limit\n"
3832 "                               becomes hard limit */\n"
3833 "    uint32_t dqi_flags;     /* Flags for quotafile\n"
3834 "                               (DQF_*) */\n"
3835 "    uint32_t dqi_valid;\n"
3836 "};\n"
3837 msgstr ""
3838
3839 #. type: Plain text
3840 #: build/C/man2/quotactl.2:245
3841 #, no-wrap
3842 msgid "/* Bits for dqi_flags */\n"
3843 msgstr ""
3844
3845 #. type: Plain text
3846 #: build/C/man2/quotactl.2:247
3847 #, no-wrap
3848 msgid "/* Quota format QFMT_VFS_OLD */\n"
3849 msgstr ""
3850
3851 #. type: Plain text
3852 #: build/C/man2/quotactl.2:249
3853 #, no-wrap
3854 msgid "#define V1_DQF_RSQUASH\t1   /* Root squash enabled */\n"
3855 msgstr ""
3856
3857 #. type: Plain text
3858 #: build/C/man2/quotactl.2:251
3859 #, no-wrap
3860 msgid "/* Other quota formats have no dqi_flags bits defined */\n"
3861 msgstr ""
3862
3863 #. type: Plain text
3864 #: build/C/man2/quotactl.2:254
3865 #, no-wrap
3866 msgid ""
3867 "/* Flags in dqi_valid that indicate which fields in\n"
3868 "   dqinfo structure are valid. */\n"
3869 msgstr ""
3870
3871 #. type: Plain text
3872 #: build/C/man2/quotactl.2:259
3873 #, no-wrap
3874 msgid ""
3875 "# define IIF_BGRACE\t1\n"
3876 "# define IIF_IGRACE\t2\n"
3877 "# define IIF_FLAGS\t4\n"
3878 "# define IIF_ALL\t(IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)\n"
3879 msgstr ""
3880
3881 #. type: Plain text
3882 #: build/C/man2/quotactl.2:275
3883 msgid ""
3884 "The I<dqi_valid> field in the I<dqinfo> structure indicates the entries in "
3885 "the structure that are valid.  Currently, the kernel fills in all entries of "
3886 "the I<dqinfo> structure and marks them all as valid in the I<dqi_valid> "
3887 "field.  The I<id> argument is ignored."
3888 msgstr ""
3889
3890 #. type: TP
3891 #: build/C/man2/quotactl.2:275
3892 #, no-wrap
3893 msgid "B<Q_SETINFO>"
3894 msgstr ""
3895
3896 #. type: Plain text
3897 #: build/C/man2/quotactl.2:299
3898 msgid ""
3899 "Set information about quotafile.  The I<addr> argument should be a pointer "
3900 "to a I<dqinfo> structure.  The I<dqi_valid> field of the I<dqinfo> structure "
3901 "indicates the entries in the structure that have been set by the caller.  "
3902 "This operation supersedes the B<Q_SETGRACE> and B<Q_SETFLAGS> operations in "
3903 "the previous quota interfaces.  The I<id> argument is ignored.  This "
3904 "operation requires privilege (B<CAP_SYS_ADMIN>)."
3905 msgstr ""
3906
3907 #. type: TP
3908 #: build/C/man2/quotactl.2:299
3909 #, no-wrap
3910 msgid "B<Q_GETFMT>"
3911 msgstr ""
3912
3913 #. type: Plain text
3914 #: build/C/man2/quotactl.2:306
3915 msgid ""
3916 "Get quota format used on the specified file system.  The I<addr> argument "
3917 "should be a pointer to a 4-byte buffer where the format number will be "
3918 "stored."
3919 msgstr ""
3920
3921 #. type: TP
3922 #: build/C/man2/quotactl.2:306
3923 #, no-wrap
3924 msgid "B<Q_SYNC>"
3925 msgstr ""
3926
3927 #. type: Plain text
3928 #: build/C/man2/quotactl.2:317
3929 msgid ""
3930 "Update the on-disk copy of quota usages for a file system.  If I<special> is "
3931 "NULL, then all file systems with active quotas are sync'ed.  The I<addr> and "
3932 "I<id> arguments are ignored."
3933 msgstr ""
3934
3935 #. type: TP
3936 #: build/C/man2/quotactl.2:317
3937 #, no-wrap
3938 msgid "B<Q_GETSTATS>"
3939 msgstr ""
3940
3941 #.  Q_GETSTATS was removed in kernel 2.4.22.
3942 #. type: Plain text
3943 #: build/C/man2/quotactl.2:337
3944 msgid ""
3945 "Get statistics and other generic information about the quota subsystem.  The "
3946 "I<addr> argument should be a pointer to a I<dqstats> structure in which data "
3947 "should be stored.  This structure is defined in I<E<lt>sys/quota.hE<gt>.> "
3948 "The I<special> and I<id> arguments are ignored.  This operation is obsolete "
3949 "and not supported by recent kernels.  Files in I</proc/sys/fs/quota/> carry "
3950 "the information instead."
3951 msgstr ""
3952
3953 #. type: Plain text
3954 #: build/C/man2/quotactl.2:340
3955 msgid ""
3956 "For XFS file systems making use of the XFS Quota Manager (XQM), the above "
3957 "commands are bypassed and the following commands are used:"
3958 msgstr ""
3959
3960 #. type: TP
3961 #: build/C/man2/quotactl.2:340
3962 #, no-wrap
3963 msgid "B<Q_XQUOTAON>"
3964 msgstr ""
3965
3966 #. type: Plain text
3967 #: build/C/man2/quotactl.2:361
3968 msgid ""
3969 "Turn on quotas for an XFS file system.  XFS provides the ability to turn "
3970 "on/off quota limit enforcement with quota accounting.  Therefore, XFS "
3971 "expects I<addr> to be a pointer to an I<unsigned int> that contains either "
3972 "the flags B<XFS_QUOTA_UDQ_ACCT> and/or B<XFS_QUOTA_UDQ_ENFD> (for user "
3973 "quota), or B<XFS_QUOTA_GDQ_ACCT> and/or B<XFS_QUOTA_GDQ_ENFD> (for group "
3974 "quota), as defined in I<E<lt>xfs/xqm.hE<gt>>.  This operation requires "
3975 "privilege (B<CAP_SYS_ADMIN>)."
3976 msgstr ""
3977
3978 #. type: TP
3979 #: build/C/man2/quotactl.2:361
3980 #, no-wrap
3981 msgid "B<Q_XQUOTAOFF>"
3982 msgstr ""
3983
3984 #. type: Plain text
3985 #: build/C/man2/quotactl.2:372
3986 msgid ""
3987 "Turn off quotas for an XFS file system.  As with B<Q_QUOTAON>, XFS file "
3988 "systems expect a pointer to an I<unsigned int> that specifies whether quota "
3989 "accounting and/or limit enforcement need to be turned off.  This operation "
3990 "requires privilege (B<CAP_SYS_ADMIN>)."
3991 msgstr ""
3992
3993 #. type: TP
3994 #: build/C/man2/quotactl.2:372
3995 #, no-wrap
3996 msgid "B<Q_XGETQUOTA>"
3997 msgstr ""
3998
3999 #. type: Plain text
4000 #: build/C/man2/quotactl.2:386
4001 msgid ""
4002 "Get disk quota limits and current usage for user I<id>.  The I<addr> "
4003 "argument is a pointer to an I<fs_disk_quota> structure (defined in "
4004 "I<E<lt>xfs/xqm.hE<gt>>).  Unprivileged users may retrieve only their own "
4005 "quotas; a privileged user (B<CAP_SYS_ADMIN>)  may retrieve the quotas of any "
4006 "user."
4007 msgstr ""
4008
4009 #. type: TP
4010 #: build/C/man2/quotactl.2:386
4011 #, no-wrap
4012 msgid "B<Q_XSETQLIM>"
4013 msgstr ""
4014
4015 #. type: Plain text
4016 #: build/C/man2/quotactl.2:398
4017 msgid ""
4018 "Set disk quota limits for user I<id>.  The I<addr> argument is a pointer to "
4019 "an I<fs_disk_quota> structure (defined in I<E<lt>xfs/xqm.hE<gt>>).  This "
4020 "operation requires privilege (B<CAP_SYS_ADMIN>)."
4021 msgstr ""
4022
4023 #. type: TP
4024 #: build/C/man2/quotactl.2:398
4025 #, no-wrap
4026 msgid "B<Q_XGETQSTAT>"
4027 msgstr ""
4028
4029 #. type: Plain text
4030 #: build/C/man2/quotactl.2:406
4031 msgid ""
4032 "Returns an I<fs_quota_stat> structure containing XFS file system specific "
4033 "quota information.  This is useful for finding out how much space is used to "
4034 "store quota information, and also to get quotaon/off status of a given local "
4035 "XFS file system."
4036 msgstr ""
4037
4038 #. type: TP
4039 #: build/C/man2/quotactl.2:406
4040 #, no-wrap
4041 msgid "B<Q_XQUOTARM>"
4042 msgstr ""
4043
4044 #. type: Plain text
4045 #: build/C/man2/quotactl.2:410
4046 msgid ""
4047 "Free the disk space taken by disk quotas.  Quotas must have already been "
4048 "turned off."
4049 msgstr ""
4050
4051 #. type: Plain text
4052 #: build/C/man2/quotactl.2:417
4053 msgid ""
4054 "There is no command equivalent to B<Q_SYNC> for XFS since B<sync>(1)  writes "
4055 "quota information to disk (in addition to the other file system metadata "
4056 "that it writes out)."
4057 msgstr ""
4058
4059 #. type: SH
4060 #: build/C/man2/quotactl.2:417
4061 #, no-wrap
4062 msgid "RETURN VALUES"
4063 msgstr ""
4064
4065 #. type: Plain text
4066 #: build/C/man2/quotactl.2:425
4067 msgid ""
4068 "On success, B<quotactl>()  returns 0; on error -1 is returned, and I<errno> "
4069 "is set to indicate the error."
4070 msgstr ""
4071
4072 #. type: Plain text
4073 #: build/C/man2/quotactl.2:432
4074 msgid "I<addr> or I<special> is invalid."
4075 msgstr ""
4076
4077 #. type: Plain text
4078 #: build/C/man2/quotactl.2:438
4079 msgid "I<cmd> or I<type> is invalid."
4080 msgstr ""
4081
4082 #. type: TP
4083 #: build/C/man2/quotactl.2:438
4084 #, no-wrap
4085 msgid "B<ENOENT>"
4086 msgstr ""
4087
4088 #. type: Plain text
4089 #: build/C/man2/quotactl.2:445
4090 msgid "The file specified by I<special> or I<addr> does not exist."
4091 msgstr ""
4092
4093 #. type: Plain text
4094 #: build/C/man2/quotactl.2:450
4095 msgid "The kernel has not been compiled with the B<CONFIG_QUOTA> option."
4096 msgstr ""
4097
4098 #. type: TP
4099 #: build/C/man2/quotactl.2:450
4100 #, no-wrap
4101 msgid "B<ENOTBLK>"
4102 msgstr ""
4103
4104 #. type: Plain text
4105 #: build/C/man2/quotactl.2:454
4106 msgid "I<special> is not a block device."
4107 msgstr ""
4108
4109 #. type: Plain text
4110 #: build/C/man2/quotactl.2:459
4111 msgid ""
4112 "The caller lacked the required privilege (B<CAP_SYS_ADMIN>)  for the "
4113 "specified operation."
4114 msgstr ""
4115
4116 #. type: Plain text
4117 #: build/C/man2/quotactl.2:463
4118 msgid ""
4119 "No disk quota is found for the indicated user.  Quotas have not been turned "
4120 "on for this file system."
4121 msgstr ""
4122
4123 #. type: Plain text
4124 #: build/C/man2/quotactl.2:472
4125 msgid "If I<cmd> is B<Q_SETQUOTA>, B<quotactl>()  may also set I<errno> to:"
4126 msgstr ""
4127
4128 #. type: Plain text
4129 #: build/C/man2/quotactl.2:475
4130 msgid "Specified limits are out of range allowed by quota format."
4131 msgstr ""
4132
4133 #. type: Plain text
4134 #: build/C/man2/quotactl.2:484
4135 msgid "If I<cmd> is B<Q_QUOTAON>, B<quotactl>()  may also set I<errno> to:"
4136 msgstr ""
4137
4138 #. type: Plain text
4139 #: build/C/man2/quotactl.2:493
4140 msgid ""
4141 "The quota file pointed to by I<addr> exists, but is not a regular file; or, "
4142 "the quota file pointed to by I<addr> exists, but is not on the file system "
4143 "pointed to by I<special>."
4144 msgstr ""
4145
4146 #. type: Plain text
4147 #: build/C/man2/quotactl.2:499
4148 msgid "B<Q_QUOTAON> attempted, but another B<Q_QUOTAON> had already been performed."
4149 msgstr ""
4150
4151 #. type: Plain text
4152 #: build/C/man2/quotactl.2:502
4153 msgid "The quota file is corrupted."
4154 msgstr ""
4155
4156 #. type: Plain text
4157 #: build/C/man2/quotactl.2:505
4158 msgid "Specified quota format was not found."
4159 msgstr ""
4160
4161 #. type: Plain text
4162 #: build/C/man2/quotactl.2:510
4163 msgid "B<quota>(1), B<getrlimit>(2), B<quotacheck>(8), B<quotaon>(8)"
4164 msgstr ""
4165
4166 #. type: TH
4167 #: build/C/man2/sendfile.2:15
4168 #, no-wrap
4169 msgid "SENDFILE"
4170 msgstr ""
4171
4172 #. type: TH
4173 #: build/C/man2/sendfile.2:15
4174 #, no-wrap
4175 msgid "2011-09-14"
4176 msgstr ""
4177
4178 #. type: Plain text
4179 #: build/C/man2/sendfile.2:18
4180 msgid "sendfile - transfer data between file descriptors"
4181 msgstr ""
4182
4183 #. type: Plain text
4184 #: build/C/man2/sendfile.2:20
4185 msgid "B<#include E<lt>sys/sendfile.hE<gt>>"
4186 msgstr ""
4187
4188 #.  The below is too ugly. Comments about glibc versions belong
4189 #.  in the notes, not in the header.
4190 #
4191 #.  .B #include <features.h>
4192 #.  .br
4193 #.  .B #if (__GLIBC__==2 && __GLIBC_MINOR__>=1) || __GLIBC__>2
4194 #.  .br
4195 #.  .B #include <sys/sendfile.h>
4196 #.  .br
4197 #.  #else
4198 #.  .br
4199 #.  .B #include <sys/types.h>
4200 #.  .br
4201 #.  .B /* No system prototype before glibc 2.1. */
4202 #.  .br
4203 #.  .BI "ssize_t sendfile(int" " out_fd" ", int" " in_fd" ", off_t *" \
4204 #.                        offset ", size_t" " count" )
4205 #.  .br
4206 #.  .B #endif
4207 #. type: Plain text
4208 #: build/C/man2/sendfile.2:43
4209 msgid ""
4210 "B<ssize_t sendfile(int>I< out_fd>B<, int>I< in_fd>B<, off_t *>I<offset>B<, "
4211 "size_t>I< count>B<);>"
4212 msgstr ""
4213
4214 #. type: Plain text
4215 #: build/C/man2/sendfile.2:53
4216 msgid ""
4217 "B<sendfile>()  copies data between one file descriptor and another.  Because "
4218 "this copying is done within the kernel, B<sendfile>()  is more efficient "
4219 "than the combination of B<read>(2)  and B<write>(2), which would require "
4220 "transferring data to and from user space."
4221 msgstr ""
4222
4223 #. type: Plain text
4224 #: build/C/man2/sendfile.2:58
4225 msgid ""
4226 "I<in_fd> should be a file descriptor opened for reading and I<out_fd> should "
4227 "be a descriptor opened for writing."
4228 msgstr ""
4229
4230 #. type: Plain text
4231 #: build/C/man2/sendfile.2:79
4232 msgid ""
4233 "If I<offset> is not NULL, then it points to a variable holding the file "
4234 "offset from which B<sendfile>()  will start reading data from I<in_fd>.  "
4235 "When B<sendfile>()  returns, this variable will be set to the offset of the "
4236 "byte following the last byte that was read.  If I<offset> is not NULL, then "
4237 "B<sendfile>()  does not modify the current file offset of I<in_fd>; "
4238 "otherwise the current file offset is adjusted to reflect the number of bytes "
4239 "read from I<in_fd>."
4240 msgstr ""
4241
4242 #. type: Plain text
4243 #: build/C/man2/sendfile.2:86
4244 msgid ""
4245 "If I<offset> is NULL, then data will be read from I<in_fd> starting at the "
4246 "current file offset, and the file offset will be updated by the call."
4247 msgstr ""
4248
4249 #. type: Plain text
4250 #: build/C/man2/sendfile.2:89
4251 msgid "I<count> is the number of bytes to copy between the file descriptors."
4252 msgstr ""
4253
4254 #. type: Plain text
4255 #: build/C/man2/sendfile.2:96
4256 msgid ""
4257 "The I<in_fd> argument must correspond to a file which supports "
4258 "B<mmap>(2)-like operations (i.e., it cannot be a socket)."
4259 msgstr ""
4260
4261 #. type: Plain text
4262 #: build/C/man2/sendfile.2:104
4263 msgid ""
4264 "In Linux kernels before 2.6.33, I<out_fd> must refer to a socket.  Since "
4265 "Linux 2.6.33 it can be any file.  If it is a regular file, then "
4266 "B<sendfile>()  changes the file offset appropriately."
4267 msgstr ""
4268
4269 #. type: Plain text
4270 #: build/C/man2/sendfile.2:111
4271 msgid ""
4272 "If the transfer was successful, the number of bytes written to I<out_fd> is "
4273 "returned.  On error, -1 is returned, and I<errno> is set appropriately."
4274 msgstr ""
4275
4276 #. type: Plain text
4277 #: build/C/man2/sendfile.2:117
4278 msgid ""
4279 "Nonblocking I/O has been selected using B<O_NONBLOCK> and the write would "
4280 "block."
4281 msgstr ""
4282
4283 #. type: TP
4284 #: build/C/man2/sendfile.2:117 build/C/man2/splice.2:143 build/C/man2/vmsplice.2:123
4285 #, no-wrap
4286 msgid "B<EBADF>"
4287 msgstr ""
4288
4289 #. type: Plain text
4290 #: build/C/man2/sendfile.2:121
4291 msgid ""
4292 "The input file was not opened for reading or the output file was not opened "
4293 "for writing."
4294 msgstr ""
4295
4296 #. type: Plain text
4297 #: build/C/man2/sendfile.2:124
4298 msgid "Bad address."
4299 msgstr ""
4300
4301 #. type: Plain text
4302 #: build/C/man2/sendfile.2:130
4303 msgid ""
4304 "Descriptor is not valid or locked, or an B<mmap>(2)-like operation is not "
4305 "available for I<in_fd>."
4306 msgstr ""
4307
4308 #. type: Plain text
4309 #: build/C/man2/sendfile.2:134
4310 msgid "Unspecified error while reading from I<in_fd>."
4311 msgstr ""
4312
4313 #. type: Plain text
4314 #: build/C/man2/sendfile.2:138
4315 msgid "Insufficient memory to read from I<in_fd>."
4316 msgstr ""
4317
4318 #. type: Plain text
4319 #: build/C/man2/sendfile.2:144
4320 msgid ""
4321 "B<sendfile>()  is a new feature in Linux 2.2.  The include file "
4322 "I<E<lt>sys/sendfile.hE<gt>> is present since glibc 2.1."
4323 msgstr ""
4324
4325 #. type: Plain text
4326 #: build/C/man2/sendfile.2:146
4327 msgid "Not specified in POSIX.1-2001, or other standards."
4328 msgstr ""
4329
4330 #. type: Plain text
4331 #: build/C/man2/sendfile.2:151
4332 msgid ""
4333 "Other UNIX systems implement B<sendfile>()  with different semantics and "
4334 "prototypes.  It should not be used in portable programs."
4335 msgstr ""
4336
4337 #. type: Plain text
4338 #: build/C/man2/sendfile.2:161
4339 msgid ""
4340 "If you plan to use B<sendfile>()  for sending files to a TCP socket, but "
4341 "need to send some header data in front of the file contents, you will find "
4342 "it useful to employ the B<TCP_CORK> option, described in B<tcp>(7), to "
4343 "minimize the number of packets and to tune performance."
4344 msgstr ""
4345
4346 #. type: Plain text
4347 #: build/C/man2/sendfile.2:167
4348 msgid ""
4349 "In Linux 2.4 and earlier, I<out_fd> could also refer to a regular file, and "
4350 "B<sendfile>()  changed the current offset of that file."
4351 msgstr ""
4352
4353 #. type: Plain text
4354 #: build/C/man2/sendfile.2:179
4355 msgid ""
4356 "The original Linux B<sendfile>()  system call was not designed to handle "
4357 "large file offsets.  Consequently, Linux 2.4 added B<sendfile64>(), with a "
4358 "wider type for the I<offset> argument.  The glibc B<sendfile>()  wrapper "
4359 "function transparently deals with the kernel differences."
4360 msgstr ""
4361
4362 #. type: Plain text
4363 #: build/C/man2/sendfile.2:188
4364 msgid ""
4365 "Applications may wish to fall back to B<read>(2)/B<write>(2)  in the case "
4366 "where B<sendfile>()  fails with B<EINVAL> or B<ENOSYS>."
4367 msgstr ""
4368
4369 #. type: Plain text
4370 #: build/C/man2/sendfile.2:193
4371 msgid ""
4372 "The Linux-specific B<splice>(2)  call supports transferring data between "
4373 "arbitrary files (e.g., a pair of sockets)."
4374 msgstr ""
4375
4376 #. type: Plain text
4377 #: build/C/man2/sendfile.2:198
4378 msgid "B<mmap>(2), B<open>(2), B<socket>(2), B<splice>(2)"
4379 msgstr ""
4380
4381 #. type: TH
4382 #: build/C/man2/set_tid_address.2:23
4383 #, no-wrap
4384 msgid "SET_TID_ADDRESS"
4385 msgstr ""
4386
4387 #. type: TH
4388 #: build/C/man2/set_tid_address.2:23
4389 #, no-wrap
4390 msgid "2004-09-10"
4391 msgstr ""
4392
4393 #. type: Plain text
4394 #: build/C/man2/set_tid_address.2:26
4395 msgid "set_tid_address - set pointer to thread ID"
4396 msgstr ""
4397
4398 #. type: Plain text
4399 #: build/C/man2/set_tid_address.2:29
4400 #, no-wrap
4401 msgid "B<#include E<lt>linux/unistd.hE<gt>>\n"
4402 msgstr ""
4403
4404 #. type: Plain text
4405 #: build/C/man2/set_tid_address.2:31
4406 #, no-wrap
4407 msgid "B<long set_tid_address(int *>I<tidptr>B<);>\n"
4408 msgstr ""
4409
4410 #. type: Plain text
4411 #: build/C/man2/set_tid_address.2:38
4412 msgid ""
4413 "The kernel keeps for each process two values called I<set_child_tid> and "
4414 "I<clear_child_tid> that are NULL by default."
4415 msgstr ""
4416
4417 #. type: SS
4418 #: build/C/man2/set_tid_address.2:38
4419 #, no-wrap
4420 msgid "set_child_tid"
4421 msgstr ""
4422
4423 #. type: Plain text
4424 #: build/C/man2/set_tid_address.2:48
4425 msgid ""
4426 "If a process is started using B<clone>(2)  with the B<CLONE_CHILD_SETTID> "
4427 "flag, I<set_child_tid> is set to I<child_tidptr>, the fifth argument of that "
4428 "system call."
4429 msgstr ""
4430
4431 #. type: Plain text
4432 #: build/C/man2/set_tid_address.2:53
4433 msgid ""
4434 "When I<set_child_tid> is set, the very first thing the new process does is "
4435 "writing its PID at this address."
4436 msgstr ""
4437
4438 #. type: SS
4439 #: build/C/man2/set_tid_address.2:53
4440 #, no-wrap
4441 msgid "clear_child_tid"
4442 msgstr ""
4443
4444 #. type: Plain text
4445 #: build/C/man2/set_tid_address.2:63
4446 msgid ""
4447 "If a process is started using B<clone>(2)  with the B<CLONE_CHILD_CLEARTID> "
4448 "flag, I<clear_child_tid> is set to I<child_tidptr>, the fifth argument of "
4449 "that system call."
4450 msgstr ""
4451
4452 #. type: Plain text
4453 #: build/C/man2/set_tid_address.2:70
4454 msgid ""
4455 "The system call B<set_tid_address>()  sets the I<clear_child_tid> value for "
4456 "the calling process to I<tidptr>."
4457 msgstr ""
4458
4459 #. type: Plain text
4460 #: build/C/man2/set_tid_address.2:80
4461 msgid ""
4462 "When I<clear_child_tid> is set, and the process exits, and the process was "
4463 "sharing memory with other processes or threads, then 0 is written at this "
4464 "address, and a I<futex(child_tidptr, FUTEX_WAKE, 1, NULL, NULL, 0);> call is "
4465 "done.  (That is, wake a single process waiting on this futex.)  Errors are "
4466 "ignored."
4467 msgstr ""
4468
4469 #. type: Plain text
4470 #: build/C/man2/set_tid_address.2:83
4471 msgid "B<set_tid_address>()  always returns the PID of the calling process."
4472 msgstr ""
4473
4474 #. type: Plain text
4475 #: build/C/man2/set_tid_address.2:86
4476 msgid "B<set_tid_address>()  always succeeds."
4477 msgstr ""
4478
4479 #. type: Plain text
4480 #: build/C/man2/set_tid_address.2:89
4481 msgid ""
4482 "This call is present since Linux 2.5.48.  Details as given here are valid "
4483 "since Linux 2.5.49."
4484 msgstr ""
4485
4486 #. type: Plain text
4487 #: build/C/man2/set_tid_address.2:94
4488 msgid "B<clone>(2), B<futex>(2)"
4489 msgstr ""
4490
4491 #. type: TH
4492 #: build/C/man2/splice.2:26
4493 #, no-wrap
4494 msgid "SPLICE"
4495 msgstr ""
4496
4497 #. type: TH
4498 #: build/C/man2/splice.2:26 build/C/man2/tee.2:26 build/C/man2/vmsplice.2:26
4499 #, no-wrap
4500 msgid "2009-09-15"
4501 msgstr ""
4502
4503 #. type: Plain text
4504 #: build/C/man2/splice.2:29
4505 msgid "splice - splice data to/from a pipe"
4506 msgstr ""
4507
4508 #. type: Plain text
4509 #: build/C/man2/splice.2:33 build/C/man2/tee.2:33
4510 #, no-wrap
4511 msgid ""
4512 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
4513 "B<#include E<lt>fcntl.hE<gt>>\n"
4514 msgstr ""
4515
4516 #.  Return type was long before glibc 2.7
4517 #. type: Plain text
4518 #: build/C/man2/splice.2:38
4519 #, no-wrap
4520 msgid ""
4521 "B<ssize_t splice(int >I<fd_in>B<, loff_t *>I<off_in>B<, int >I<fd_out>B<,>\n"
4522 "B<               loff_t *>I<off_out>B<, size_t >I<len>B<, unsigned int "
4523 ">I<flags>B<);>\n"
4524 msgstr ""
4525
4526 #. type: Plain text
4527 #: build/C/man2/splice.2:50
4528 msgid ""
4529 "B<splice>()  moves data between two file descriptors without copying between "
4530 "kernel address space and user address space.  It transfers up to I<len> "
4531 "bytes of data from the file descriptor I<fd_in> to the file descriptor "
4532 "I<fd_out>, where one of the descriptors must refer to a pipe."
4533 msgstr ""
4534
4535 #. type: Plain text
4536 #: build/C/man2/splice.2:80
4537 msgid ""
4538 "If I<fd_in> refers to a pipe, then I<off_in> must be NULL.  If I<fd_in> does "
4539 "not refer to a pipe and I<off_in> is NULL, then bytes are read from I<fd_in> "
4540 "starting from the current file offset, and the current file offset is "
4541 "adjusted appropriately.  If I<fd_in> does not refer to a pipe and I<off_in> "
4542 "is not NULL, then I<off_in> must point to a buffer which specifies the "
4543 "starting offset from which bytes will be read from I<fd_in>; in this case, "
4544 "the current file offset of I<fd_in> is not changed.  Analogous statements "
4545 "apply for I<fd_out> and I<off_out>."
4546 msgstr ""
4547
4548 #. type: Plain text
4549 #: build/C/man2/splice.2:85 build/C/man2/vmsplice.2:78
4550 msgid ""
4551 "The I<flags> argument is a bit mask that is composed by ORing together zero "
4552 "or more of the following values:"
4553 msgstr ""
4554
4555 #. type: TP
4556 #: build/C/man2/splice.2:85 build/C/man2/tee.2:62 build/C/man2/vmsplice.2:78
4557 #, no-wrap
4558 msgid "B<SPLICE_F_MOVE>"
4559 msgstr ""
4560
4561 #. type: Plain text
4562 #: build/C/man2/splice.2:98
4563 msgid ""
4564 "Attempt to move pages instead of copying.  This is only a hint to the "
4565 "kernel: pages may still be copied if the kernel cannot move the pages from "
4566 "the pipe, or if the pipe buffers don't refer to full pages.  The initial "
4567 "implementation of this flag was buggy: therefore starting in Linux 2.6.21 it "
4568 "is a no-op (but is still permitted in a B<splice>()  call); in the future, a "
4569 "correct implementation may be restored."
4570 msgstr ""
4571
4572 #. type: TP
4573 #: build/C/man2/splice.2:98 build/C/man2/tee.2:68 build/C/man2/vmsplice.2:84
4574 #, no-wrap
4575 msgid "B<SPLICE_F_NONBLOCK>"
4576 msgstr ""
4577
4578 #. type: Plain text
4579 #: build/C/man2/splice.2:107
4580 msgid ""
4581 "Do not block on I/O.  This makes the splice pipe operations nonblocking, but "
4582 "B<splice>()  may nevertheless block because the file descriptors that are "
4583 "spliced to/from may block (unless they have the B<O_NONBLOCK> flag set)."
4584 msgstr ""
4585
4586 #. type: TP
4587 #: build/C/man2/splice.2:107 build/C/man2/tee.2:73 build/C/man2/vmsplice.2:91
4588 #, no-wrap
4589 msgid "B<SPLICE_F_MORE>"
4590 msgstr ""
4591
4592 #. type: Plain text
4593 #: build/C/man2/splice.2:121
4594 msgid ""
4595 "More data will be coming in a subsequent splice.  This is a helpful hint "
4596 "when the I<fd_out> refers to a socket (see also the description of "
4597 "B<MSG_MORE> in B<send>(2), and the description of B<TCP_CORK> in B<tcp>(7))"
4598 msgstr ""
4599
4600 #. type: TP
4601 #: build/C/man2/splice.2:121 build/C/man2/tee.2:79 build/C/man2/vmsplice.2:97
4602 #, no-wrap
4603 msgid "B<SPLICE_F_GIFT>"
4604 msgstr ""
4605
4606 #. type: Plain text
4607 #: build/C/man2/splice.2:127
4608 msgid "Unused for B<splice>(); see B<vmsplice>(2)."
4609 msgstr ""
4610
4611 #. type: Plain text
4612 #: build/C/man2/splice.2:136
4613 msgid ""
4614 "Upon successful completion, B<splice>()  returns the number of bytes spliced "
4615 "to or from the pipe.  A return value of 0 means that there was no data to "
4616 "transfer, and it would not make sense to block, because there are no writers "
4617 "connected to the write end of the pipe referred to by I<fd_in>."
4618 msgstr ""
4619
4620 #. type: Plain text
4621 #: build/C/man2/splice.2:142
4622 msgid "On error, B<splice>()  returns -1 and I<errno> is set to indicate the error."
4623 msgstr ""
4624
4625 #. type: Plain text
4626 #: build/C/man2/splice.2:147
4627 msgid ""
4628 "One or both file descriptors are not valid, or do not have proper read-write "
4629 "mode."
4630 msgstr ""
4631
4632 #.  The append-mode error is given since 2.6.27; in earlier kernels,
4633 #.  splice() in append mode was broken
4634 #. type: Plain text
4635 #: build/C/man2/splice.2:155
4636 msgid ""
4637 "Target file system doesn't support splicing; target file is opened in append "
4638 "mode; neither of the descriptors refers to a pipe; or offset given for "
4639 "nonseekable device."
4640 msgstr ""
4641
4642 #. type: Plain text
4643 #: build/C/man2/splice.2:158 build/C/man2/tee.2:114 build/C/man2/vmsplice.2:138
4644 msgid "Out of memory."
4645 msgstr ""
4646
4647 #. type: TP
4648 #: build/C/man2/splice.2:158
4649 #, no-wrap
4650 msgid "B<ESPIPE>"
4651 msgstr ""
4652
4653 #. type: Plain text
4654 #: build/C/man2/splice.2:165
4655 msgid ""
4656 "Either I<off_in> or I<off_out> was not NULL, but the corresponding file "
4657 "descriptor refers to a pipe."
4658 msgstr ""
4659
4660 #. type: Plain text
4661 #: build/C/man2/splice.2:169
4662 msgid "The B<splice>()  system call first appeared in Linux 2.6.17."
4663 msgstr ""
4664
4665 #. type: Plain text
4666 #: build/C/man2/splice.2:181
4667 msgid ""
4668 "The three system calls B<splice>(), B<vmsplice>(2), and B<tee>(2), provide "
4669 "userspace programs with full control over an arbitrary kernel buffer, "
4670 "implemented within the kernel using the same type of buffer that is used for "
4671 "a pipe.  In overview, these system calls perform the following tasks:"
4672 msgstr ""
4673
4674 #. type: TP
4675 #: build/C/man2/splice.2:181
4676 #, no-wrap
4677 msgid "B<splice>()"
4678 msgstr ""
4679
4680 #. type: Plain text
4681 #: build/C/man2/splice.2:185
4682 msgid ""
4683 "moves data from the buffer to an arbitrary file descriptor, or vice versa, "
4684 "or from one buffer to another."
4685 msgstr ""
4686
4687 #. type: TP
4688 #: build/C/man2/splice.2:185
4689 #, no-wrap
4690 msgid "B<tee>(2)"
4691 msgstr ""
4692
4693 #. type: Plain text
4694 #: build/C/man2/splice.2:188
4695 msgid "\"copies\" the data from one buffer to another."
4696 msgstr ""
4697
4698 #. type: TP
4699 #: build/C/man2/splice.2:188
4700 #, no-wrap
4701 msgid "B<vmsplice>(2)"
4702 msgstr ""
4703
4704 #. type: Plain text
4705 #: build/C/man2/splice.2:191
4706 msgid "\"copies\" data from user space into the buffer."
4707 msgstr ""
4708
4709 #
4710 #.  Linus: Now, imagine using the above in a media server, for example.
4711 #.  Let's say that a year or two has passed, so that the video drivers
4712 #.  have been updated to be able to do the splice thing, and what can
4713 #.  you do? You can:
4714 #
4715 #.  - splice from the (mpeg or whatever - let's just assume that the video
4716 #.    input is either digital or does the encoding on its own - like they
4717 #.    pretty much all do) video input into a pipe (remember: no copies - the
4718 #.    video input will just DMA directly into memory, and splice will just
4719 #.    set up the pages in the pipe buffer)
4720 #.  - tee that pipe to split it up
4721 #.  - splice one end to a file (ie "save the compressed stream to disk")
4722 #.  - splice the other end to a real-time video decoder window for your
4723 #.    real-time viewing pleasure.
4724 #
4725 #.  Linus: Now, the advantage of splice()/tee() is that you can
4726 #.  do zero-copy movement of data, and unlike sendfile() you can
4727 #.  do it on _arbitrary_ data (and, as shown by "tee()", it's more
4728 #.  than just sending the data to somebody else: you can duplicate
4729 #.  the data and choose to forward it to two or more different
4730 #.  users - for things like logging etc.).
4731 #. type: Plain text
4732 #: build/C/man2/splice.2:222
4733 msgid ""
4734 "Though we talk of copying, actual copies are generally avoided.  The kernel "
4735 "does this by implementing a pipe buffer as a set of reference-counted "
4736 "pointers to pages of kernel memory.  The kernel creates \"copies\" of pages "
4737 "in a buffer by creating new pointers (for the output buffer) referring to "
4738 "the pages, and increasing the reference counts for the pages: only pointers "
4739 "are copied, not the pages of the buffer."
4740 msgstr ""
4741
4742 #. type: SH
4743 #: build/C/man2/splice.2:222 build/C/man2/tee.2:129
4744 #, no-wrap
4745 msgid "EXAMPLE"
4746 msgstr ""
4747
4748 #. type: Plain text
4749 #: build/C/man2/splice.2:225
4750 msgid "See B<tee>(2)."
4751 msgstr ""
4752
4753 #. type: Plain text
4754 #: build/C/man2/splice.2:229
4755 msgid "B<sendfile>(2), B<tee>(2), B<vmsplice>(2)"
4756 msgstr ""
4757
4758 #. type: TH
4759 #: build/C/man2/tee.2:26
4760 #, no-wrap
4761 msgid "TEE"
4762 msgstr ""
4763
4764 #. type: Plain text
4765 #: build/C/man2/tee.2:29
4766 msgid "tee - duplicating pipe content"
4767 msgstr ""
4768
4769 #. type: Plain text
4770 #: build/C/man2/tee.2:36
4771 #, no-wrap
4772 msgid ""
4773 "B<ssize_t tee(int >I<fd_in>B<, int >I<fd_out>B<, size_t >I<len>B<, unsigned "
4774 "int >I<flags>B<);>\n"
4775 msgstr ""
4776
4777 #.  Example programs http://brick.kernel.dk/snaps
4778 #
4779 #
4780 #.  add a "tee(in, out1, out2)" system call that duplicates the pages
4781 #.  (again, incrementing their reference count, not copying the data) from
4782 #.  one pipe to two other pipes.
4783 #. type: Plain text
4784 #: build/C/man2/tee.2:56
4785 msgid ""
4786 "B<tee>()  duplicates up to I<len> bytes of data from the pipe referred to by "
4787 "the file descriptor I<fd_in> to the pipe referred to by the file descriptor "
4788 "I<fd_out>.  It does not consume the data that is duplicated from I<fd_in>; "
4789 "therefore, that data can be copied by a subsequent B<splice>(2)."
4790 msgstr ""
4791
4792 #. type: Plain text
4793 #: build/C/man2/tee.2:62
4794 msgid ""
4795 "I<flags> is a series of modifier flags, which share the name space with "
4796 "B<splice>(2)  and B<vmsplice>(2):"
4797 msgstr ""
4798
4799 #. type: Plain text
4800 #: build/C/man2/tee.2:68
4801 msgid "Currently has no effect for B<tee>(); see B<splice>(2)."
4802 msgstr ""
4803
4804 #.  Not used for vmsplice
4805 #.  May be in the future -- therefore EAGAIN
4806 #. type: Plain text
4807 #: build/C/man2/tee.2:73 build/C/man2/vmsplice.2:91
4808 msgid "Do not block on I/O; see B<splice>(2)  for further details."
4809 msgstr ""
4810
4811 #. type: Plain text
4812 #: build/C/man2/tee.2:79
4813 msgid ""
4814 "Currently has no effect for B<tee>(), but may be implemented in the future; "
4815 "see B<splice>(2)."
4816 msgstr ""
4817
4818 #. type: Plain text
4819 #: build/C/man2/tee.2:85
4820 msgid "Unused for B<tee>(); see B<vmsplice>(2)."
4821 msgstr ""
4822
4823 #. type: Plain text
4824 #: build/C/man2/tee.2:94
4825 msgid ""
4826 "Upon successful completion, B<tee>()  returns the number of bytes that were "
4827 "duplicated between the input and output.  A return value of 0 means that "
4828 "there was no data to transfer, and it would not make sense to block, because "
4829 "there are no writers connected to the write end of the pipe referred to by "
4830 "I<fd_in>."
4831 msgstr ""
4832
4833 #. type: Plain text
4834 #: build/C/man2/tee.2:100
4835 msgid "On error, B<tee>()  returns -1 and I<errno> is set to indicate the error."
4836 msgstr ""
4837
4838 #. type: Plain text
4839 #: build/C/man2/tee.2:111
4840 msgid ""
4841 "I<fd_in> or I<fd_out> does not refer to a pipe; or I<fd_in> and I<fd_out> "
4842 "refer to the same pipe."
4843 msgstr ""
4844
4845 #. type: Plain text
4846 #: build/C/man2/tee.2:118
4847 msgid "The B<tee>()  system call first appeared in Linux 2.6.17."
4848 msgstr ""
4849
4850 #. type: Plain text
4851 #: build/C/man2/tee.2:129
4852 msgid ""
4853 "Conceptually, B<tee>()  copies the data between the two pipes.  In reality "
4854 "no real data copying takes place though: under the covers, B<tee>()  assigns "
4855 "data in the output by merely grabbing a reference to the input."
4856 msgstr ""
4857
4858 #. type: Plain text
4859 #: build/C/man2/tee.2:135
4860 msgid ""
4861 "The following example implements a basic B<tee>(1)  program using the "
4862 "B<tee>()  system call."
4863 msgstr ""
4864
4865 #. type: Plain text
4866 #: build/C/man2/tee.2:144
4867 #, no-wrap
4868 msgid ""
4869 "#define _GNU_SOURCE\n"
4870 "#include E<lt>fcntl.hE<gt>\n"
4871 "#include E<lt>stdio.hE<gt>\n"
4872 "#include E<lt>stdlib.hE<gt>\n"
4873 "#include E<lt>unistd.hE<gt>\n"
4874 "#include E<lt>errno.hE<gt>\n"
4875 "#include E<lt>limits.hE<gt>\n"
4876 msgstr ""
4877
4878 #. type: Plain text
4879 #: build/C/man2/tee.2:150
4880 #, no-wrap
4881 msgid ""
4882 "int\n"
4883 "main(int argc, char *argv[])\n"
4884 "{\n"
4885 "    int fd;\n"
4886 "    int len, slen;\n"
4887 msgstr ""
4888
4889 #. type: Plain text
4890 #: build/C/man2/tee.2:155
4891 #, no-wrap
4892 msgid ""
4893 "    if (argc != 2) {\n"
4894 "        fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
4895 "        exit(EXIT_FAILURE);\n"
4896 "    }\n"
4897 msgstr ""
4898
4899 #. type: Plain text
4900 #: build/C/man2/tee.2:161
4901 #, no-wrap
4902 msgid ""
4903 "    fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
4904 "    if (fd == -1) {\n"
4905 "        perror(\"open\");\n"
4906 "        exit(EXIT_FAILURE);\n"
4907 "    }\n"
4908 msgstr ""
4909
4910 #. type: Plain text
4911 #: build/C/man2/tee.2:168
4912 #, no-wrap
4913 msgid ""
4914 "    do {\n"
4915 "        /*\n"
4916 "         * tee stdin to stdout.\n"
4917 "         */\n"
4918 "        len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
4919 "                  INT_MAX, SPLICE_F_NONBLOCK);\n"
4920 msgstr ""
4921
4922 #. type: Plain text
4923 #: build/C/man2/tee.2:177
4924 #, no-wrap
4925 msgid ""
4926 "        if (len E<lt> 0) {\n"
4927 "            if (errno == EAGAIN)\n"
4928 "                continue;\n"
4929 "            perror(\"tee\");\n"
4930 "            exit(EXIT_FAILURE);\n"
4931 "        } else\n"
4932 "            if (len == 0)\n"
4933 "                break;\n"
4934 msgstr ""
4935
4936 #. type: Plain text
4937 #: build/C/man2/tee.2:191
4938 #, no-wrap
4939 msgid ""
4940 "        /*\n"
4941 "         * Consume stdin by splicing it to a file.\n"
4942 "         */\n"
4943 "        while (len E<gt> 0) {\n"
4944 "            slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
4945 "                          len, SPLICE_F_MOVE);\n"
4946 "            if (slen E<lt> 0) {\n"
4947 "                perror(\"splice\");\n"
4948 "                break;\n"
4949 "            }\n"
4950 "            len -= slen;\n"
4951 "        }\n"
4952 "    } while (1);\n"
4953 msgstr ""
4954
4955 #. type: Plain text
4956 #: build/C/man2/tee.2:195
4957 #, no-wrap
4958 msgid ""
4959 "    close(fd);\n"
4960 "    exit(EXIT_SUCCESS);\n"
4961 "}\n"
4962 msgstr ""
4963
4964 #. type: Plain text
4965 #: build/C/man2/tee.2:199
4966 msgid "B<splice>(2), B<vmsplice>(2)"
4967 msgstr ""
4968
4969 #. type: TH
4970 #: build/C/man2/vm86.2:26
4971 #, no-wrap
4972 msgid "VM86"
4973 msgstr ""
4974
4975 #. type: TH
4976 #: build/C/man2/vm86.2:26
4977 #, no-wrap
4978 msgid "2009-02-20"
4979 msgstr ""
4980
4981 #. type: Plain text
4982 #: build/C/man2/vm86.2:29
4983 msgid "vm86old, vm86 - enter virtual 8086 mode"
4984 msgstr ""
4985
4986 #. type: Plain text
4987 #: build/C/man2/vm86.2:31
4988 msgid "B<#include E<lt>sys/vm86.hE<gt>>"
4989 msgstr ""
4990
4991 #. type: Plain text
4992 #: build/C/man2/vm86.2:33
4993 msgid "B<int vm86old(struct vm86_struct *>I<info>B<);>"
4994 msgstr ""
4995
4996 #. type: Plain text
4997 #: build/C/man2/vm86.2:35
4998 msgid "B<int vm86(unsigned long >I<fn>B<, struct vm86plus_struct *>I<v86>B<);>"
4999 msgstr ""
5000
5001 #. type: Plain text
5002 #: build/C/man2/vm86.2:46
5003 msgid ""
5004 "The system call B<vm86>()  was introduced in Linux 0.97p2.  In Linux 2.1.15 "
5005 "and 2.0.28 it was renamed to B<vm86old>(), and a new B<vm86>()  was "
5006 "introduced.  The definition of I<struct vm86_struct> was changed in 1.1.8 "
5007 "and 1.1.9."
5008 msgstr ""
5009
5010 #. type: Plain text
5011 #: build/C/man2/vm86.2:50
5012 msgid ""
5013 "These calls cause the process to enter VM86 mode (virtual-8086 in Intel "
5014 "literature), and are used by B<dosemu>."
5015 msgstr ""
5016
5017 #. type: Plain text
5018 #: build/C/man2/vm86.2:52
5019 msgid "VM86 mode is an emulation of real mode within a protected mode task."
5020 msgstr ""
5021
5022 #. type: Plain text
5023 #: build/C/man2/vm86.2:62
5024 msgid ""
5025 "This return value is specific to i386 and indicates a problem with getting "
5026 "userspace data."
5027 msgstr ""
5028
5029 #. type: Plain text
5030 #: build/C/man2/vm86.2:66
5031 msgid ""
5032 "This return value indicates the call is not implemented on the present "
5033 "architecture."
5034 msgstr ""
5035
5036 #. type: Plain text
5037 #: build/C/man2/vm86.2:71
5038 msgid ""
5039 "Saved kernel stack exists.  (This is a kernel sanity check; the saved stack "
5040 "should only exist within vm86 mode itself.)"
5041 msgstr ""
5042
5043 #. type: Plain text
5044 #: build/C/man2/vm86.2:74
5045 msgid ""
5046 "This call is specific to Linux on 32-bit Intel processors, and should not be "
5047 "used in programs intended to be portable."
5048 msgstr ""
5049
5050 #. type: TH
5051 #: build/C/man2/vmsplice.2:26
5052 #, no-wrap
5053 msgid "VMSPLICE"
5054 msgstr ""
5055
5056 #. type: Plain text
5057 #: build/C/man2/vmsplice.2:29
5058 msgid "vmsplice - splice user pages into a pipe"
5059 msgstr ""
5060
5061 #. type: Plain text
5062 #: build/C/man2/vmsplice.2:34
5063 #, no-wrap
5064 msgid ""
5065 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
5066 "B<#include E<lt>fcntl.hE<gt>>\n"
5067 "B<#include E<lt>sys/uio.hE<gt>>\n"
5068 msgstr ""
5069
5070 #. type: Plain text
5071 #: build/C/man2/vmsplice.2:37
5072 #, no-wrap
5073 msgid ""
5074 "B<ssize_t vmsplice(int >I<fd>B<, const struct iovec *>I<iov>B<,>\n"
5075 "B<                 unsigned long >I<nr_segs>B<, unsigned int "
5076 ">I<flags>B<);>\n"
5077 msgstr ""
5078
5079 #.  Linus: vmsplice() system call to basically do a "write to
5080 #.  the buffer", but using the reference counting and VM traversal
5081 #.  to actually fill the buffer. This means that the user needs to
5082 #.  be careful not to reuse the user-space buffer it spliced into
5083 #.  the kernel-space one (contrast this to "write()", which copies
5084 #.  the actual data, and you can thus reuse the buffer immediately
5085 #.  after a successful write), but that is often easy to do.
5086 #. type: Plain text
5087 #: build/C/man2/vmsplice.2:57
5088 msgid ""
5089 "The B<vmsplice>()  system call maps I<nr_segs> ranges of user memory "
5090 "described by I<iov> into a pipe.  The file descriptor I<fd> must refer to a "
5091 "pipe."
5092 msgstr ""
5093
5094 #. type: Plain text
5095 #: build/C/man2/vmsplice.2:64
5096 msgid ""
5097 "The pointer I<iov> points to an array of I<iovec> structures as defined in "
5098 "I<E<lt>sys/uio.hE<gt>>:"
5099 msgstr ""
5100
5101 #. type: Plain text
5102 #: build/C/man2/vmsplice.2:71
5103 #, no-wrap
5104 msgid ""
5105 "struct iovec {\n"
5106 "    void  *iov_base;            /* Starting address */\n"
5107 "    size_t iov_len;             /* Number of bytes */\n"
5108 "};\n"
5109 msgstr ""
5110
5111 #. type: Plain text
5112 #: build/C/man2/vmsplice.2:84
5113 msgid "Unused for B<vmsplice>(); see B<splice>(2)."
5114 msgstr ""
5115
5116 #. type: Plain text
5117 #: build/C/man2/vmsplice.2:97
5118 msgid ""
5119 "Currently has no effect for B<vmsplice>(), but may be implemented in the "
5120 "future; see B<splice>(2)."
5121 msgstr ""
5122
5123 #.  FIXME Explain the following line in a little more detail:
5124 #.  .... if we expect to later SPLICE_F_MOVE to the cache.
5125 #. type: Plain text
5126 #: build/C/man2/vmsplice.2:113
5127 msgid ""
5128 "The user pages are a gift to the kernel.  The application may not modify "
5129 "this memory ever, or page cache and on-disk data may differ.  Gifting pages "
5130 "to the kernel means that a subsequent B<splice>(2)  B<SPLICE_F_MOVE> can "
5131 "successfully move the pages; if this flag is not specified, then a "
5132 "subsequent B<splice>(2)  B<SPLICE_F_MOVE> must copy the pages.  Data must "
5133 "also be properly page aligned, both in memory and length."
5134 msgstr ""
5135
5136 #. type: Plain text
5137 #: build/C/man2/vmsplice.2:122
5138 msgid ""
5139 "Upon successful completion, B<vmsplice>()  returns the number of bytes "
5140 "transferred to the pipe.  On error, B<vmsplice>()  returns -1 and I<errno> "
5141 "is set to indicate the error."
5142 msgstr ""
5143
5144 #. type: Plain text
5145 #: build/C/man2/vmsplice.2:127
5146 msgid "I<fd> either not valid, or doesn't refer to a pipe."
5147 msgstr ""
5148
5149 #. type: Plain text
5150 #: build/C/man2/vmsplice.2:135
5151 msgid ""
5152 "I<nr_segs> is 0 or greater than B<IOV_MAX>; or memory not aligned if "
5153 "B<SPLICE_F_GIFT> set."
5154 msgstr ""
5155
5156 #. type: Plain text
5157 #: build/C/man2/vmsplice.2:142
5158 msgid "The B<vmsplice>()  system call first appeared in Linux 2.6.17."
5159 msgstr ""
5160
5161 #. type: Plain text
5162 #: build/C/man2/vmsplice.2:153
5163 msgid ""
5164 "B<vmsplice>()  follows the other vectorized read/write type functions when "
5165 "it comes to limitations on number of segments being passed in.  This limit "
5166 "is B<IOV_MAX> as defined in I<E<lt>limits.hE<gt>>.  At the time of this "
5167 "writing, that limit is 1024."
5168 msgstr ""
5169
5170 #. type: Plain text
5171 #: build/C/man2/vmsplice.2:156
5172 msgid "B<splice>(2), B<tee>(2)"
5173 msgstr ""