OSDN Git Service

(split) LDP: Support po4a.
[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-19 23:50+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:45 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:45 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:46 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:48 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:55 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:48 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:399 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:412 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:417 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:428 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:437 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:53 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:453 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:455 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:530 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:55 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:539 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:62 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:546 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.35 of the Linux I<man-pages> project.  A "
291 "description of the project, and information about reporting bugs, can be "
292 "found at http://man7.org/linux/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:413 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 "1997-07-16"
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:30
1142 #, no-wrap
1143 msgid ""
1144 "/*\n"
1145 " * These are the commands understood by nfsctl().\n"
1146 " */\n"
1147 "#define NFSCTL_SVC          0    /* This is a server process. */\n"
1148 "#define NFSCTL_ADDCLIENT    1    /* Add an NFS client. */\n"
1149 "#define NFSCTL_DELCLIENT    2    /* Remove an NFS client. */\n"
1150 "#define NFSCTL_EXPORT       3    /* export a file system. */\n"
1151 "#define NFSCTL_UNEXPORT     4    /* unexport a file system. */\n"
1152 "#define NFSCTL_UGIDUPDATE   5    /* update a client's UID/GID map. */\n"
1153 "#define NFSCTL_GETFH        6    /* get an fh (used by mountd) */\n"
1154 msgstr ""
1155
1156 #. type: Plain text
1157 #: build/C/man2/nfsservctl.2:42
1158 #, no-wrap
1159 msgid ""
1160 "struct nfsctl_arg {\n"
1161 "    int                       ca_version;     /* safeguard */\n"
1162 "    union {\n"
1163 "        struct nfsctl_svc     u_svc;\n"
1164 "        struct nfsctl_client  u_client;\n"
1165 "        struct nfsctl_export  u_export;\n"
1166 "        struct nfsctl_uidmap  u_umap;\n"
1167 "        struct nfsctl_fhparm  u_getfh;\n"
1168 "        unsigned int          u_debug;\n"
1169 "    } u;\n"
1170 "}\n"
1171 msgstr ""
1172
1173 #. type: Plain text
1174 #: build/C/man2/nfsservctl.2:47
1175 #, no-wrap
1176 msgid ""
1177 "union nfsctl_res {\n"
1178 "        struct knfs_fh          cr_getfh;\n"
1179 "        unsigned int            cr_debug;\n"
1180 "};\n"
1181 msgstr ""
1182
1183 #. type: Plain text
1184 #: build/C/man2/nfsservctl.2:53 build/C/man2/pivot_root.2:99 build/C/man2/vm86.2:57
1185 msgid ""
1186 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
1187 "appropriately."
1188 msgstr ""
1189
1190 #. type: Plain text
1191 #: build/C/man2/nfsservctl.2:55
1192 msgid "This call is Linux-specific."
1193 msgstr ""
1194
1195 #. type: TH
1196 #: build/C/man2/outb.2:28
1197 #, no-wrap
1198 msgid "OUTB"
1199 msgstr ""
1200
1201 #. type: TH
1202 #: build/C/man2/outb.2:28
1203 #, no-wrap
1204 msgid "1995-11-29"
1205 msgstr ""
1206
1207 #. type: Plain text
1208 #: build/C/man2/outb.2:33
1209 msgid ""
1210 "outb, outw, outl, outsb, outsw, outsl, inb, inw, inl, insb, insw, insl, "
1211 "outb_p, outw_p, outl_p, inb_p, inw_p, inl_p - port I/O"
1212 msgstr ""
1213
1214 #. type: Plain text
1215 #: build/C/man2/outb.2:38
1216 msgid ""
1217 "This family of functions is used to do low-level port input and output.  The "
1218 "out* functions do port output, the in* functions do port input; the b-suffix "
1219 "functions are byte-width and the w-suffix functions word-width; the "
1220 "_p-suffix functions pause until the I/O completes."
1221 msgstr ""
1222
1223 #.  , given the following information
1224 #.  in addition to that given in
1225 #.  .BR outb (9).
1226 #. type: Plain text
1227 #: build/C/man2/outb.2:44
1228 msgid ""
1229 "They are primarily designed for internal kernel use, but can be used from "
1230 "user space."
1231 msgstr ""
1232
1233 #. type: Plain text
1234 #: build/C/man2/outb.2:49
1235 msgid ""
1236 "You compile with B<-O> or B<-O2> or similar.  The functions are defined as "
1237 "inline macros, and will not be substituted in without optimization enabled, "
1238 "causing unresolved references at link time."
1239 msgstr ""
1240
1241 #. type: Plain text
1242 #: build/C/man2/outb.2:58
1243 msgid ""
1244 "You use B<ioperm>(2)  or alternatively B<iopl>(2)  to tell the kernel to "
1245 "allow the user space application to access the I/O ports in question.  "
1246 "Failure to do this will cause the application to receive a segmentation "
1247 "fault."
1248 msgstr ""
1249
1250 #. type: Plain text
1251 #: build/C/man2/outb.2:67
1252 msgid ""
1253 "B<outb>()  and friends are hardware-specific.  The I<value> argument is "
1254 "passed first and the I<port> argument is passed second, which is the "
1255 "opposite order from most DOS implementations."
1256 msgstr ""
1257
1258 #. type: Plain text
1259 #: build/C/man2/outb.2:70
1260 msgid "B<ioperm>(2), B<iopl>(2)"
1261 msgstr ""
1262
1263 #. type: TH
1264 #: build/C/man2/pciconfig_read.2:5
1265 #, no-wrap
1266 msgid "PCICONFIG_READ"
1267 msgstr ""
1268
1269 #. type: TH
1270 #: build/C/man2/pciconfig_read.2:5
1271 #, no-wrap
1272 msgid "2003-07-14"
1273 msgstr ""
1274
1275 #. type: Plain text
1276 #: build/C/man2/pciconfig_read.2:8
1277 msgid ""
1278 "pciconfig_read, pciconfig_write, pciconfig_iobase - pci device information "
1279 "handling"
1280 msgstr ""
1281
1282 #. type: Plain text
1283 #: build/C/man2/pciconfig_read.2:11
1284 #, no-wrap
1285 msgid "B<#include E<lt>pci.hE<gt>>\n"
1286 msgstr ""
1287
1288 #. type: Plain text
1289 #: build/C/man2/pciconfig_read.2:18
1290 #, no-wrap
1291 msgid ""
1292 "B<int pciconfig_read(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
1293 "B<          unsigned long >I<off>B<, unsigned long >I<len>B<, void "
1294 "*>I<buf>B<);>\n"
1295 "B<int pciconfig_write(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
1296 "B<          unsigned long >I<off>B<, unsigned long >I<len>B<, void "
1297 "*>I<buf>B<);>\n"
1298 "B<int pciconfig_iobase(long >I<which>B<, unsigned long >I<bus>B<,>\n"
1299 "B<          unsigned long >I<devfn>B<);>\n"
1300 msgstr ""
1301
1302 #. type: Plain text
1303 #: build/C/man2/pciconfig_read.2:24
1304 msgid ""
1305 "Most of the interaction with PCI devices is already handled by the kernel "
1306 "PCI layer, and thus these calls should not normally need to be accessed from "
1307 "userspace."
1308 msgstr ""
1309
1310 #. type: TP
1311 #: build/C/man2/pciconfig_read.2:24 build/C/man2/pciconfig_read.2:48
1312 #, no-wrap
1313 msgid "B<pciconfig_read>()"
1314 msgstr ""
1315
1316 #. type: Plain text
1317 #: build/C/man2/pciconfig_read.2:33
1318 msgid "Reads to I<buf> from device I<dev> at offset I<off> value."
1319 msgstr ""
1320
1321 #. type: TP
1322 #: build/C/man2/pciconfig_read.2:33 build/C/man2/pciconfig_read.2:54
1323 #, no-wrap
1324 msgid "B<pciconfig_write>()"
1325 msgstr ""
1326
1327 #. type: Plain text
1328 #: build/C/man2/pciconfig_read.2:42
1329 msgid "Writes from I<buf> to device I<dev> at offset I<off> value."
1330 msgstr ""
1331
1332 #. type: TP
1333 #: build/C/man2/pciconfig_read.2:42 build/C/man2/pciconfig_read.2:60
1334 #, no-wrap
1335 msgid "B<pciconfig_iobase>()"
1336 msgstr ""
1337
1338 #. type: Plain text
1339 #: build/C/man2/pciconfig_read.2:47
1340 msgid ""
1341 "You pass it a bus/devfn pair and get a physical address for either the "
1342 "memory offset (for things like prep, this is 0xc0000000), the IO base for "
1343 "PIO cycles, or the ISA holes if any."
1344 msgstr ""
1345
1346 #. type: Plain text
1347 #: build/C/man2/pciconfig_read.2:54 build/C/man2/pciconfig_read.2:60
1348 msgid ""
1349 "On success zero is returned.  On error, -1 is returned and I<errno> is set "
1350 "appropriately."
1351 msgstr ""
1352
1353 #. type: Plain text
1354 #: build/C/man2/pciconfig_read.2:74
1355 msgid ""
1356 "Returns information on locations of various I/O regions in physical memory "
1357 "according to the I<which> value.  Values for I<which> are: "
1358 "B<IOBASE_BRIDGE_NUMBER>, B<IOBASE_MEMORY>, B<IOBASE_IO>, B<IOBASE_ISA_IO>, "
1359 "B<IOBASE_ISA_MEM>."
1360 msgstr ""
1361
1362 #. type: Plain text
1363 #: build/C/man2/pciconfig_read.2:81
1364 msgid "I<len> value is invalid.  This does not apply to B<pciconfig_iobase>()."
1365 msgstr ""
1366
1367 #. type: TP
1368 #: build/C/man2/pciconfig_read.2:81 build/C/man2/ptrace.2:431 build/C/man2/sendfile.2:130
1369 #, no-wrap
1370 msgid "B<EIO>"
1371 msgstr ""
1372
1373 #. type: Plain text
1374 #: build/C/man2/pciconfig_read.2:84
1375 msgid "I/O error."
1376 msgstr ""
1377
1378 #. type: TP
1379 #: build/C/man2/pciconfig_read.2:84
1380 #, no-wrap
1381 msgid "B<ENODEV>"
1382 msgstr ""
1383
1384 #. type: Plain text
1385 #: build/C/man2/pciconfig_read.2:90
1386 msgid ""
1387 "For B<pciconfig_iobase>(), \"hose\" value is NULL.  For the other calls, "
1388 "could not find a slot."
1389 msgstr ""
1390
1391 #. type: Plain text
1392 #: build/C/man2/pciconfig_read.2:95
1393 msgid "The system has not implemented these calls (B<CONFIG_PCI> not defined)."
1394 msgstr ""
1395
1396 #. type: TP
1397 #: build/C/man2/pciconfig_read.2:95
1398 #, no-wrap
1399 msgid "B<EOPNOTSUPP>"
1400 msgstr ""
1401
1402 #. type: Plain text
1403 #: build/C/man2/pciconfig_read.2:102
1404 msgid ""
1405 "This return value is only valid for B<pciconfig_iobase>().  It is returned "
1406 "if the value for I<which> is invalid."
1407 msgstr ""
1408
1409 #. type: Plain text
1410 #: build/C/man2/pciconfig_read.2:107
1411 msgid ""
1412 "User does not have the B<CAP_SYS_ADMIN> capability.  This does not apply to "
1413 "B<pciconfig_iobase>()."
1414 msgstr ""
1415
1416 #. type: Plain text
1417 #: build/C/man2/pciconfig_read.2:109
1418 msgid "These calls are Linux-specific, available since Linux 2.0.26/2.1.11."
1419 msgstr ""
1420
1421 #. type: Plain text
1422 #: build/C/man2/pciconfig_read.2:111
1423 msgid "B<capabilities>(7)"
1424 msgstr ""
1425
1426 #. type: TH
1427 #: build/C/man2/personality.2:30
1428 #, no-wrap
1429 msgid "PERSONALITY"
1430 msgstr ""
1431
1432 #. type: TH
1433 #: build/C/man2/personality.2:30
1434 #, no-wrap
1435 msgid "2003-01-01"
1436 msgstr ""
1437
1438 #. type: Plain text
1439 #: build/C/man2/personality.2:33
1440 msgid "personality - set the process execution domain"
1441 msgstr ""
1442
1443 #. type: Plain text
1444 #: build/C/man2/personality.2:35
1445 msgid "B<#include E<lt>sys/personality.hE<gt>>"
1446 msgstr ""
1447
1448 #. type: Plain text
1449 #: build/C/man2/personality.2:37
1450 msgid "B<int personality(unsigned long >I<persona>B<);>"
1451 msgstr ""
1452
1453 #. type: Plain text
1454 #: build/C/man2/personality.2:45
1455 msgid ""
1456 "Linux supports different execution domains, or personalities, for each "
1457 "process.  Among other things, execution domains tell Linux how to map signal "
1458 "numbers into signal actions.  The execution domain system allows Linux to "
1459 "provide limited support for binaries compiled under other UNIX-like "
1460 "operating systems."
1461 msgstr ""
1462
1463 #. type: Plain text
1464 #: build/C/man2/personality.2:55
1465 msgid ""
1466 "This function will return the current B<personality>()  when I<persona> "
1467 "equals 0xffffffff.  Otherwise, it will make the execution domain referenced "
1468 "by I<persona> the new execution domain of the calling process."
1469 msgstr ""
1470
1471 #. type: Plain text
1472 #: build/C/man2/personality.2:62
1473 msgid ""
1474 "On success, the previous I<persona> is returned.  On error, -1 is returned, "
1475 "and I<errno> is set appropriately."
1476 msgstr ""
1477
1478 #. type: Plain text
1479 #: build/C/man2/personality.2:66
1480 msgid "The kernel was unable to change the personality."
1481 msgstr ""
1482
1483 #. type: Plain text
1484 #: build/C/man2/personality.2:70
1485 msgid ""
1486 "B<personality>()  is Linux-specific and should not be used in programs "
1487 "intended to be portable."
1488 msgstr ""
1489
1490 #. type: TH
1491 #: build/C/man2/pivot_root.2:7
1492 #, no-wrap
1493 msgid "PIVOT_ROOT"
1494 msgstr ""
1495
1496 #. type: Plain text
1497 #: build/C/man2/pivot_root.2:10
1498 msgid "pivot_root - change the root file system"
1499 msgstr ""
1500
1501 #. type: Plain text
1502 #: build/C/man2/pivot_root.2:12
1503 msgid "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
1504 msgstr ""
1505
1506 #
1507 #.  The
1508 #.  .B CAP_SYS_ADMIN
1509 #.  capability is required.
1510 #. type: Plain text
1511 #: build/C/man2/pivot_root.2:21
1512 msgid ""
1513 "B<pivot_root>()  moves the root file system of the calling process to the "
1514 "directory I<put_old> and makes I<new_root> the new root file system of the "
1515 "calling process."
1516 msgstr ""
1517
1518 #. type: Plain text
1519 #: build/C/man2/pivot_root.2:28
1520 msgid ""
1521 "The typical use of B<pivot_root>()  is during system startup, when the "
1522 "system mounts a temporary root file system (e.g., an B<initrd>), then mounts "
1523 "the real root file system, and eventually turns the latter into the current "
1524 "root of all relevant processes or threads."
1525 msgstr ""
1526
1527 #. type: Plain text
1528 #: build/C/man2/pivot_root.2:40
1529 msgid ""
1530 "B<pivot_root>()  may or may not change the current root and the current "
1531 "working directory of any processes or threads which use the old root "
1532 "directory.  The caller of B<pivot_root>()  must ensure that processes with "
1533 "root or current working directory at the old root operate correctly in "
1534 "either case.  An easy way to ensure this is to change their root and current "
1535 "working directory to I<new_root> before invoking B<pivot_root>()."
1536 msgstr ""
1537
1538 #. type: Plain text
1539 #: build/C/man2/pivot_root.2:58
1540 msgid ""
1541 "The paragraph above is intentionally vague because the implementation of "
1542 "B<pivot_root>()  may change in the future.  At the time of writing, "
1543 "B<pivot_root>()  changes root and current working directory of each process "
1544 "or thread to I<new_root> if they point to the old root directory.  This is "
1545 "necessary in order to prevent kernel threads from keeping the old root "
1546 "directory busy with their root and current working directory, even if they "
1547 "never access the file system in any way.  In the future, there may be a "
1548 "mechanism for kernel threads to explicitly relinquish any access to the file "
1549 "system, such that this fairly intrusive mechanism can be removed from "
1550 "B<pivot_root>()."
1551 msgstr ""
1552
1553 #. type: Plain text
1554 #: build/C/man2/pivot_root.2:66
1555 msgid ""
1556 "Note that this also applies to the calling process: B<pivot_root>()  may or "
1557 "may not affect its current working directory.  It is therefore recommended "
1558 "to call B<chdir(\"/\")> immediately after B<pivot_root>()."
1559 msgstr ""
1560
1561 #. type: Plain text
1562 #: build/C/man2/pivot_root.2:68
1563 msgid "The following restrictions apply to I<new_root> and I<put_old>:"
1564 msgstr ""
1565
1566 #. type: IP
1567 #: 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
1568 #, no-wrap
1569 msgid "-"
1570 msgstr ""
1571
1572 #. type: Plain text
1573 #: build/C/man2/pivot_root.2:70
1574 msgid "They must be directories."
1575 msgstr ""
1576
1577 #. type: Plain text
1578 #: build/C/man2/pivot_root.2:73
1579 msgid ""
1580 "I<new_root> and I<put_old> must not be on the same file system as the "
1581 "current root."
1582 msgstr ""
1583
1584 #. type: Plain text
1585 #: build/C/man2/pivot_root.2:77
1586 msgid ""
1587 "I<put_old> must be underneath I<new_root>, that is, adding a nonzero number "
1588 "of I</..> to the string pointed to by I<put_old> must yield the same "
1589 "directory as I<new_root>."
1590 msgstr ""
1591
1592 #. type: Plain text
1593 #: build/C/man2/pivot_root.2:79
1594 msgid "No other file system may be mounted on I<put_old>."
1595 msgstr ""
1596
1597 #. type: Plain text
1598 #: build/C/man2/pivot_root.2:83
1599 msgid "See also B<pivot_root>(8)  for additional usage examples."
1600 msgstr ""
1601
1602 #. type: Plain text
1603 #: build/C/man2/pivot_root.2:90
1604 msgid ""
1605 "If the current root is not a mount point (e.g., after B<chroot>(2)  or "
1606 "B<pivot_root>(), see also below), not the old root directory, but the mount "
1607 "point of that file system is mounted on I<put_old>."
1608 msgstr ""
1609
1610 #. type: Plain text
1611 #: build/C/man2/pivot_root.2:95
1612 msgid ""
1613 "I<new_root> does not have to be a mount point.  In this case, "
1614 "I</proc/mounts> will show the mount point of the file system containing "
1615 "I<new_root> as root (I</>)."
1616 msgstr ""
1617
1618 #. type: Plain text
1619 #: build/C/man2/pivot_root.2:104
1620 msgid ""
1621 "B<pivot_root>()  may return (in I<errno>) any of the errors returned by "
1622 "B<stat>(2).  Additionally, it may return:"
1623 msgstr ""
1624
1625 #. type: Plain text
1626 #: build/C/man2/pivot_root.2:108
1627 msgid ""
1628 "I<new_root> or I<put_old> are on the current root file system, or a file "
1629 "system is already mounted on I<put_old>."
1630 msgstr ""
1631
1632 #. type: Plain text
1633 #: build/C/man2/pivot_root.2:111
1634 msgid "I<put_old> is not underneath I<new_root>."
1635 msgstr ""
1636
1637 #. type: TP
1638 #: build/C/man2/pivot_root.2:111
1639 #, no-wrap
1640 msgid "B<ENOTDIR>"
1641 msgstr ""
1642
1643 #. type: Plain text
1644 #: build/C/man2/pivot_root.2:114
1645 msgid "I<new_root> or I<put_old> is not a directory."
1646 msgstr ""
1647
1648 #. type: Plain text
1649 #: build/C/man2/pivot_root.2:119
1650 msgid "The calling process does not have the B<CAP_SYS_ADMIN> capability."
1651 msgstr ""
1652
1653 #. type: Plain text
1654 #: build/C/man2/pivot_root.2:122
1655 msgid "B<pivot_root>()  was introduced in Linux 2.3.41."
1656 msgstr ""
1657
1658 #. type: Plain text
1659 #: build/C/man2/pivot_root.2:125
1660 msgid "B<pivot_root>()  is Linux-specific and hence is not portable."
1661 msgstr ""
1662
1663 #. type: SH
1664 #: build/C/man2/pivot_root.2:128 build/C/man2/ptrace.2:518
1665 #, no-wrap
1666 msgid "BUGS"
1667 msgstr ""
1668
1669 #. type: Plain text
1670 #: build/C/man2/pivot_root.2:132
1671 msgid ""
1672 "B<pivot_root>()  should not have to change root and current working "
1673 "directory of all other processes in the system."
1674 msgstr ""
1675
1676 #. type: Plain text
1677 #: build/C/man2/pivot_root.2:137
1678 msgid ""
1679 "Some of the more obscure uses of B<pivot_root>()  may quickly lead to "
1680 "insanity."
1681 msgstr ""
1682
1683 #. type: Plain text
1684 #: build/C/man2/pivot_root.2:143
1685 msgid "B<chdir>(2), B<chroot>(2), B<stat>(2), B<initrd>(4), B<pivot_root>(8)"
1686 msgstr ""
1687
1688 #. type: TH
1689 #: build/C/man2/ptrace.2:45
1690 #, no-wrap
1691 msgid "PTRACE"
1692 msgstr ""
1693
1694 #. type: TH
1695 #: build/C/man2/ptrace.2:45
1696 #, no-wrap
1697 msgid "2009-03-30"
1698 msgstr ""
1699
1700 #. type: Plain text
1701 #: build/C/man2/ptrace.2:48
1702 msgid "ptrace - process trace"
1703 msgstr ""
1704
1705 #. type: Plain text
1706 #: build/C/man2/ptrace.2:51
1707 #, no-wrap
1708 msgid "B<#include E<lt>sys/ptrace.hE<gt>>\n"
1709 msgstr ""
1710
1711 #. type: Plain text
1712 #: build/C/man2/ptrace.2:54
1713 #, no-wrap
1714 msgid ""
1715 "B<long ptrace(enum __ptrace_request >I<request>B<, pid_t >I<pid>B<, >\n"
1716 "B<            void *>I<addr>B<, void *>I<data>B<);>\n"
1717 msgstr ""
1718
1719 #. type: Plain text
1720 #: build/C/man2/ptrace.2:63
1721 msgid ""
1722 "The B<ptrace>()  system call provides a means by which a parent process may "
1723 "observe and control the execution of another process, and examine and change "
1724 "its core image and registers.  It is primarily used to implement breakpoint "
1725 "debugging and system call tracing."
1726 msgstr ""
1727
1728 #. type: Plain text
1729 #: build/C/man2/ptrace.2:72
1730 msgid ""
1731 "The parent can initiate a trace by calling B<fork>(2)  and having the "
1732 "resulting child do a B<PTRACE_TRACEME>, followed (typically) by an "
1733 "B<exec>(3).  Alternatively, the parent may commence trace of an existing "
1734 "process using B<PTRACE_ATTACH>."
1735 msgstr ""
1736
1737 #. type: Plain text
1738 #: build/C/man2/ptrace.2:84
1739 msgid ""
1740 "While being traced, the child will stop each time a signal is delivered, "
1741 "even if the signal is being ignored.  (The exception is B<SIGKILL>, which "
1742 "has its usual effect.)  The parent will be notified at its next B<wait>(2)  "
1743 "and may inspect and modify the child process while it is stopped.  The "
1744 "parent then causes the child to continue, optionally ignoring the delivered "
1745 "signal (or even delivering a different signal instead)."
1746 msgstr ""
1747
1748 #. type: Plain text
1749 #: build/C/man2/ptrace.2:90
1750 msgid ""
1751 "When the parent is finished tracing, it can terminate the child with "
1752 "B<PTRACE_KILL> or cause it to continue executing in a normal, untraced mode "
1753 "via B<PTRACE_DETACH>."
1754 msgstr ""
1755
1756 #. type: Plain text
1757 #: build/C/man2/ptrace.2:92
1758 msgid "The value of I<request> determines the action to be performed:"
1759 msgstr ""
1760
1761 #. type: TP
1762 #: build/C/man2/ptrace.2:92
1763 #, no-wrap
1764 msgid "B<PTRACE_TRACEME>"
1765 msgstr ""
1766
1767 #. type: Plain text
1768 #: build/C/man2/ptrace.2:111
1769 msgid ""
1770 "Indicates that this process is to be traced by its parent.  Any signal "
1771 "(except B<SIGKILL>)  delivered to this process will cause it to stop and its "
1772 "parent to be notified via B<wait>(2).  Also, all subsequent calls to "
1773 "B<execve>(2)  by this process will cause a B<SIGTRAP> to be sent to it, "
1774 "giving the parent a chance to gain control before the new program begins "
1775 "execution.  A process probably shouldn't make this request if its parent "
1776 "isn't expecting to trace it.  (I<pid>, I<addr>, and I<data> are ignored.)"
1777 msgstr ""
1778
1779 #. type: Plain text
1780 #: build/C/man2/ptrace.2:120
1781 msgid ""
1782 "The above request is used only by the child process; the rest are used only "
1783 "by the parent.  In the following requests, I<pid> specifies the child "
1784 "process to be acted on.  For requests other than B<PTRACE_KILL>, the child "
1785 "process must be stopped."
1786 msgstr ""
1787
1788 #. type: TP
1789 #: build/C/man2/ptrace.2:120
1790 #, no-wrap
1791 msgid "B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>"
1792 msgstr ""
1793
1794 #. type: Plain text
1795 #: build/C/man2/ptrace.2:130
1796 msgid ""
1797 "Reads a word at the location I<addr> in the child's memory, returning the "
1798 "word as the result of the B<ptrace>()  call.  Linux does not have separate "
1799 "text and data address spaces, so the two requests are currently equivalent.  "
1800 "(The argument I<data> is ignored.)"
1801 msgstr ""
1802
1803 #. type: TP
1804 #: build/C/man2/ptrace.2:130
1805 #, no-wrap
1806 msgid "B<PTRACE_PEEKUSER>"
1807 msgstr ""
1808
1809 #.  PTRACE_PEEKUSR in kernel source, but glibc uses PTRACE_PEEKUSER,
1810 #.  and that is the name that seems common on other systems.
1811 #. type: Plain text
1812 #: build/C/man2/ptrace.2:146
1813 msgid ""
1814 "Reads a word at offset I<addr> in the child's USER area, which holds the "
1815 "registers and other information about the process (see "
1816 "I<E<lt>sys/user.hE<gt>>).  The word is returned as the result of the "
1817 "B<ptrace>()  call.  Typically the offset must be word-aligned, though this "
1818 "might vary by architecture.  See NOTES.  (I<data> is ignored.)"
1819 msgstr ""
1820
1821 #. type: TP
1822 #: build/C/man2/ptrace.2:146
1823 #, no-wrap
1824 msgid "B<PTRACE_POKETEXT>, B<PTRACE_POKEDATA>"
1825 msgstr ""
1826
1827 #. type: Plain text
1828 #: build/C/man2/ptrace.2:154
1829 msgid ""
1830 "Copies the word I<data> to location I<addr> in the child's memory.  As "
1831 "above, the two requests are currently equivalent."
1832 msgstr ""
1833
1834 #. type: TP
1835 #: build/C/man2/ptrace.2:154
1836 #, no-wrap
1837 msgid "B<PTRACE_POKEUSER>"
1838 msgstr ""
1839
1840 #.  PTRACE_POKEUSR in kernel source, but glibc uses PTRACE_POKEUSER,
1841 #.  and that is the name that seems common on other systems.
1842 #. type: Plain text
1843 #: build/C/man2/ptrace.2:166
1844 msgid ""
1845 "Copies the word I<data> to offset I<addr> in the child's USER area.  As "
1846 "above, the offset must typically be word-aligned.  In order to maintain the "
1847 "integrity of the kernel, some modifications to the USER area are disallowed."
1848 msgstr ""
1849
1850 #. type: TP
1851 #: build/C/man2/ptrace.2:166
1852 #, no-wrap
1853 msgid "B<PTRACE_GETREGS>, B<PTRACE_GETFPREGS>"
1854 msgstr ""
1855
1856 #. type: Plain text
1857 #: build/C/man2/ptrace.2:173
1858 msgid ""
1859 "Copies the child's general purpose or floating-point registers, "
1860 "respectively, to location I<data> in the parent.  See "
1861 "I<E<lt>sys/user.hE<gt>> for information on the format of this data.  "
1862 "(I<addr> is ignored.)"
1863 msgstr ""
1864
1865 #. type: TP
1866 #: build/C/man2/ptrace.2:173
1867 #, no-wrap
1868 msgid "B<PTRACE_GETSIGINFO> (since Linux 2.3.99-pre6)"
1869 msgstr ""
1870
1871 #. type: Plain text
1872 #: build/C/man2/ptrace.2:180
1873 msgid ""
1874 "Retrieve information about the signal that caused the stop.  Copies a "
1875 "I<siginfo_t> structure (see B<sigaction>(2))  from the child to location "
1876 "I<data> in the parent.  (I<addr> is ignored.)"
1877 msgstr ""
1878
1879 #. type: TP
1880 #: build/C/man2/ptrace.2:180
1881 #, no-wrap
1882 msgid "B<PTRACE_SETREGS>, B<PTRACE_SETFPREGS>"
1883 msgstr ""
1884
1885 #. type: Plain text
1886 #: build/C/man2/ptrace.2:189
1887 msgid ""
1888 "Copies the child's general purpose or floating-point registers, "
1889 "respectively, from location I<data> in the parent.  As for "
1890 "B<PTRACE_POKEUSER>, some general purpose register modifications may be "
1891 "disallowed.  (I<addr> is ignored.)"
1892 msgstr ""
1893
1894 #. type: TP
1895 #: build/C/man2/ptrace.2:189
1896 #, no-wrap
1897 msgid "B<PTRACE_SETSIGINFO> (since Linux 2.3.99-pre6)"
1898 msgstr ""
1899
1900 #. type: Plain text
1901 #: build/C/man2/ptrace.2:201
1902 msgid ""
1903 "Set signal information.  Copies a I<siginfo_t> structure from location "
1904 "I<data> in the parent to the child.  This will only affect signals that "
1905 "would normally be delivered to the child and were caught by the tracer.  It "
1906 "may be difficult to tell these normal signals from synthetic signals "
1907 "generated by B<ptrace>()  itself.  (I<addr> is ignored.)"
1908 msgstr ""
1909
1910 #. type: TP
1911 #: build/C/man2/ptrace.2:201
1912 #, no-wrap
1913 msgid "B<PTRACE_SETOPTIONS> (since Linux 2.4.6; see BUGS for caveats)"
1914 msgstr ""
1915
1916 #. type: Plain text
1917 #: build/C/man2/ptrace.2:207
1918 msgid ""
1919 "Sets ptrace options from I<data> in the parent.  (I<addr> is ignored.)  "
1920 "I<data> is interpreted as a bit mask of options, which are specified by the "
1921 "following flags:"
1922 msgstr ""
1923
1924 #. type: TP
1925 #: build/C/man2/ptrace.2:208
1926 #, no-wrap
1927 msgid "B<PTRACE_O_TRACESYSGOOD> (since Linux 2.4.6)"
1928 msgstr ""
1929
1930 #. type: Plain text
1931 #: build/C/man2/ptrace.2:216
1932 msgid ""
1933 "When delivering syscall traps, set bit 7 in the signal number (i.e., deliver "
1934 "I<SIGTRAP | 0x80>).  This makes it easy for the tracer to tell the "
1935 "difference between normal traps and those caused by a syscall.  "
1936 "(B<PTRACE_O_TRACESYSGOOD> may not work on all architectures.)"
1937 msgstr ""
1938
1939 #. type: TP
1940 #: build/C/man2/ptrace.2:216
1941 #, no-wrap
1942 msgid "B<PTRACE_O_TRACEFORK> (since Linux 2.5.46)"
1943 msgstr ""
1944
1945 #. type: Plain text
1946 #: build/C/man2/ptrace.2:226
1947 msgid ""
1948 "Stop the child at the next B<fork>(2)  call with I<SIGTRAP | "
1949 "PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
1950 "newly forked process, which will start with a B<SIGSTOP>.  The PID for the "
1951 "new process can be retrieved with B<PTRACE_GETEVENTMSG>."
1952 msgstr ""
1953
1954 #. type: TP
1955 #: build/C/man2/ptrace.2:226
1956 #, no-wrap
1957 msgid "B<PTRACE_O_TRACEVFORK> (since Linux 2.5.46)"
1958 msgstr ""
1959
1960 #. type: Plain text
1961 #: build/C/man2/ptrace.2:235
1962 msgid ""
1963 "Stop the child at the next B<vfork>(2)  call with I<SIGTRAP | "
1964 "PTRACE_EVENT_VFORK\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
1965 "newly vforked process, which will start with a B<SIGSTOP>.  The PID for the "
1966 "new process can be retrieved with B<PTRACE_GETEVENTMSG>."
1967 msgstr ""
1968
1969 #. type: TP
1970 #: build/C/man2/ptrace.2:235
1971 #, no-wrap
1972 msgid "B<PTRACE_O_TRACECLONE> (since Linux 2.5.46)"
1973 msgstr ""
1974
1975 #. type: Plain text
1976 #: build/C/man2/ptrace.2:265
1977 msgid ""
1978 "Stop the child at the next B<clone>(2)  call with I<SIGTRAP | "
1979 "PTRACE_EVENT_CLONE\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
1980 "newly cloned process, which will start with a B<SIGSTOP>.  The PID for the "
1981 "new process can be retrieved with B<PTRACE_GETEVENTMSG>.  This option may "
1982 "not catch B<clone>(2)  calls in all cases.  If the child calls B<clone>(2)  "
1983 "with the B<CLONE_VFORK> flag, B<PTRACE_EVENT_VFORK> will be delivered "
1984 "instead if B<PTRACE_O_TRACEVFORK> is set; otherwise if the child calls "
1985 "B<clone>(2)  with the exit signal set to B<SIGCHLD>, B<PTRACE_EVENT_FORK> "
1986 "will be delivered if B<PTRACE_O_TRACEFORK> is set."
1987 msgstr ""
1988
1989 #. type: TP
1990 #: build/C/man2/ptrace.2:265
1991 #, no-wrap
1992 msgid "B<PTRACE_O_TRACEEXEC> (since Linux 2.5.46)"
1993 msgstr ""
1994
1995 #. type: Plain text
1996 #: build/C/man2/ptrace.2:270
1997 msgid ""
1998 "Stop the child at the next B<execve>(2)  call with I<SIGTRAP | "
1999 "PTRACE_EVENT_EXEC\\ E<lt>E<lt>\\ 8>."
2000 msgstr ""
2001
2002 #. type: TP
2003 #: build/C/man2/ptrace.2:270
2004 #, no-wrap
2005 msgid "B<PTRACE_O_TRACEVFORKDONE> (since Linux 2.5.60)"
2006 msgstr ""
2007
2008 #. type: Plain text
2009 #: build/C/man2/ptrace.2:275
2010 msgid ""
2011 "Stop the child at the completion of the next B<vfork>(2)  call with "
2012 "I<SIGTRAP | PTRACE_EVENT_VFORK_DONE\\ E<lt>E<lt>\\ 8>."
2013 msgstr ""
2014
2015 #. type: TP
2016 #: build/C/man2/ptrace.2:275
2017 #, no-wrap
2018 msgid "B<PTRACE_O_TRACEEXIT> (since Linux 2.5.60)"
2019 msgstr ""
2020
2021 #. type: Plain text
2022 #: build/C/man2/ptrace.2:286
2023 msgid ""
2024 "Stop the child at exit with I<SIGTRAP | PTRACE_EVENT_EXIT\\ E<lt>E<lt>\\ "
2025 "8>.  The child's exit status can be retrieved with B<PTRACE_GETEVENTMSG>.  "
2026 "This stop will be done early during process exit when registers are still "
2027 "available, allowing the tracer to see where the exit occurred, whereas the "
2028 "normal exit notification is done after the process is finished exiting.  "
2029 "Even though context is available, the tracer cannot prevent the exit from "
2030 "happening at this point."
2031 msgstr ""
2032
2033 #. type: TP
2034 #: build/C/man2/ptrace.2:287
2035 #, no-wrap
2036 msgid "B<PTRACE_GETEVENTMSG> (since Linux 2.5.46)"
2037 msgstr ""
2038
2039 #. type: Plain text
2040 #: build/C/man2/ptrace.2:307
2041 msgid ""
2042 "Retrieve a message (as an I<unsigned long>)  about the ptrace event that "
2043 "just happened, placing it in the location I<data> in the parent.  For "
2044 "B<PTRACE_EVENT_EXIT> this is the child's exit status.  For "
2045 "B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK> and B<PTRACE_EVENT_CLONE> this "
2046 "is the PID of the new process.  Since Linux 2.6.18, the PID of the new "
2047 "process is also available for B<PTRACE_EVENT_VFORK_DONE>.  (I<addr> is "
2048 "ignored.)"
2049 msgstr ""
2050
2051 #. type: TP
2052 #: build/C/man2/ptrace.2:307
2053 #, no-wrap
2054 msgid "B<PTRACE_CONT>"
2055 msgstr ""
2056
2057 #. type: Plain text
2058 #: build/C/man2/ptrace.2:317
2059 msgid ""
2060 "Restarts the stopped child process.  If I<data> is nonzero and not "
2061 "B<SIGSTOP>, it is interpreted as a signal to be delivered to the child; "
2062 "otherwise, no signal is delivered.  Thus, for example, the parent can "
2063 "control whether a signal sent to the child is delivered or not.  (I<addr> is "
2064 "ignored.)"
2065 msgstr ""
2066
2067 #. type: TP
2068 #: build/C/man2/ptrace.2:317
2069 #, no-wrap
2070 msgid "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>"
2071 msgstr ""
2072
2073 #. type: Plain text
2074 #: build/C/man2/ptrace.2:341
2075 msgid ""
2076 "Restarts the stopped child as for B<PTRACE_CONT>, but arranges for the child "
2077 "to be stopped at the next entry to or exit from a system call, or after "
2078 "execution of a single instruction, respectively.  (The child will also, as "
2079 "usual, be stopped upon receipt of a signal.)  From the parent's perspective, "
2080 "the child will appear to have been stopped by receipt of a B<SIGTRAP>.  So, "
2081 "for B<PTRACE_SYSCALL>, for example, the idea is to inspect the arguments to "
2082 "the system call at the first stop, then do another B<PTRACE_SYSCALL> and "
2083 "inspect the return value of the system call at the second stop.  The I<data> "
2084 "argument is treated as for B<PTRACE_CONT>.  (I<addr> is ignored.)"
2085 msgstr ""
2086
2087 #. type: TP
2088 #: build/C/man2/ptrace.2:341
2089 #, no-wrap
2090 msgid "B<PTRACE_SYSEMU>, B<PTRACE_SYSEMU_SINGLESTEP> (since Linux 2.6.14)"
2091 msgstr ""
2092
2093 #. type: Plain text
2094 #: build/C/man2/ptrace.2:359
2095 msgid ""
2096 "For B<PTRACE_SYSEMU>, continue and stop on entry to the next syscall, which "
2097 "will not be executed.  For B<PTRACE_SYSEMU_SINGLESTEP>, do the same but also "
2098 "singlestep if not a syscall.  This call is used by programs like User Mode "
2099 "Linux that want to emulate all the child's system calls.  The I<data> "
2100 "argument is treated as for B<PTRACE_CONT>.  (I<addr> is ignored; not "
2101 "supported on all architectures.)"
2102 msgstr ""
2103
2104 #. type: TP
2105 #: build/C/man2/ptrace.2:359
2106 #, no-wrap
2107 msgid "B<PTRACE_KILL>"
2108 msgstr ""
2109
2110 #. type: Plain text
2111 #: build/C/man2/ptrace.2:365
2112 msgid ""
2113 "Sends the child a B<SIGKILL> to terminate it.  (I<addr> and I<data> are "
2114 "ignored.)"
2115 msgstr ""
2116
2117 #. type: TP
2118 #: build/C/man2/ptrace.2:365
2119 #, no-wrap
2120 msgid "B<PTRACE_ATTACH>"
2121 msgstr ""
2122
2123 #. type: Plain text
2124 #: build/C/man2/ptrace.2:386
2125 msgid ""
2126 "Attaches to the process specified in I<pid>, making it a traced \"child\" of "
2127 "the calling process; the behavior of the child is as if it had done a "
2128 "B<PTRACE_TRACEME>.  The calling process actually becomes the parent of the "
2129 "child process for most purposes (e.g., it will receive notification of child "
2130 "events and appears in B<ps>(1)  output as the child's parent), but a "
2131 "B<getppid>(2)  by the child will still return the PID of the original "
2132 "parent.  The child is sent a B<SIGSTOP>, but will not necessarily have "
2133 "stopped by the completion of this call; use B<wait>(2)  to wait for the "
2134 "child to stop.  (I<addr> and I<data> are ignored.)"
2135 msgstr ""
2136
2137 #. type: TP
2138 #: build/C/man2/ptrace.2:386
2139 #, no-wrap
2140 msgid "B<PTRACE_DETACH>"
2141 msgstr ""
2142
2143 #. type: Plain text
2144 #: build/C/man2/ptrace.2:399
2145 msgid ""
2146 "Restarts the stopped child as for B<PTRACE_CONT>, but first detaches from "
2147 "the process, undoing the reparenting effect of B<PTRACE_ATTACH>, and the "
2148 "effects of B<PTRACE_TRACEME>.  Although perhaps not intended, under Linux a "
2149 "traced child can be detached in this way regardless of which method was used "
2150 "to initiate tracing.  (I<addr> is ignored.)"
2151 msgstr ""
2152
2153 #. type: Plain text
2154 #: build/C/man2/ptrace.2:412
2155 msgid ""
2156 "On success, B<PTRACE_PEEK*> requests return the requested data, while other "
2157 "requests return zero.  On error, all requests return -1, and I<errno> is set "
2158 "appropriately.  Since the value returned by a successful B<PTRACE_PEEK*> "
2159 "request may be -1, the caller must check I<errno> after such requests to "
2160 "determine whether or not an error occurred."
2161 msgstr ""
2162
2163 #. type: Plain text
2164 #: build/C/man2/ptrace.2:417
2165 msgid "(i386 only) There was an error with allocating or freeing a debug register."
2166 msgstr ""
2167
2168 #. type: Plain text
2169 #: build/C/man2/ptrace.2:428
2170 msgid ""
2171 "There was an attempt to read from or write to an invalid area in the "
2172 "parent's or child's memory, probably because the area wasn't mapped or "
2173 "accessible.  Unfortunately, under Linux, different variations of this fault "
2174 "will return B<EIO> or B<EFAULT> more or less arbitrarily."
2175 msgstr ""
2176
2177 #. type: Plain text
2178 #: build/C/man2/ptrace.2:431
2179 msgid "An attempt was made to set an invalid option."
2180 msgstr ""
2181
2182 #. type: Plain text
2183 #: build/C/man2/ptrace.2:437
2184 msgid ""
2185 "I<request> is invalid, or an attempt was made to read from or write to an "
2186 "invalid area in the parent's or child's memory, or there was a "
2187 "word-alignment violation, or an invalid signal was specified during a "
2188 "restart request."
2189 msgstr ""
2190
2191 #. type: Plain text
2192 #: build/C/man2/ptrace.2:449
2193 msgid ""
2194 "The specified process cannot be traced.  This could be because the parent "
2195 "has insufficient privileges (the required capability is B<CAP_SYS_PTRACE>); "
2196 "unprivileged processes cannot trace processes that they cannot send signals "
2197 "to or those running set-user-ID/set-group-ID programs, for obvious reasons.  "
2198 "Alternatively, the process may already be being traced, or be B<init>(8)  "
2199 "(PID 1)."
2200 msgstr ""
2201
2202 #. type: TP
2203 #: build/C/man2/ptrace.2:449 build/C/man2/quotactl.2:459 build/C/man2/quotactl.2:502
2204 #, no-wrap
2205 msgid "B<ESRCH>"
2206 msgstr ""
2207
2208 #. type: Plain text
2209 #: build/C/man2/ptrace.2:453
2210 msgid ""
2211 "The specified process does not exist, or is not currently being traced by "
2212 "the caller, or is not stopped (for requests that require that)."
2213 msgstr ""
2214
2215 #. type: Plain text
2216 #: build/C/man2/ptrace.2:455
2217 msgid "SVr4, 4.3BSD."
2218 msgstr ""
2219
2220 #. type: Plain text
2221 #: build/C/man2/ptrace.2:466
2222 msgid ""
2223 "Although arguments to B<ptrace>()  are interpreted according to the "
2224 "prototype given, glibc currently declares B<ptrace>()  as a variadic "
2225 "function with only the I<request> argument fixed.  This means that unneeded "
2226 "trailing arguments may be omitted, though doing so makes use of undocumented "
2227 "B<gcc>(1)  behavior."
2228 msgstr ""
2229
2230 #. type: Plain text
2231 #: build/C/man2/ptrace.2:469
2232 msgid "B<init>(8), the process with PID 1, may not be traced."
2233 msgstr ""
2234
2235 #.  See http://lkml.org/lkml/2008/5/8/375
2236 #. type: Plain text
2237 #: build/C/man2/ptrace.2:476
2238 msgid ""
2239 "The layout of the contents of memory and the USER area are quite OS- and "
2240 "architecture-specific.  The offset supplied, and the data returned, might "
2241 "not entirely match with the definition of I<struct user>."
2242 msgstr ""
2243
2244 #. type: Plain text
2245 #: build/C/man2/ptrace.2:479
2246 msgid ""
2247 "The size of a \"word\" is determined by the OS variant (e.g., for 32-bit "
2248 "Linux it is 32 bits, etc.)."
2249 msgstr ""
2250
2251 #. type: Plain text
2252 #: build/C/man2/ptrace.2:488
2253 msgid ""
2254 "Tracing causes a few subtle differences in the semantics of traced "
2255 "processes.  For example, if a process is attached to with B<PTRACE_ATTACH>, "
2256 "its original parent can no longer receive notification via B<wait>(2)  when "
2257 "it stops, and there is no way for the new parent to effectively simulate "
2258 "this notification."
2259 msgstr ""
2260
2261 #. type: Plain text
2262 #: build/C/man2/ptrace.2:502
2263 msgid ""
2264 "When the parent receives an event with B<PTRACE_EVENT_*> set, the child is "
2265 "not in the normal signal delivery path.  This means the parent cannot do "
2266 "B<ptrace>(PTRACE_CONT)  with a signal or B<ptrace>(PTRACE_KILL).  B<kill>(2)  "
2267 "with a B<SIGKILL> signal can be used instead to kill the child process after "
2268 "receiving one of these messages."
2269 msgstr ""
2270
2271 #. type: Plain text
2272 #: build/C/man2/ptrace.2:510
2273 msgid ""
2274 "This page documents the way the B<ptrace>()  call works currently in Linux.  "
2275 "Its behavior differs noticeably on other flavors of UNIX.  In any case, use "
2276 "of B<ptrace>()  is highly OS- and architecture-specific."
2277 msgstr ""
2278
2279 #. type: Plain text
2280 #: build/C/man2/ptrace.2:518
2281 msgid ""
2282 "The SunOS man page describes B<ptrace>()  as \"unique and arcane\", which it "
2283 "is.  The proc-based debugging interface present in Solaris 2 implements a "
2284 "superset of B<ptrace>()  functionality in a more powerful and uniform way."
2285 msgstr ""
2286
2287 #. type: Plain text
2288 #: build/C/man2/ptrace.2:530
2289 msgid ""
2290 "On hosts with 2.6 kernel headers, B<PTRACE_SETOPTIONS> is declared with a "
2291 "different value than the one for 2.4.  This leads to applications compiled "
2292 "with such headers failing when run on 2.4 kernels.  This can be worked "
2293 "around by redefining B<PTRACE_SETOPTIONS> to B<PTRACE_OLDSETOPTIONS>, if "
2294 "that is defined."
2295 msgstr ""
2296
2297 #. type: Plain text
2298 #: build/C/man2/ptrace.2:539
2299 msgid ""
2300 "B<gdb>(1), B<strace>(1), B<execve>(2), B<fork>(2), B<signal>(2), B<wait>(2), "
2301 "B<exec>(3), B<capabilities>(7)"
2302 msgstr ""
2303
2304 #. type: TH
2305 #: build/C/man2/quotactl.2:25
2306 #, no-wrap
2307 msgid "QUOTACTL"
2308 msgstr ""
2309
2310 #. type: TH
2311 #: build/C/man2/quotactl.2:25
2312 #, no-wrap
2313 msgid "2010-06-16"
2314 msgstr ""
2315
2316 #. type: Plain text
2317 #: build/C/man2/quotactl.2:28
2318 msgid "quotactl - manipulate disk quotas"
2319 msgstr ""
2320
2321 #. type: Plain text
2322 #: build/C/man2/quotactl.2:32
2323 #, no-wrap
2324 msgid ""
2325 "B<#include E<lt>sys/quota.hE<gt>>\n"
2326 "B<#include E<lt>xfs/xqm.hE<gt>>\n"
2327 msgstr ""
2328
2329 #. type: Plain text
2330 #: build/C/man2/quotactl.2:35
2331 #, no-wrap
2332 msgid ""
2333 "B<int quotactl(int >I<cmd>B<, const char *>I<special>B<, int >I<id>B<, "
2334 "caddr_t >I<addr>B<);>\n"
2335 msgstr ""
2336
2337 #. type: Plain text
2338 #: build/C/man2/quotactl.2:47
2339 msgid ""
2340 "The quota system can be used to set per-user and per-group limits on the "
2341 "amount of disk space used on a file system.  For each user and/or group, a "
2342 "soft limit and a hard limit can be set for each file system.  The hard limit "
2343 "can't be exceeded.  The soft limit can be exceeded, but warnings will "
2344 "ensue.  Moreover, the user can't exceed the soft limit for more than one "
2345 "week (by default) at a time; after this time, the soft limit counts as a "
2346 "hard limit."
2347 msgstr ""
2348
2349 #. type: Plain text
2350 #: build/C/man2/quotactl.2:72
2351 msgid ""
2352 "The B<quotactl>()  call manipulates disk quotas.  The I<cmd> argument "
2353 "indicates a command to be applied to the user or group ID specified in "
2354 "I<id>.  To initialize the I<cmd> argument, use the I<QCMD(subcmd, type)> "
2355 "macro.  The I<type> value is either B<USRQUOTA>, for user quotas, or "
2356 "B<GRPQUOTA>, for group quotas.  The I<subcmd> value is described below."
2357 msgstr ""
2358
2359 #. type: Plain text
2360 #: build/C/man2/quotactl.2:77
2361 msgid ""
2362 "The I<special> argument is a pointer to a null-terminated string containing "
2363 "the pathname of the (mounted) block special device for the file system being "
2364 "manipulated."
2365 msgstr ""
2366
2367 #. type: Plain text
2368 #: build/C/man2/quotactl.2:85
2369 msgid ""
2370 "The I<addr> argument is the address of an optional, command-specific, data "
2371 "structure that is copied in or out of the system.  The interpretation of "
2372 "I<addr> is given with each command below."
2373 msgstr ""
2374
2375 #. type: Plain text
2376 #: build/C/man2/quotactl.2:89
2377 msgid "The I<subcmd> value is one of the following:"
2378 msgstr ""
2379
2380 #. type: TP
2381 #: build/C/man2/quotactl.2:89
2382 #, no-wrap
2383 msgid "B<Q_QUOTAON>"
2384 msgstr ""
2385
2386 #. type: Plain text
2387 #: build/C/man2/quotactl.2:96
2388 msgid ""
2389 "Turn on quotas for a file system.  The I<id> argument is the identification "
2390 "number of the quota format to be used.  Currently, there are three supported "
2391 "quota formats:"
2392 msgstr ""
2393
2394 #. type: TP
2395 #: build/C/man2/quotactl.2:97
2396 #, no-wrap
2397 msgid "B<QFMT_VFS_OLD>"
2398 msgstr ""
2399
2400 #. type: Plain text
2401 #: build/C/man2/quotactl.2:100
2402 msgid "The original quota format."
2403 msgstr ""
2404
2405 #. type: TP
2406 #: build/C/man2/quotactl.2:100
2407 #, no-wrap
2408 msgid "B<QFMT_VFS_V0>"
2409 msgstr ""
2410
2411 #. type: Plain text
2412 #: build/C/man2/quotactl.2:104
2413 msgid ""
2414 "The standard VFS v0 quota format, which can handle 32-bit UIDs and GIDs and "
2415 "quota limits up to 2^42 bytes and 2^32 inodes."
2416 msgstr ""
2417
2418 #. type: TP
2419 #: build/C/man2/quotactl.2:104
2420 #, no-wrap
2421 msgid "B<QFMT_VFS_V1>"
2422 msgstr ""
2423
2424 #. type: Plain text
2425 #: build/C/man2/quotactl.2:108
2426 msgid ""
2427 "A quota format that can handle 32-bit UIDs and GIDs and quota limits of 2^64 "
2428 "bytes and 2^64 inodes."
2429 msgstr ""
2430
2431 #. type: Plain text
2432 #: build/C/man2/quotactl.2:119
2433 msgid ""
2434 "The I<addr> argument points to the pathname of a file containing the quotas "
2435 "for the file system.  The quota file must exist; it is normally created with "
2436 "the B<quotacheck>(8)  program.  This operation requires privilege "
2437 "(B<CAP_SYS_ADMIN>)."
2438 msgstr ""
2439
2440 #. type: TP
2441 #: build/C/man2/quotactl.2:119
2442 #, no-wrap
2443 msgid "B<Q_QUOTAOFF>"
2444 msgstr ""
2445
2446 #. type: Plain text
2447 #: build/C/man2/quotactl.2:129
2448 msgid ""
2449 "Turn off quotas for a file system.  The I<addr> and I<id> arguments are "
2450 "ignored.  This operation requires privilege (B<CAP_SYS_ADMIN>)."
2451 msgstr ""
2452
2453 #. type: TP
2454 #: build/C/man2/quotactl.2:129
2455 #, no-wrap
2456 msgid "B<Q_GETQUOTA>"
2457 msgstr ""
2458
2459 #. type: Plain text
2460 #: build/C/man2/quotactl.2:140
2461 msgid ""
2462 "Get disk quota limits and current usage for user or group I<id>.  The "
2463 "I<addr> argument is a pointer to a I<dqblk> structure defined in "
2464 "I<E<lt>sys/quota.hE<gt>> as follows:"
2465 msgstr ""
2466
2467 #. type: Plain text
2468 #: build/C/man2/quotactl.2:145 build/C/man2/quotactl.2:232
2469 #, no-wrap
2470 msgid ""
2471 "/* uint64_t is an unsigned 64-bit integer;\n"
2472 "   uint32_t is an unsigned 32-bit integer */\n"
2473 msgstr ""
2474
2475 #. type: Plain text
2476 #: build/C/man2/quotactl.2:165
2477 #, no-wrap
2478 msgid ""
2479 "struct dqblk {          /* Definition since Linux 2.4.22 */\n"
2480 "    uint64_t dqb_bhardlimit;   /* absolute limit on disk\n"
2481 "                                  quota blocks alloc */\n"
2482 "    uint64_t dqb_bsoftlimit;   /* preferred limit on\n"
2483 "                                  disk quota blocks */\n"
2484 "    uint64_t dqb_curspace;     /* current quota block\n"
2485 "                                  count */\n"
2486 "    uint64_t dqb_ihardlimit;   /* maximum number of\n"
2487 "                                  allocated inodes */\n"
2488 "    uint64_t dqb_isoftlimit;   /* preferred inode limit */\n"
2489 "    uint64_t dqb_curinodes;    /* current number of\n"
2490 "                                  allocated inodes */\n"
2491 "    uint64_t dqb_btime;        /* time limit for excessive\n"
2492 "                                  disk use */\n"
2493 "    uint64_t dqb_itime;        /* time limit for excessive\n"
2494 "                                  files */\n"
2495 "    uint32_t dqb_valid;        /* bit mask of QIF_*\n"
2496 "                                  constants */\n"
2497 "};\n"
2498 msgstr ""
2499
2500 #. type: Plain text
2501 #: build/C/man2/quotactl.2:168
2502 #, no-wrap
2503 msgid ""
2504 "/* Flags in dqb_valid that indicate which fields in\n"
2505 "   dqblk structure are valid. */\n"
2506 msgstr ""
2507
2508 #. type: Plain text
2509 #: build/C/man2/quotactl.2:179
2510 #, no-wrap
2511 msgid ""
2512 "#define QIF_BLIMITS   1\n"
2513 "#define QIF_SPACE     2\n"
2514 "#define QIF_ILIMITS   4\n"
2515 "#define QIF_INODES    8\n"
2516 "#define QIF_BTIME     16\n"
2517 "#define QIF_ITIME     32\n"
2518 "#define QIF_LIMITS    (QIF_BLIMITS | QIF_ILIMITS)\n"
2519 "#define QIF_USAGE     (QIF_SPACE | QIF_INODES)\n"
2520 "#define QIF_TIMES     (QIF_BTIME | QIF_ITIME)\n"
2521 "#define QIF_ALL       (QIF_LIMITS | QIF_USAGE | QIF_TIMES)\n"
2522 msgstr ""
2523
2524 #. type: Plain text
2525 #: build/C/man2/quotactl.2:196
2526 msgid ""
2527 "The I<dqb_valid> field is a bit mask that is set to indicate the entries in "
2528 "the I<dqblk> structure that are valid.  Currently, the kernel fills in all "
2529 "entries of the I<dqblk> structure and marks them as valid in the "
2530 "I<dqb_valid> field.  Unprivileged users may retrieve only their own quotas; "
2531 "a privileged user (B<CAP_SYS_ADMIN>)  can retrieve the quotas of any user."
2532 msgstr ""
2533
2534 #. type: TP
2535 #: build/C/man2/quotactl.2:196
2536 #, no-wrap
2537 msgid "B<Q_SETQUOTA>"
2538 msgstr ""
2539
2540 #. type: Plain text
2541 #: build/C/man2/quotactl.2:216
2542 msgid ""
2543 "Set quota information for user or group I<id>, using the information "
2544 "supplied in the I<dqblk> structure pointed to by I<addr>.  The I<dqb_valid> "
2545 "field of the I<dqblk> structure indicates which entries in the structure "
2546 "have been set by the caller.  This operation supersedes the B<Q_SETQLIM> and "
2547 "B<Q_SETUSE> operations in the previous quota interfaces.  This operation "
2548 "requires privilege (B<CAP_SYS_ADMIN>)."
2549 msgstr ""
2550
2551 #. type: TP
2552 #: build/C/man2/quotactl.2:216
2553 #, no-wrap
2554 msgid "B<Q_GETINFO>"
2555 msgstr ""
2556
2557 #. type: Plain text
2558 #: build/C/man2/quotactl.2:227
2559 msgid ""
2560 "Get information (like grace times) about quotafile.  The I<addr> argument "
2561 "should be a pointer to a I<dqinfo> structure.  This structure is defined in "
2562 "I<E<lt>sys/quota.hE<gt>> as follows:"
2563 msgstr ""
2564
2565 #. type: Plain text
2566 #: build/C/man2/quotactl.2:236
2567 #, no-wrap
2568 msgid ""
2569 "struct dqinfo {         /* Defined since kernel 2.4.22 */\n"
2570 "    uint64_t dqi_bgrace;    /* Time before block soft limit\n"
2571 "                               becomes hard limit */\n"
2572 msgstr ""
2573
2574 #. type: Plain text
2575 #: build/C/man2/quotactl.2:243
2576 #, no-wrap
2577 msgid ""
2578 "    uint64_t dqi_igrace;    /* Time before inode soft limit\n"
2579 "                               becomes hard limit */\n"
2580 "    uint32_t dqi_flags;     /* Flags for quotafile\n"
2581 "                               (DQF_*) */\n"
2582 "    uint32_t dqi_valid;\n"
2583 "};\n"
2584 msgstr ""
2585
2586 #. type: Plain text
2587 #: build/C/man2/quotactl.2:245
2588 #, no-wrap
2589 msgid "/* Bits for dqi_flags */\n"
2590 msgstr ""
2591
2592 #. type: Plain text
2593 #: build/C/man2/quotactl.2:247
2594 #, no-wrap
2595 msgid "/* Quota format QFMT_VFS_OLD */\n"
2596 msgstr ""
2597
2598 #. type: Plain text
2599 #: build/C/man2/quotactl.2:249
2600 #, no-wrap
2601 msgid "#define V1_DQF_RSQUASH\t1   /* Root squash enabled */\n"
2602 msgstr ""
2603
2604 #. type: Plain text
2605 #: build/C/man2/quotactl.2:251
2606 #, no-wrap
2607 msgid "/* Other quota formats have no dqi_flags bits defined */\n"
2608 msgstr ""
2609
2610 #. type: Plain text
2611 #: build/C/man2/quotactl.2:254
2612 #, no-wrap
2613 msgid ""
2614 "/* Flags in dqi_valid that indicate which fields in\n"
2615 "   dqinfo structure are valid. */\n"
2616 msgstr ""
2617
2618 #. type: Plain text
2619 #: build/C/man2/quotactl.2:259
2620 #, no-wrap
2621 msgid ""
2622 "# define IIF_BGRACE\t1\n"
2623 "# define IIF_IGRACE\t2\n"
2624 "# define IIF_FLAGS\t4\n"
2625 "# define IIF_ALL\t(IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)\n"
2626 msgstr ""
2627
2628 #. type: Plain text
2629 #: build/C/man2/quotactl.2:275
2630 msgid ""
2631 "The I<dqi_valid> field in the I<dqinfo> structure indicates the entries in "
2632 "the structure that are valid.  Currently, the kernel fills in all entries of "
2633 "the I<dqinfo> structure and marks them all as valid in the I<dqi_valid> "
2634 "field.  The I<id> argument is ignored."
2635 msgstr ""
2636
2637 #. type: TP
2638 #: build/C/man2/quotactl.2:275
2639 #, no-wrap
2640 msgid "B<Q_SETINFO>"
2641 msgstr ""
2642
2643 #. type: Plain text
2644 #: build/C/man2/quotactl.2:299
2645 msgid ""
2646 "Set information about quotafile.  The I<addr> argument should be a pointer "
2647 "to a I<dqinfo> structure.  The I<dqi_valid> field of the I<dqinfo> structure "
2648 "indicates the entries in the structure that have been set by the caller.  "
2649 "This operation supersedes the B<Q_SETGRACE> and B<Q_SETFLAGS> operations in "
2650 "the previous quota interfaces.  The I<id> argument is ignored.  This "
2651 "operation requires privilege (B<CAP_SYS_ADMIN>)."
2652 msgstr ""
2653
2654 #. type: TP
2655 #: build/C/man2/quotactl.2:299
2656 #, no-wrap
2657 msgid "B<Q_GETFMT>"
2658 msgstr ""
2659
2660 #. type: Plain text
2661 #: build/C/man2/quotactl.2:306
2662 msgid ""
2663 "Get quota format used on the specified file system.  The I<addr> argument "
2664 "should be a pointer to a 4-byte buffer where the format number will be "
2665 "stored."
2666 msgstr ""
2667
2668 #. type: TP
2669 #: build/C/man2/quotactl.2:306
2670 #, no-wrap
2671 msgid "B<Q_SYNC>"
2672 msgstr ""
2673
2674 #. type: Plain text
2675 #: build/C/man2/quotactl.2:317
2676 msgid ""
2677 "Update the on-disk copy of quota usages for a file system.  If I<special> is "
2678 "NULL, then all file systems with active quotas are sync'ed.  The I<addr> and "
2679 "I<id> arguments are ignored."
2680 msgstr ""
2681
2682 #. type: TP
2683 #: build/C/man2/quotactl.2:317
2684 #, no-wrap
2685 msgid "B<Q_GETSTATS>"
2686 msgstr ""
2687
2688 #.  Q_GETSTATS was removed in kernel 2.4.22.
2689 #. type: Plain text
2690 #: build/C/man2/quotactl.2:337
2691 msgid ""
2692 "Get statistics and other generic information about the quota subsystem.  The "
2693 "I<addr> argument should be a pointer to a I<dqstats> structure in which data "
2694 "should be stored.  This structure is defined in I<E<lt>sys/quota.hE<gt>.> "
2695 "The I<special> and I<id> arguments are ignored.  This operation is obsolete "
2696 "and not supported by recent kernels.  Files in I</proc/sys/fs/quota/> carry "
2697 "the information instead."
2698 msgstr ""
2699
2700 #. type: Plain text
2701 #: build/C/man2/quotactl.2:340
2702 msgid ""
2703 "For XFS file systems making use of the XFS Quota Manager (XQM), the above "
2704 "commands are bypassed and the following commands are used:"
2705 msgstr ""
2706
2707 #. type: TP
2708 #: build/C/man2/quotactl.2:340
2709 #, no-wrap
2710 msgid "B<Q_XQUOTAON>"
2711 msgstr ""
2712
2713 #. type: Plain text
2714 #: build/C/man2/quotactl.2:361
2715 msgid ""
2716 "Turn on quotas for an XFS file system.  XFS provides the ability to turn "
2717 "on/off quota limit enforcement with quota accounting.  Therefore, XFS "
2718 "expects I<addr> to be a pointer to an I<unsigned int> that contains either "
2719 "the flags B<XFS_QUOTA_UDQ_ACCT> and/or B<XFS_QUOTA_UDQ_ENFD> (for user "
2720 "quota), or B<XFS_QUOTA_GDQ_ACCT> and/or B<XFS_QUOTA_GDQ_ENFD> (for group "
2721 "quota), as defined in I<E<lt>xfs/xqm.hE<gt>>.  This operation requires "
2722 "privilege (B<CAP_SYS_ADMIN>)."
2723 msgstr ""
2724
2725 #. type: TP
2726 #: build/C/man2/quotactl.2:361
2727 #, no-wrap
2728 msgid "B<Q_XQUOTAOFF>"
2729 msgstr ""
2730
2731 #. type: Plain text
2732 #: build/C/man2/quotactl.2:372
2733 msgid ""
2734 "Turn off quotas for an XFS file system.  As with B<Q_QUOTAON>, XFS file "
2735 "systems expect a pointer to an I<unsigned int> that specifies whether quota "
2736 "accounting and/or limit enforcement need to be turned off.  This operation "
2737 "requires privilege (B<CAP_SYS_ADMIN>)."
2738 msgstr ""
2739
2740 #. type: TP
2741 #: build/C/man2/quotactl.2:372
2742 #, no-wrap
2743 msgid "B<Q_XGETQUOTA>"
2744 msgstr ""
2745
2746 #. type: Plain text
2747 #: build/C/man2/quotactl.2:386
2748 msgid ""
2749 "Get disk quota limits and current usage for user I<id>.  The I<addr> "
2750 "argument is a pointer to an I<fs_disk_quota> structure (defined in "
2751 "I<E<lt>xfs/xqm.hE<gt>>).  Unprivileged users may retrieve only their own "
2752 "quotas; a privileged user (B<CAP_SYS_ADMIN>)  may retrieve the quotas of any "
2753 "user."
2754 msgstr ""
2755
2756 #. type: TP
2757 #: build/C/man2/quotactl.2:386
2758 #, no-wrap
2759 msgid "B<Q_XSETQLIM>"
2760 msgstr ""
2761
2762 #. type: Plain text
2763 #: build/C/man2/quotactl.2:398
2764 msgid ""
2765 "Set disk quota limits for user I<id>.  The I<addr> argument is a pointer to "
2766 "an I<fs_disk_quota> structure (defined in I<E<lt>xfs/xqm.hE<gt>>).  This "
2767 "operation requires privilege (B<CAP_SYS_ADMIN>)."
2768 msgstr ""
2769
2770 #. type: TP
2771 #: build/C/man2/quotactl.2:398
2772 #, no-wrap
2773 msgid "B<Q_XGETQSTAT>"
2774 msgstr ""
2775
2776 #. type: Plain text
2777 #: build/C/man2/quotactl.2:406
2778 msgid ""
2779 "Returns an I<fs_quota_stat> structure containing XFS file system specific "
2780 "quota information.  This is useful for finding out how much space is used to "
2781 "store quota information, and also to get quotaon/off status of a given local "
2782 "XFS file system."
2783 msgstr ""
2784
2785 #. type: TP
2786 #: build/C/man2/quotactl.2:406
2787 #, no-wrap
2788 msgid "B<Q_XQUOTARM>"
2789 msgstr ""
2790
2791 #. type: Plain text
2792 #: build/C/man2/quotactl.2:410
2793 msgid ""
2794 "Free the disk space taken by disk quotas.  Quotas must have already been "
2795 "turned off."
2796 msgstr ""
2797
2798 #. type: Plain text
2799 #: build/C/man2/quotactl.2:417
2800 msgid ""
2801 "There is no command equivalent to B<Q_SYNC> for XFS since B<sync>(1)  writes "
2802 "quota information to disk (in addition to the other file system metadata "
2803 "that it writes out)."
2804 msgstr ""
2805
2806 #. type: SH
2807 #: build/C/man2/quotactl.2:417
2808 #, no-wrap
2809 msgid "RETURN VALUES"
2810 msgstr ""
2811
2812 #. type: Plain text
2813 #: build/C/man2/quotactl.2:425
2814 msgid ""
2815 "On success, B<quotactl>()  returns 0; on error -1 is returned, and I<errno> "
2816 "is set to indicate the error."
2817 msgstr ""
2818
2819 #. type: Plain text
2820 #: build/C/man2/quotactl.2:432
2821 msgid "I<addr> or I<special> is invalid."
2822 msgstr ""
2823
2824 #. type: Plain text
2825 #: build/C/man2/quotactl.2:438
2826 msgid "I<cmd> or I<type> is invalid."
2827 msgstr ""
2828
2829 #. type: TP
2830 #: build/C/man2/quotactl.2:438
2831 #, no-wrap
2832 msgid "B<ENOENT>"
2833 msgstr ""
2834
2835 #. type: Plain text
2836 #: build/C/man2/quotactl.2:445
2837 msgid "The file specified by I<special> or I<addr> does not exist."
2838 msgstr ""
2839
2840 #. type: Plain text
2841 #: build/C/man2/quotactl.2:450
2842 msgid "The kernel has not been compiled with the B<CONFIG_QUOTA> option."
2843 msgstr ""
2844
2845 #. type: TP
2846 #: build/C/man2/quotactl.2:450
2847 #, no-wrap
2848 msgid "B<ENOTBLK>"
2849 msgstr ""
2850
2851 #. type: Plain text
2852 #: build/C/man2/quotactl.2:454
2853 msgid "I<special> is not a block device."
2854 msgstr ""
2855
2856 #. type: Plain text
2857 #: build/C/man2/quotactl.2:459
2858 msgid ""
2859 "The caller lacked the required privilege (B<CAP_SYS_ADMIN>)  for the "
2860 "specified operation."
2861 msgstr ""
2862
2863 #. type: Plain text
2864 #: build/C/man2/quotactl.2:463
2865 msgid ""
2866 "No disk quota is found for the indicated user.  Quotas have not been turned "
2867 "on for this file system."
2868 msgstr ""
2869
2870 #. type: Plain text
2871 #: build/C/man2/quotactl.2:472
2872 msgid "If I<cmd> is B<Q_SETQUOTA>, B<quotactl>()  may also set I<errno> to:"
2873 msgstr ""
2874
2875 #. type: Plain text
2876 #: build/C/man2/quotactl.2:475
2877 msgid "Specified limits are out of range allowed by quota format."
2878 msgstr ""
2879
2880 #. type: Plain text
2881 #: build/C/man2/quotactl.2:484
2882 msgid "If I<cmd> is B<Q_QUOTAON>, B<quotactl>()  may also set I<errno> to:"
2883 msgstr ""
2884
2885 #. type: Plain text
2886 #: build/C/man2/quotactl.2:493
2887 msgid ""
2888 "The quota file pointed to by I<addr> exists, but is not a regular file; or, "
2889 "the quota file pointed to by I<addr> exists, but is not on the file system "
2890 "pointed to by I<special>."
2891 msgstr ""
2892
2893 #. type: Plain text
2894 #: build/C/man2/quotactl.2:499
2895 msgid "B<Q_QUOTAON> attempted, but another B<Q_QUOTAON> had already been performed."
2896 msgstr ""
2897
2898 #. type: Plain text
2899 #: build/C/man2/quotactl.2:502
2900 msgid "The quota file is corrupted."
2901 msgstr ""
2902
2903 #. type: Plain text
2904 #: build/C/man2/quotactl.2:505
2905 msgid "Specified quota format was not found."
2906 msgstr ""
2907
2908 #. type: Plain text
2909 #: build/C/man2/quotactl.2:510
2910 msgid "B<quota>(1), B<getrlimit>(2), B<quotacheck>(8), B<quotaon>(8)"
2911 msgstr ""
2912
2913 #. type: TH
2914 #: build/C/man2/sendfile.2:15
2915 #, no-wrap
2916 msgid "SENDFILE"
2917 msgstr ""
2918
2919 #. type: TH
2920 #: build/C/man2/sendfile.2:15
2921 #, no-wrap
2922 msgid "2011-09-14"
2923 msgstr ""
2924
2925 #. type: Plain text
2926 #: build/C/man2/sendfile.2:18
2927 msgid "sendfile - transfer data between file descriptors"
2928 msgstr ""
2929
2930 #. type: Plain text
2931 #: build/C/man2/sendfile.2:20
2932 msgid "B<#include E<lt>sys/sendfile.hE<gt>>"
2933 msgstr ""
2934
2935 #.  The below is too ugly. Comments about glibc versions belong
2936 #.  in the notes, not in the header.
2937 #
2938 #.  .B #include <features.h>
2939 #.  .br
2940 #.  .B #if (__GLIBC__==2 && __GLIBC_MINOR__>=1) || __GLIBC__>2
2941 #.  .br
2942 #.  .B #include <sys/sendfile.h>
2943 #.  .br
2944 #.  #else
2945 #.  .br
2946 #.  .B #include <sys/types.h>
2947 #.  .br
2948 #.  .B /* No system prototype before glibc 2.1. */
2949 #.  .br
2950 #.  .BI "ssize_t sendfile(int" " out_fd" ", int" " in_fd" ", off_t *" \
2951 #.                        offset ", size_t" " count" )
2952 #.  .br
2953 #.  .B #endif
2954 #. type: Plain text
2955 #: build/C/man2/sendfile.2:43
2956 msgid ""
2957 "B<ssize_t sendfile(int>I< out_fd>B<, int>I< in_fd>B<, off_t *>I<offset>B<, "
2958 "size_t>I< count>B<);>"
2959 msgstr ""
2960
2961 #. type: Plain text
2962 #: build/C/man2/sendfile.2:53
2963 msgid ""
2964 "B<sendfile>()  copies data between one file descriptor and another.  Because "
2965 "this copying is done within the kernel, B<sendfile>()  is more efficient "
2966 "than the combination of B<read>(2)  and B<write>(2), which would require "
2967 "transferring data to and from user space."
2968 msgstr ""
2969
2970 #. type: Plain text
2971 #: build/C/man2/sendfile.2:58
2972 msgid ""
2973 "I<in_fd> should be a file descriptor opened for reading and I<out_fd> should "
2974 "be a descriptor opened for writing."
2975 msgstr ""
2976
2977 #. type: Plain text
2978 #: build/C/man2/sendfile.2:79
2979 msgid ""
2980 "If I<offset> is not NULL, then it points to a variable holding the file "
2981 "offset from which B<sendfile>()  will start reading data from I<in_fd>.  "
2982 "When B<sendfile>()  returns, this variable will be set to the offset of the "
2983 "byte following the last byte that was read.  If I<offset> is not NULL, then "
2984 "B<sendfile>()  does not modify the current file offset of I<in_fd>; "
2985 "otherwise the current file offset is adjusted to reflect the number of bytes "
2986 "read from I<in_fd>."
2987 msgstr ""
2988
2989 #. type: Plain text
2990 #: build/C/man2/sendfile.2:86
2991 msgid ""
2992 "If I<offset> is NULL, then data will be read from I<in_fd> starting at the "
2993 "current file offset, and the file offset will be updated by the call."
2994 msgstr ""
2995
2996 #. type: Plain text
2997 #: build/C/man2/sendfile.2:89
2998 msgid "I<count> is the number of bytes to copy between the file descriptors."
2999 msgstr ""
3000
3001 #. type: Plain text
3002 #: build/C/man2/sendfile.2:96
3003 msgid ""
3004 "The I<in_fd> argument must correspond to a file which supports "
3005 "B<mmap>(2)-like operations (i.e., it cannot be a socket)."
3006 msgstr ""
3007
3008 #. type: Plain text
3009 #: build/C/man2/sendfile.2:104
3010 msgid ""
3011 "In Linux kernels before 2.6.33, I<out_fd> must refer to a socket.  Since "
3012 "Linux 2.6.33 it can be any file.  If it is a regular file, then "
3013 "B<sendfile>()  changes the file offset appropriately."
3014 msgstr ""
3015
3016 #. type: Plain text
3017 #: build/C/man2/sendfile.2:111
3018 msgid ""
3019 "If the transfer was successful, the number of bytes written to I<out_fd> is "
3020 "returned.  On error, -1 is returned, and I<errno> is set appropriately."
3021 msgstr ""
3022
3023 #. type: Plain text
3024 #: build/C/man2/sendfile.2:117
3025 msgid ""
3026 "Nonblocking I/O has been selected using B<O_NONBLOCK> and the write would "
3027 "block."
3028 msgstr ""
3029
3030 #. type: TP
3031 #: build/C/man2/sendfile.2:117 build/C/man2/splice.2:143 build/C/man2/vmsplice.2:123
3032 #, no-wrap
3033 msgid "B<EBADF>"
3034 msgstr ""
3035
3036 #. type: Plain text
3037 #: build/C/man2/sendfile.2:121
3038 msgid ""
3039 "The input file was not opened for reading or the output file was not opened "
3040 "for writing."
3041 msgstr ""
3042
3043 #. type: Plain text
3044 #: build/C/man2/sendfile.2:124
3045 msgid "Bad address."
3046 msgstr ""
3047
3048 #. type: Plain text
3049 #: build/C/man2/sendfile.2:130
3050 msgid ""
3051 "Descriptor is not valid or locked, or an B<mmap>(2)-like operation is not "
3052 "available for I<in_fd>."
3053 msgstr ""
3054
3055 #. type: Plain text
3056 #: build/C/man2/sendfile.2:134
3057 msgid "Unspecified error while reading from I<in_fd>."
3058 msgstr ""
3059
3060 #. type: Plain text
3061 #: build/C/man2/sendfile.2:138
3062 msgid "Insufficient memory to read from I<in_fd>."
3063 msgstr ""
3064
3065 #. type: Plain text
3066 #: build/C/man2/sendfile.2:144
3067 msgid ""
3068 "B<sendfile>()  is a new feature in Linux 2.2.  The include file "
3069 "I<E<lt>sys/sendfile.hE<gt>> is present since glibc 2.1."
3070 msgstr ""
3071
3072 #. type: Plain text
3073 #: build/C/man2/sendfile.2:146
3074 msgid "Not specified in POSIX.1-2001, or other standards."
3075 msgstr ""
3076
3077 #. type: Plain text
3078 #: build/C/man2/sendfile.2:151
3079 msgid ""
3080 "Other UNIX systems implement B<sendfile>()  with different semantics and "
3081 "prototypes.  It should not be used in portable programs."
3082 msgstr ""
3083
3084 #. type: Plain text
3085 #: build/C/man2/sendfile.2:161
3086 msgid ""
3087 "If you plan to use B<sendfile>()  for sending files to a TCP socket, but "
3088 "need to send some header data in front of the file contents, you will find "
3089 "it useful to employ the B<TCP_CORK> option, described in B<tcp>(7), to "
3090 "minimize the number of packets and to tune performance."
3091 msgstr ""
3092
3093 #. type: Plain text
3094 #: build/C/man2/sendfile.2:167
3095 msgid ""
3096 "In Linux 2.4 and earlier, I<out_fd> could also refer to a regular file, and "
3097 "B<sendfile>()  changed the current offset of that file."
3098 msgstr ""
3099
3100 #. type: Plain text
3101 #: build/C/man2/sendfile.2:179
3102 msgid ""
3103 "The original Linux B<sendfile>()  system call was not designed to handle "
3104 "large file offsets.  Consequently, Linux 2.4 added B<sendfile64>(), with a "
3105 "wider type for the I<offset> argument.  The glibc B<sendfile>()  wrapper "
3106 "function transparently deals with the kernel differences."
3107 msgstr ""
3108
3109 #. type: Plain text
3110 #: build/C/man2/sendfile.2:188
3111 msgid ""
3112 "Applications may wish to fall back to B<read>(2)/B<write>(2)  in the case "
3113 "where B<sendfile>()  fails with B<EINVAL> or B<ENOSYS>."
3114 msgstr ""
3115
3116 #. type: Plain text
3117 #: build/C/man2/sendfile.2:193
3118 msgid ""
3119 "The Linux-specific B<splice>(2)  call supports transferring data between "
3120 "arbitrary files (e.g., a pair of sockets)."
3121 msgstr ""
3122
3123 #. type: Plain text
3124 #: build/C/man2/sendfile.2:198
3125 msgid "B<mmap>(2), B<open>(2), B<socket>(2), B<splice>(2)"
3126 msgstr ""
3127
3128 #. type: TH
3129 #: build/C/man2/set_tid_address.2:23
3130 #, no-wrap
3131 msgid "SET_TID_ADDRESS"
3132 msgstr ""
3133
3134 #. type: TH
3135 #: build/C/man2/set_tid_address.2:23
3136 #, no-wrap
3137 msgid "2004-09-10"
3138 msgstr ""
3139
3140 #. type: Plain text
3141 #: build/C/man2/set_tid_address.2:26
3142 msgid "set_tid_address - set pointer to thread ID"
3143 msgstr ""
3144
3145 #. type: Plain text
3146 #: build/C/man2/set_tid_address.2:29
3147 #, no-wrap
3148 msgid "B<#include E<lt>linux/unistd.hE<gt>>\n"
3149 msgstr ""
3150
3151 #. type: Plain text
3152 #: build/C/man2/set_tid_address.2:31
3153 #, no-wrap
3154 msgid "B<long set_tid_address(int *>I<tidptr>B<);>\n"
3155 msgstr ""
3156
3157 #. type: Plain text
3158 #: build/C/man2/set_tid_address.2:38
3159 msgid ""
3160 "The kernel keeps for each process two values called I<set_child_tid> and "
3161 "I<clear_child_tid> that are NULL by default."
3162 msgstr ""
3163
3164 #. type: SS
3165 #: build/C/man2/set_tid_address.2:38
3166 #, no-wrap
3167 msgid "set_child_tid"
3168 msgstr ""
3169
3170 #. type: Plain text
3171 #: build/C/man2/set_tid_address.2:48
3172 msgid ""
3173 "If a process is started using B<clone>(2)  with the B<CLONE_CHILD_SETTID> "
3174 "flag, I<set_child_tid> is set to I<child_tidptr>, the fifth argument of that "
3175 "system call."
3176 msgstr ""
3177
3178 #. type: Plain text
3179 #: build/C/man2/set_tid_address.2:53
3180 msgid ""
3181 "When I<set_child_tid> is set, the very first thing the new process does is "
3182 "writing its PID at this address."
3183 msgstr ""
3184
3185 #. type: SS
3186 #: build/C/man2/set_tid_address.2:53
3187 #, no-wrap
3188 msgid "clear_child_tid"
3189 msgstr ""
3190
3191 #. type: Plain text
3192 #: build/C/man2/set_tid_address.2:63
3193 msgid ""
3194 "If a process is started using B<clone>(2)  with the B<CLONE_CHILD_CLEARTID> "
3195 "flag, I<clear_child_tid> is set to I<child_tidptr>, the fifth argument of "
3196 "that system call."
3197 msgstr ""
3198
3199 #. type: Plain text
3200 #: build/C/man2/set_tid_address.2:70
3201 msgid ""
3202 "The system call B<set_tid_address>()  sets the I<clear_child_tid> value for "
3203 "the calling process to I<tidptr>."
3204 msgstr ""
3205
3206 #. type: Plain text
3207 #: build/C/man2/set_tid_address.2:80
3208 msgid ""
3209 "When I<clear_child_tid> is set, and the process exits, and the process was "
3210 "sharing memory with other processes or threads, then 0 is written at this "
3211 "address, and a I<futex(child_tidptr, FUTEX_WAKE, 1, NULL, NULL, 0);> call is "
3212 "done.  (That is, wake a single process waiting on this futex.)  Errors are "
3213 "ignored."
3214 msgstr ""
3215
3216 #. type: Plain text
3217 #: build/C/man2/set_tid_address.2:83
3218 msgid "B<set_tid_address>()  always returns the PID of the calling process."
3219 msgstr ""
3220
3221 #. type: Plain text
3222 #: build/C/man2/set_tid_address.2:86
3223 msgid "B<set_tid_address>()  always succeeds."
3224 msgstr ""
3225
3226 #. type: Plain text
3227 #: build/C/man2/set_tid_address.2:89
3228 msgid ""
3229 "This call is present since Linux 2.5.48.  Details as given here are valid "
3230 "since Linux 2.5.49."
3231 msgstr ""
3232
3233 #. type: Plain text
3234 #: build/C/man2/set_tid_address.2:94
3235 msgid "B<clone>(2), B<futex>(2)"
3236 msgstr ""
3237
3238 #. type: TH
3239 #: build/C/man2/splice.2:26
3240 #, no-wrap
3241 msgid "SPLICE"
3242 msgstr ""
3243
3244 #. type: TH
3245 #: build/C/man2/splice.2:26 build/C/man2/tee.2:26 build/C/man2/vmsplice.2:26
3246 #, no-wrap
3247 msgid "2009-09-15"
3248 msgstr ""
3249
3250 #. type: Plain text
3251 #: build/C/man2/splice.2:29
3252 msgid "splice - splice data to/from a pipe"
3253 msgstr ""
3254
3255 #. type: Plain text
3256 #: build/C/man2/splice.2:33 build/C/man2/tee.2:33
3257 #, no-wrap
3258 msgid ""
3259 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
3260 "B<#include E<lt>fcntl.hE<gt>>\n"
3261 msgstr ""
3262
3263 #.  Return type was long before glibc 2.7
3264 #. type: Plain text
3265 #: build/C/man2/splice.2:38
3266 #, no-wrap
3267 msgid ""
3268 "B<ssize_t splice(int >I<fd_in>B<, loff_t *>I<off_in>B<, int >I<fd_out>B<,>\n"
3269 "B<               loff_t *>I<off_out>B<, size_t >I<len>B<, unsigned int "
3270 ">I<flags>B<);>\n"
3271 msgstr ""
3272
3273 #. type: Plain text
3274 #: build/C/man2/splice.2:50
3275 msgid ""
3276 "B<splice>()  moves data between two file descriptors without copying between "
3277 "kernel address space and user address space.  It transfers up to I<len> "
3278 "bytes of data from the file descriptor I<fd_in> to the file descriptor "
3279 "I<fd_out>, where one of the descriptors must refer to a pipe."
3280 msgstr ""
3281
3282 #. type: Plain text
3283 #: build/C/man2/splice.2:80
3284 msgid ""
3285 "If I<fd_in> refers to a pipe, then I<off_in> must be NULL.  If I<fd_in> does "
3286 "not refer to a pipe and I<off_in> is NULL, then bytes are read from I<fd_in> "
3287 "starting from the current file offset, and the current file offset is "
3288 "adjusted appropriately.  If I<fd_in> does not refer to a pipe and I<off_in> "
3289 "is not NULL, then I<off_in> must point to a buffer which specifies the "
3290 "starting offset from which bytes will be read from I<fd_in>; in this case, "
3291 "the current file offset of I<fd_in> is not changed.  Analogous statements "
3292 "apply for I<fd_out> and I<off_out>."
3293 msgstr ""
3294
3295 #. type: Plain text
3296 #: build/C/man2/splice.2:85 build/C/man2/vmsplice.2:78
3297 msgid ""
3298 "The I<flags> argument is a bit mask that is composed by ORing together zero "
3299 "or more of the following values:"
3300 msgstr ""
3301
3302 #. type: TP
3303 #: build/C/man2/splice.2:85 build/C/man2/tee.2:62 build/C/man2/vmsplice.2:78
3304 #, no-wrap
3305 msgid "B<SPLICE_F_MOVE>"
3306 msgstr ""
3307
3308 #. type: Plain text
3309 #: build/C/man2/splice.2:98
3310 msgid ""
3311 "Attempt to move pages instead of copying.  This is only a hint to the "
3312 "kernel: pages may still be copied if the kernel cannot move the pages from "
3313 "the pipe, or if the pipe buffers don't refer to full pages.  The initial "
3314 "implementation of this flag was buggy: therefore starting in Linux 2.6.21 it "
3315 "is a no-op (but is still permitted in a B<splice>()  call); in the future, a "
3316 "correct implementation may be restored."
3317 msgstr ""
3318
3319 #. type: TP
3320 #: build/C/man2/splice.2:98 build/C/man2/tee.2:68 build/C/man2/vmsplice.2:84
3321 #, no-wrap
3322 msgid "B<SPLICE_F_NONBLOCK>"
3323 msgstr ""
3324
3325 #. type: Plain text
3326 #: build/C/man2/splice.2:107
3327 msgid ""
3328 "Do not block on I/O.  This makes the splice pipe operations nonblocking, but "
3329 "B<splice>()  may nevertheless block because the file descriptors that are "
3330 "spliced to/from may block (unless they have the B<O_NONBLOCK> flag set)."
3331 msgstr ""
3332
3333 #. type: TP
3334 #: build/C/man2/splice.2:107 build/C/man2/tee.2:73 build/C/man2/vmsplice.2:91
3335 #, no-wrap
3336 msgid "B<SPLICE_F_MORE>"
3337 msgstr ""
3338
3339 #. type: Plain text
3340 #: build/C/man2/splice.2:121
3341 msgid ""
3342 "More data will be coming in a subsequent splice.  This is a helpful hint "
3343 "when the I<fd_out> refers to a socket (see also the description of "
3344 "B<MSG_MORE> in B<send>(2), and the description of B<TCP_CORK> in B<tcp>(7))"
3345 msgstr ""
3346
3347 #. type: TP
3348 #: build/C/man2/splice.2:121 build/C/man2/tee.2:79 build/C/man2/vmsplice.2:97
3349 #, no-wrap
3350 msgid "B<SPLICE_F_GIFT>"
3351 msgstr ""
3352
3353 #. type: Plain text
3354 #: build/C/man2/splice.2:127
3355 msgid "Unused for B<splice>(); see B<vmsplice>(2)."
3356 msgstr ""
3357
3358 #. type: Plain text
3359 #: build/C/man2/splice.2:136
3360 msgid ""
3361 "Upon successful completion, B<splice>()  returns the number of bytes spliced "
3362 "to or from the pipe.  A return value of 0 means that there was no data to "
3363 "transfer, and it would not make sense to block, because there are no writers "
3364 "connected to the write end of the pipe referred to by I<fd_in>."
3365 msgstr ""
3366
3367 #. type: Plain text
3368 #: build/C/man2/splice.2:142
3369 msgid "On error, B<splice>()  returns -1 and I<errno> is set to indicate the error."
3370 msgstr ""
3371
3372 #. type: Plain text
3373 #: build/C/man2/splice.2:147
3374 msgid ""
3375 "One or both file descriptors are not valid, or do not have proper read-write "
3376 "mode."
3377 msgstr ""
3378
3379 #.  The append-mode error is given since 2.6.27; in earlier kernels,
3380 #.  splice() in append mode was broken
3381 #. type: Plain text
3382 #: build/C/man2/splice.2:155
3383 msgid ""
3384 "Target file system doesn't support splicing; target file is opened in append "
3385 "mode; neither of the descriptors refers to a pipe; or offset given for "
3386 "nonseekable device."
3387 msgstr ""
3388
3389 #. type: Plain text
3390 #: build/C/man2/splice.2:158 build/C/man2/tee.2:114 build/C/man2/vmsplice.2:138
3391 msgid "Out of memory."
3392 msgstr ""
3393
3394 #. type: TP
3395 #: build/C/man2/splice.2:158
3396 #, no-wrap
3397 msgid "B<ESPIPE>"
3398 msgstr ""
3399
3400 #. type: Plain text
3401 #: build/C/man2/splice.2:165
3402 msgid ""
3403 "Either I<off_in> or I<off_out> was not NULL, but the corresponding file "
3404 "descriptor refers to a pipe."
3405 msgstr ""
3406
3407 #. type: Plain text
3408 #: build/C/man2/splice.2:169
3409 msgid "The B<splice>()  system call first appeared in Linux 2.6.17."
3410 msgstr ""
3411
3412 #. type: Plain text
3413 #: build/C/man2/splice.2:181
3414 msgid ""
3415 "The three system calls B<splice>(), B<vmsplice>(2), and B<tee>(2), provide "
3416 "userspace programs with full control over an arbitrary kernel buffer, "
3417 "implemented within the kernel using the same type of buffer that is used for "
3418 "a pipe.  In overview, these system calls perform the following tasks:"
3419 msgstr ""
3420
3421 #. type: TP
3422 #: build/C/man2/splice.2:181
3423 #, no-wrap
3424 msgid "B<splice>()"
3425 msgstr ""
3426
3427 #. type: Plain text
3428 #: build/C/man2/splice.2:185
3429 msgid ""
3430 "moves data from the buffer to an arbitrary file descriptor, or vice versa, "
3431 "or from one buffer to another."
3432 msgstr ""
3433
3434 #. type: TP
3435 #: build/C/man2/splice.2:185
3436 #, no-wrap
3437 msgid "B<tee>(2)"
3438 msgstr ""
3439
3440 #. type: Plain text
3441 #: build/C/man2/splice.2:188
3442 msgid "\"copies\" the data from one buffer to another."
3443 msgstr ""
3444
3445 #. type: TP
3446 #: build/C/man2/splice.2:188
3447 #, no-wrap
3448 msgid "B<vmsplice>(2)"
3449 msgstr ""
3450
3451 #. type: Plain text
3452 #: build/C/man2/splice.2:191
3453 msgid "\"copies\" data from user space into the buffer."
3454 msgstr ""
3455
3456 #
3457 #.  Linus: Now, imagine using the above in a media server, for example.
3458 #.  Let's say that a year or two has passed, so that the video drivers
3459 #.  have been updated to be able to do the splice thing, and what can
3460 #.  you do? You can:
3461 #
3462 #.  - splice from the (mpeg or whatever - let's just assume that the video
3463 #.    input is either digital or does the encoding on its own - like they
3464 #.    pretty much all do) video input into a pipe (remember: no copies - the
3465 #.    video input will just DMA directly into memory, and splice will just
3466 #.    set up the pages in the pipe buffer)
3467 #.  - tee that pipe to split it up
3468 #.  - splice one end to a file (ie "save the compressed stream to disk")
3469 #.  - splice the other end to a real-time video decoder window for your
3470 #.    real-time viewing pleasure.
3471 #
3472 #.  Linus: Now, the advantage of splice()/tee() is that you can
3473 #.  do zero-copy movement of data, and unlike sendfile() you can
3474 #.  do it on _arbitrary_ data (and, as shown by "tee()", it's more
3475 #.  than just sending the data to somebody else: you can duplicate
3476 #.  the data and choose to forward it to two or more different
3477 #.  users - for things like logging etc.).
3478 #. type: Plain text
3479 #: build/C/man2/splice.2:222
3480 msgid ""
3481 "Though we talk of copying, actual copies are generally avoided.  The kernel "
3482 "does this by implementing a pipe buffer as a set of reference-counted "
3483 "pointers to pages of kernel memory.  The kernel creates \"copies\" of pages "
3484 "in a buffer by creating new pointers (for the output buffer) referring to "
3485 "the pages, and increasing the reference counts for the pages: only pointers "
3486 "are copied, not the pages of the buffer."
3487 msgstr ""
3488
3489 #. type: SH
3490 #: build/C/man2/splice.2:222 build/C/man2/tee.2:129
3491 #, no-wrap
3492 msgid "EXAMPLE"
3493 msgstr ""
3494
3495 #. type: Plain text
3496 #: build/C/man2/splice.2:225
3497 msgid "See B<tee>(2)."
3498 msgstr ""
3499
3500 #. type: Plain text
3501 #: build/C/man2/splice.2:229
3502 msgid "B<sendfile>(2), B<tee>(2), B<vmsplice>(2)"
3503 msgstr ""
3504
3505 #. type: TH
3506 #: build/C/man2/tee.2:26
3507 #, no-wrap
3508 msgid "TEE"
3509 msgstr ""
3510
3511 #. type: Plain text
3512 #: build/C/man2/tee.2:29
3513 msgid "tee - duplicating pipe content"
3514 msgstr ""
3515
3516 #. type: Plain text
3517 #: build/C/man2/tee.2:36
3518 #, no-wrap
3519 msgid ""
3520 "B<ssize_t tee(int >I<fd_in>B<, int >I<fd_out>B<, size_t >I<len>B<, unsigned "
3521 "int >I<flags>B<);>\n"
3522 msgstr ""
3523
3524 #.  Example programs http://brick.kernel.dk/snaps
3525 #
3526 #
3527 #.  add a "tee(in, out1, out2)" system call that duplicates the pages
3528 #.  (again, incrementing their reference count, not copying the data) from
3529 #.  one pipe to two other pipes.
3530 #. type: Plain text
3531 #: build/C/man2/tee.2:56
3532 msgid ""
3533 "B<tee>()  duplicates up to I<len> bytes of data from the pipe referred to by "
3534 "the file descriptor I<fd_in> to the pipe referred to by the file descriptor "
3535 "I<fd_out>.  It does not consume the data that is duplicated from I<fd_in>; "
3536 "therefore, that data can be copied by a subsequent B<splice>(2)."
3537 msgstr ""
3538
3539 #. type: Plain text
3540 #: build/C/man2/tee.2:62
3541 msgid ""
3542 "I<flags> is a series of modifier flags, which share the name space with "
3543 "B<splice>(2)  and B<vmsplice>(2):"
3544 msgstr ""
3545
3546 #. type: Plain text
3547 #: build/C/man2/tee.2:68
3548 msgid "Currently has no effect for B<tee>(); see B<splice>(2)."
3549 msgstr ""
3550
3551 #.  Not used for vmsplice
3552 #.  May be in the future -- therefore EAGAIN
3553 #. type: Plain text
3554 #: build/C/man2/tee.2:73 build/C/man2/vmsplice.2:91
3555 msgid "Do not block on I/O; see B<splice>(2)  for further details."
3556 msgstr ""
3557
3558 #. type: Plain text
3559 #: build/C/man2/tee.2:79
3560 msgid ""
3561 "Currently has no effect for B<tee>(), but may be implemented in the future; "
3562 "see B<splice>(2)."
3563 msgstr ""
3564
3565 #. type: Plain text
3566 #: build/C/man2/tee.2:85
3567 msgid "Unused for B<tee>(); see B<vmsplice>(2)."
3568 msgstr ""
3569
3570 #. type: Plain text
3571 #: build/C/man2/tee.2:94
3572 msgid ""
3573 "Upon successful completion, B<tee>()  returns the number of bytes that were "
3574 "duplicated between the input and output.  A return value of 0 means that "
3575 "there was no data to transfer, and it would not make sense to block, because "
3576 "there are no writers connected to the write end of the pipe referred to by "
3577 "I<fd_in>."
3578 msgstr ""
3579
3580 #. type: Plain text
3581 #: build/C/man2/tee.2:100
3582 msgid "On error, B<tee>()  returns -1 and I<errno> is set to indicate the error."
3583 msgstr ""
3584
3585 #. type: Plain text
3586 #: build/C/man2/tee.2:111
3587 msgid ""
3588 "I<fd_in> or I<fd_out> does not refer to a pipe; or I<fd_in> and I<fd_out> "
3589 "refer to the same pipe."
3590 msgstr ""
3591
3592 #. type: Plain text
3593 #: build/C/man2/tee.2:118
3594 msgid "The B<tee>()  system call first appeared in Linux 2.6.17."
3595 msgstr ""
3596
3597 #. type: Plain text
3598 #: build/C/man2/tee.2:129
3599 msgid ""
3600 "Conceptually, B<tee>()  copies the data between the two pipes.  In reality "
3601 "no real data copying takes place though: under the covers, B<tee>()  assigns "
3602 "data in the output by merely grabbing a reference to the input."
3603 msgstr ""
3604
3605 #. type: Plain text
3606 #: build/C/man2/tee.2:135
3607 msgid ""
3608 "The following example implements a basic B<tee>(1)  program using the "
3609 "B<tee>()  system call."
3610 msgstr ""
3611
3612 #. type: Plain text
3613 #: build/C/man2/tee.2:144
3614 #, no-wrap
3615 msgid ""
3616 "#define _GNU_SOURCE\n"
3617 "#include E<lt>fcntl.hE<gt>\n"
3618 "#include E<lt>stdio.hE<gt>\n"
3619 "#include E<lt>stdlib.hE<gt>\n"
3620 "#include E<lt>unistd.hE<gt>\n"
3621 "#include E<lt>errno.hE<gt>\n"
3622 "#include E<lt>limits.hE<gt>\n"
3623 msgstr ""
3624
3625 #. type: Plain text
3626 #: build/C/man2/tee.2:150
3627 #, no-wrap
3628 msgid ""
3629 "int\n"
3630 "main(int argc, char *argv[])\n"
3631 "{\n"
3632 "    int fd;\n"
3633 "    int len, slen;\n"
3634 msgstr ""
3635
3636 #. type: Plain text
3637 #: build/C/man2/tee.2:155
3638 #, no-wrap
3639 msgid ""
3640 "    if (argc != 2) {\n"
3641 "        fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
3642 "        exit(EXIT_FAILURE);\n"
3643 "    }\n"
3644 msgstr ""
3645
3646 #. type: Plain text
3647 #: build/C/man2/tee.2:161
3648 #, no-wrap
3649 msgid ""
3650 "    fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
3651 "    if (fd == -1) {\n"
3652 "        perror(\"open\");\n"
3653 "        exit(EXIT_FAILURE);\n"
3654 "    }\n"
3655 msgstr ""
3656
3657 #. type: Plain text
3658 #: build/C/man2/tee.2:168
3659 #, no-wrap
3660 msgid ""
3661 "    do {\n"
3662 "        /*\n"
3663 "         * tee stdin to stdout.\n"
3664 "         */\n"
3665 "        len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
3666 "                  INT_MAX, SPLICE_F_NONBLOCK);\n"
3667 msgstr ""
3668
3669 #. type: Plain text
3670 #: build/C/man2/tee.2:177
3671 #, no-wrap
3672 msgid ""
3673 "        if (len E<lt> 0) {\n"
3674 "            if (errno == EAGAIN)\n"
3675 "                continue;\n"
3676 "            perror(\"tee\");\n"
3677 "            exit(EXIT_FAILURE);\n"
3678 "        } else\n"
3679 "            if (len == 0)\n"
3680 "                break;\n"
3681 msgstr ""
3682
3683 #. type: Plain text
3684 #: build/C/man2/tee.2:191
3685 #, no-wrap
3686 msgid ""
3687 "        /*\n"
3688 "         * Consume stdin by splicing it to a file.\n"
3689 "         */\n"
3690 "        while (len E<gt> 0) {\n"
3691 "            slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
3692 "                          len, SPLICE_F_MOVE);\n"
3693 "            if (slen E<lt> 0) {\n"
3694 "                perror(\"splice\");\n"
3695 "                break;\n"
3696 "            }\n"
3697 "            len -= slen;\n"
3698 "        }\n"
3699 "    } while (1);\n"
3700 msgstr ""
3701
3702 #. type: Plain text
3703 #: build/C/man2/tee.2:195
3704 #, no-wrap
3705 msgid ""
3706 "    close(fd);\n"
3707 "    exit(EXIT_SUCCESS);\n"
3708 "}\n"
3709 msgstr ""
3710
3711 #. type: Plain text
3712 #: build/C/man2/tee.2:199
3713 msgid "B<splice>(2), B<vmsplice>(2)"
3714 msgstr ""
3715
3716 #. type: TH
3717 #: build/C/man2/vm86.2:26
3718 #, no-wrap
3719 msgid "VM86"
3720 msgstr ""
3721
3722 #. type: TH
3723 #: build/C/man2/vm86.2:26
3724 #, no-wrap
3725 msgid "2009-02-20"
3726 msgstr ""
3727
3728 #. type: Plain text
3729 #: build/C/man2/vm86.2:29
3730 msgid "vm86old, vm86 - enter virtual 8086 mode"
3731 msgstr ""
3732
3733 #. type: Plain text
3734 #: build/C/man2/vm86.2:31
3735 msgid "B<#include E<lt>sys/vm86.hE<gt>>"
3736 msgstr ""
3737
3738 #. type: Plain text
3739 #: build/C/man2/vm86.2:33
3740 msgid "B<int vm86old(struct vm86_struct *>I<info>B<);>"
3741 msgstr ""
3742
3743 #. type: Plain text
3744 #: build/C/man2/vm86.2:35
3745 msgid "B<int vm86(unsigned long >I<fn>B<, struct vm86plus_struct *>I<v86>B<);>"
3746 msgstr ""
3747
3748 #. type: Plain text
3749 #: build/C/man2/vm86.2:46
3750 msgid ""
3751 "The system call B<vm86>()  was introduced in Linux 0.97p2.  In Linux 2.1.15 "
3752 "and 2.0.28 it was renamed to B<vm86old>(), and a new B<vm86>()  was "
3753 "introduced.  The definition of I<struct vm86_struct> was changed in 1.1.8 "
3754 "and 1.1.9."
3755 msgstr ""
3756
3757 #. type: Plain text
3758 #: build/C/man2/vm86.2:50
3759 msgid ""
3760 "These calls cause the process to enter VM86 mode (virtual-8086 in Intel "
3761 "literature), and are used by B<dosemu>."
3762 msgstr ""
3763
3764 #. type: Plain text
3765 #: build/C/man2/vm86.2:52
3766 msgid "VM86 mode is an emulation of real mode within a protected mode task."
3767 msgstr ""
3768
3769 #. type: Plain text
3770 #: build/C/man2/vm86.2:62
3771 msgid ""
3772 "This return value is specific to i386 and indicates a problem with getting "
3773 "userspace data."
3774 msgstr ""
3775
3776 #. type: Plain text
3777 #: build/C/man2/vm86.2:66
3778 msgid ""
3779 "This return value indicates the call is not implemented on the present "
3780 "architecture."
3781 msgstr ""
3782
3783 #. type: Plain text
3784 #: build/C/man2/vm86.2:71
3785 msgid ""
3786 "Saved kernel stack exists.  (This is a kernel sanity check; the saved stack "
3787 "should only exist within vm86 mode itself.)"
3788 msgstr ""
3789
3790 #. type: Plain text
3791 #: build/C/man2/vm86.2:74
3792 msgid ""
3793 "This call is specific to Linux on 32-bit Intel processors, and should not be "
3794 "used in programs intended to be portable."
3795 msgstr ""
3796
3797 #. type: TH
3798 #: build/C/man2/vmsplice.2:26
3799 #, no-wrap
3800 msgid "VMSPLICE"
3801 msgstr ""
3802
3803 #. type: Plain text
3804 #: build/C/man2/vmsplice.2:29
3805 msgid "vmsplice - splice user pages into a pipe"
3806 msgstr ""
3807
3808 #. type: Plain text
3809 #: build/C/man2/vmsplice.2:34
3810 #, no-wrap
3811 msgid ""
3812 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
3813 "B<#include E<lt>fcntl.hE<gt>>\n"
3814 "B<#include E<lt>sys/uio.hE<gt>>\n"
3815 msgstr ""
3816
3817 #. type: Plain text
3818 #: build/C/man2/vmsplice.2:37
3819 #, no-wrap
3820 msgid ""
3821 "B<ssize_t vmsplice(int >I<fd>B<, const struct iovec *>I<iov>B<,>\n"
3822 "B<                 unsigned long >I<nr_segs>B<, unsigned int "
3823 ">I<flags>B<);>\n"
3824 msgstr ""
3825
3826 #.  Linus: vmsplice() system call to basically do a "write to
3827 #.  the buffer", but using the reference counting and VM traversal
3828 #.  to actually fill the buffer. This means that the user needs to
3829 #.  be careful not to reuse the user-space buffer it spliced into
3830 #.  the kernel-space one (contrast this to "write()", which copies
3831 #.  the actual data, and you can thus reuse the buffer immediately
3832 #.  after a successful write), but that is often easy to do.
3833 #. type: Plain text
3834 #: build/C/man2/vmsplice.2:57
3835 msgid ""
3836 "The B<vmsplice>()  system call maps I<nr_segs> ranges of user memory "
3837 "described by I<iov> into a pipe.  The file descriptor I<fd> must refer to a "
3838 "pipe."
3839 msgstr ""
3840
3841 #. type: Plain text
3842 #: build/C/man2/vmsplice.2:64
3843 msgid ""
3844 "The pointer I<iov> points to an array of I<iovec> structures as defined in "
3845 "I<E<lt>sys/uio.hE<gt>>:"
3846 msgstr ""
3847
3848 #. type: Plain text
3849 #: build/C/man2/vmsplice.2:71
3850 #, no-wrap
3851 msgid ""
3852 "struct iovec {\n"
3853 "    void  *iov_base;            /* Starting address */\n"
3854 "    size_t iov_len;             /* Number of bytes */\n"
3855 "};\n"
3856 msgstr ""
3857
3858 #. type: Plain text
3859 #: build/C/man2/vmsplice.2:84
3860 msgid "Unused for B<vmsplice>(); see B<splice>(2)."
3861 msgstr ""
3862
3863 #. type: Plain text
3864 #: build/C/man2/vmsplice.2:97
3865 msgid ""
3866 "Currently has no effect for B<vmsplice>(), but may be implemented in the "
3867 "future; see B<splice>(2)."
3868 msgstr ""
3869
3870 #.  FIXME Explain the following line in a little more detail:
3871 #.  .... if we expect to later SPLICE_F_MOVE to the cache.
3872 #. type: Plain text
3873 #: build/C/man2/vmsplice.2:113
3874 msgid ""
3875 "The user pages are a gift to the kernel.  The application may not modify "
3876 "this memory ever, or page cache and on-disk data may differ.  Gifting pages "
3877 "to the kernel means that a subsequent B<splice>(2)  B<SPLICE_F_MOVE> can "
3878 "successfully move the pages; if this flag is not specified, then a "
3879 "subsequent B<splice>(2)  B<SPLICE_F_MOVE> must copy the pages.  Data must "
3880 "also be properly page aligned, both in memory and length."
3881 msgstr ""
3882
3883 #. type: Plain text
3884 #: build/C/man2/vmsplice.2:122
3885 msgid ""
3886 "Upon successful completion, B<vmsplice>()  returns the number of bytes "
3887 "transferred to the pipe.  On error, B<vmsplice>()  returns -1 and I<errno> "
3888 "is set to indicate the error."
3889 msgstr ""
3890
3891 #. type: Plain text
3892 #: build/C/man2/vmsplice.2:127
3893 msgid "I<fd> either not valid, or doesn't refer to a pipe."
3894 msgstr ""
3895
3896 #. type: Plain text
3897 #: build/C/man2/vmsplice.2:135
3898 msgid ""
3899 "I<nr_segs> is 0 or greater than B<IOV_MAX>; or memory not aligned if "
3900 "B<SPLICE_F_GIFT> set."
3901 msgstr ""
3902
3903 #. type: Plain text
3904 #: build/C/man2/vmsplice.2:142
3905 msgid "The B<vmsplice>()  system call first appeared in Linux 2.6.17."
3906 msgstr ""
3907
3908 #. type: Plain text
3909 #: build/C/man2/vmsplice.2:153
3910 msgid ""
3911 "B<vmsplice>()  follows the other vectorized read/write type functions when "
3912 "it comes to limitations on number of segments being passed in.  This limit "
3913 "is B<IOV_MAX> as defined in I<E<lt>limits.hE<gt>>.  At the time of this "
3914 "writing, that limit is 1024."
3915 msgstr ""
3916
3917 #. type: Plain text
3918 #: build/C/man2/vmsplice.2:156
3919 msgid "B<splice>(2), B<tee>(2)"
3920 msgstr ""