Debian Codegraph @

templates/man2/vfork.2.pot

raw
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: 2026-06-05 06:50+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, no-wrap
23 msgid "vfork"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2026-02-08"
31 msgstr ""
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, no-wrap
36 msgid "Linux man-pages 6.18"
37 msgstr ""
38
39 #. type: SH
40 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
41 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "NAME"
44 msgstr ""
45
46 #. type: Plain text
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 msgid "vfork - create a child process and block parent"
50 msgstr ""
51
52 #. type: SH
53 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
54 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
55 #, no-wrap
56 msgid "LIBRARY"
57 msgstr ""
58
59 #. type: Plain text
60 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
61 #: opensuse-leap-16-1 opensuse-tumbleweed
62 msgid "Standard C library (I<libc>,\\ I<-lc>)"
63 msgstr ""
64
65 #. type: SH
66 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
67 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
68 #, no-wrap
69 msgid "SYNOPSIS"
70 msgstr ""
71
72 #. type: Plain text
73 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
74 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
75 #, no-wrap
76 msgid "B<#include E<lt>unistd.hE<gt>>\n"
77 msgstr ""
78
79 #. type: Plain text
80 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
81 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
82 #, no-wrap
83 msgid "B<pid_t vfork(void);>\n"
84 msgstr ""
85
86 #. type: Plain text
87 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
88 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
89 msgid ""
90 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
91 msgstr ""
92
93 #. type: Plain text
94 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
95 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
96 msgid "B<vfork>():"
97 msgstr ""
98
99 #. || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
100 #. type: Plain text
101 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
102 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
103 #, no-wrap
104 msgid ""
105 " Since glibc 2.12:\n"
106 " (_XOPEN_SOURCE E<gt>= 500) && ! (_POSIX_C_SOURCE E<gt>= 200809L)\n"
107 " || /* Since glibc 2.19: */ _DEFAULT_SOURCE\n"
108 " || /* glibc E<lt>= 2.19: */ _BSD_SOURCE\n"
109 " Before glibc 2.12:\n"
110 " _BSD_SOURCE || _XOPEN_SOURCE E<gt>= 500\n"
111 msgstr ""
112
113 #. type: SH
114 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
115 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
116 #, no-wrap
117 msgid "DESCRIPTION"
118 msgstr ""
119
120 #. type: SS
121 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
122 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
123 #, no-wrap
124 msgid "Standard description"
125 msgstr ""
126
127 #. type: Plain text
128 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
129 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
130 msgid ""
131 "(From POSIX.1) The B<vfork>() function has the same effect as B<fork>(2), "
132 "except that the behavior is undefined if the process created by B<vfork>() "
133 "either modifies any data other than a variable of type I<pid_t> used to "
134 "store the return value from B<vfork>(), or returns from the function in "
135 "which B<vfork>() was called, or calls any other function before "
136 "successfully calling B<_exit>(2) or one of the B<exec>(3) family of "
137 "functions."
138 msgstr ""
139
140 #. type: SS
141 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
142 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
143 #, no-wrap
144 msgid "Linux description"
145 msgstr ""
146
147 #. type: Plain text
148 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
149 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
150 msgid ""
151 "B<vfork>(), just like B<fork>(2), creates a child process of the calling "
152 "process. For details and return value and errors, see B<fork>(2)."
153 msgstr ""
154
155 #. type: Plain text
156 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
157 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
158 msgid ""
159 "B<vfork>() is a special case of B<clone>(2). It is used to create new "
160 "processes without copying the page tables of the parent process. It may be "
161 "useful in performance-sensitive applications where a child is created which "
162 "then immediately issues an B<execve>(2)."
163 msgstr ""
164
165 #. type: Plain text
166 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
167 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
168 msgid ""
169 "B<vfork>() differs from B<fork>(2) in that the calling thread is suspended "
170 "until the child terminates (either normally, by calling B<_exit>(2), or "
171 "abnormally, after delivery of a fatal signal), or it makes a call to "
172 "B<execve>(2). Until that point, the child shares all memory with its "
173 "parent, including the stack. The child must not return from the current "
174 "function or call B<exit>(3) (which would have the effect of calling exit "
175 "handlers established by the parent process and flushing the parent's "
176 "B<stdio>(3) buffers), but may call B<_exit>(2)."
177 msgstr ""
178
179 #. type: Plain text
180 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
181 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
182 msgid ""
183 "As with B<fork>(2), the child process created by B<vfork>() inherits copies "
184 "of various of the caller's process attributes (e.g., file descriptors, "
185 "signal dispositions, and current working directory); the B<vfork>() call "
186 "differs only in the treatment of the virtual address space, as described "
187 "above."
188 msgstr ""
189
190 #. type: Plain text
191 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
192 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
193 msgid ""
194 "Signals sent to the parent arrive after the child releases the parent's "
195 "memory (i.e., after the child terminates or calls B<execve>(2))."
196 msgstr ""
197
198 #. type: SS
199 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
200 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
201 #, no-wrap
202 msgid "Historic description"
203 msgstr ""
204
205 #. type: Plain text
206 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
207 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
208 msgid ""
209 "Under Linux, B<fork>(2) is implemented using copy-on-write pages, so the "
210 "only penalty incurred by B<fork>(2) is the time and memory required to "
211 "duplicate the parent's page tables, and to create a unique task structure "
212 "for the child. However, in the bad old days a B<fork>(2) would require "
213 "making a complete copy of the caller's data space, often needlessly, since "
214 "usually immediately afterward an B<exec>(3) is done. Thus, for greater "
215 "efficiency, BSD introduced the B<vfork>() system call, which did not fully "
216 "copy the address space of the parent process, but borrowed the parent's "
217 "memory and thread of control until a call to B<execve>(2) or an exit "
218 "occurred. The parent process was suspended while the child was using its "
219 "resources. The use of B<vfork>() was tricky: for example, not modifying "
220 "data in the parent process depended on knowing which variables were held in "
221 "a register."
222 msgstr ""
223
224 #. type: SH
225 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
226 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
227 #, no-wrap
228 msgid "VERSIONS"
229 msgstr ""
230
231 #. In AIXv3.1 vfork is equivalent to fork.
232 #. type: Plain text
233 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
234 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
235 msgid ""
236 "The requirements put on B<vfork>() by the standards are weaker than those "
237 "put on B<fork>(2), so an implementation where the two are synonymous is "
238 "compliant. In particular, the programmer cannot rely on the parent "
239 "remaining blocked until the child either terminates or calls B<execve>(2), "
240 "and cannot rely on any specific behavior with respect to shared memory."
241 msgstr ""
242
243 #. type: Plain text
244 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
245 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
246 msgid ""
247 "Some consider the semantics of B<vfork>() to be an architectural blemish, "
248 "and the 4.2BSD man page stated: \\[lq]This system call will be eliminated "
249 "when proper system sharing mechanisms are implemented. Users should not "
250 "depend on the memory sharing semantics of I<vfork> as it will, in that case, "
251 "be made synonymous to I<fork>.\\[rq] However, even though modern memory "
252 "management hardware has decreased the performance difference between "
253 "B<fork>(2) and B<vfork>(), there are various reasons why Linux and other "
254 "systems have retained B<vfork>():"
255 msgstr ""
256
257 #. type: IP
258 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
259 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
260 #, no-wrap
261 msgid "\\[bu]"
262 msgstr ""
263
264 #. type: Plain text
265 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
266 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
267 msgid ""
268 "Some performance-critical applications require the small performance "
269 "advantage conferred by B<vfork>()."
270 msgstr ""
271
272 #. http://stackoverflow.com/questions/4259629/what-is-the-difference-between-fork-and-vfork
273 #. http://developers.sun.com/solaris/articles/subprocess/subprocess.html
274 #. http://mailman.uclinux.org/pipermail/uclinux-dev/2009-April/000684.html
275 #. type: Plain text
276 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
277 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
278 msgid ""
279 "B<vfork>() can be implemented on systems that lack a memory-management unit "
280 "(MMU), but B<fork>(2) can't be implemented on such systems. (POSIX.1-2008 "
281 "removed B<vfork>() from the standard; the POSIX rationale for the "
282 "B<posix_spawn>(3) function notes that that function, which provides "
283 "functionality equivalent to B<fork>(2)+ B<exec>(3), is designed to be "
284 "implementable on systems that lack an MMU.)"
285 msgstr ""
286
287 #. type: Plain text
288 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
289 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
290 msgid ""
291 "On systems where memory is constrained, B<vfork>() avoids the need to "
292 "temporarily commit memory (see the description of I</proc/sys/vm/"
293 "overcommit_memory> in B<proc>(5)) in order to execute a new program. (This "
294 "can be especially beneficial where a large parent process wishes to execute "
295 "a small helper program in a child process.) By contrast, using B<fork>(2) "
296 "in this scenario requires either committing an amount of memory equal to the "
297 "size of the parent process (if strict overcommitting is in force) or "
298 "overcommitting memory with the risk that a process is terminated by the out-"
299 "of-memory (OOM) killer."
300 msgstr ""
301
302 #. type: SS
303 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
304 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
305 #, no-wrap
306 msgid "Linux notes"
307 msgstr ""
308
309 #. type: Plain text
310 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
311 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
312 msgid ""
313 "Fork handlers established using B<pthread_atfork>(3) are not called when a "
314 "multithreaded program employing the NPTL threading library calls "
315 "B<vfork>(). Fork handlers are called in this case in a program using the "
316 "LinuxThreads threading library. (See B<pthreads>(7) for a description of "
317 "Linux threading libraries.)"
318 msgstr ""
319
320 #. type: Plain text
321 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
322 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
323 msgid ""
324 "A call to B<vfork>() is equivalent to calling B<clone>(2) with I<flags> "
325 "specified as:"
326 msgstr ""
327
328 #. type: Plain text
329 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
330 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
331 #, no-wrap
332 msgid " CLONE_VM | CLONE_VFORK | SIGCHLD\n"
333 msgstr ""
334
335 #. type: SH
336 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
337 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
338 #, no-wrap
339 msgid "STANDARDS"
340 msgstr ""
341
342 #. type: Plain text
343 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
344 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
345 msgid "None."
346 msgstr ""
347
348 #. type: SH
349 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
350 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
351 #, no-wrap
352 msgid "HISTORY"
353 msgstr ""
354
355 #. type: Plain text
356 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
357 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
358 msgid ""
359 "4.3BSD; POSIX.1-2001 (but marked OBSOLETE). POSIX.1-2008 removes the "
360 "specification of B<vfork>()."
361 msgstr ""
362
363 #. In the release notes for 4.2BSD Sam Leffler wrote: `vfork: Is still
364 #. present, but definitely on its way out'.
365 #. type: Plain text
366 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
367 #: opensuse-tumbleweed
368 msgid ""
369 "The B<vfork>() system call appeared in 3.0BSD. In 4.4BSD it was made "
370 "synonymous to B<fork>(2) but NetBSD introduced it again; see E<.UR http:"
371 "\\://www.netbsd.org\\:/Documentation\\:/kernel\\:/vfork.html> E<.UE .> In "
372 "Linux, it has been equivalent to B<fork>(2) until Linux 2.2.0-pre6 or so. "
373 "Since Linux 2.2.0-pre9 (on i386, somewhat later on other architectures) it "
374 "is an independent system call. Support was added in glibc 2.0.112."
375 msgstr ""
376
377 #. type: SH
378 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
379 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
380 #, no-wrap
381 msgid "CAVEATS"
382 msgstr ""
383
384 #. type: Plain text
385 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
386 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
387 msgid ""
388 "The child process should take care not to modify the memory in unintended "
389 "ways, since such changes will be seen by the parent process once the child "
390 "terminates or executes another program. In this regard, signal handlers can "
391 "be especially problematic: if a signal handler that is invoked in the child "
392 "of B<vfork>() changes memory, those changes may result in an inconsistent "
393 "process state from the perspective of the parent process (e.g., memory "
394 "changes would be visible in the parent, but changes to the state of open "
395 "file descriptors would not be visible)."
396 msgstr ""
397
398 #. type: Plain text
399 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
400 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
401 msgid ""
402 "When B<vfork>() is called in a multithreaded process, only the calling "
403 "thread is suspended until the child terminates or executes a new program. "
404 "This means that the child is sharing an address space with other running "
405 "code. This can be dangerous if another thread in the parent process changes "
406 "credentials (using B<setuid>(2) or similar), since there are now two "
407 "processes with different privilege levels running in the same address "
408 "space. As an example of the dangers, suppose that a multithreaded program "
409 "running as root creates a child using B<vfork>(). After the B<vfork>(), a "
410 "thread in the parent process drops the process to an unprivileged user in "
411 "order to run some untrusted code (e.g., perhaps via plug-in opened with "
412 "B<dlopen>(3)). In this case, attacks are possible where the parent process "
413 "uses B<mmap>(2) to map in code that will be executed by the privileged "
414 "child process."
415 msgstr ""
416
417 #. type: SH
418 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
419 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
420 #, no-wrap
421 msgid "BUGS"
422 msgstr ""
423
424 #
425 #. As far as I can tell, the following is not true in Linux 2.6.19:
426 #. Currently (Linux 2.3.25),
427 #. .BR strace (1)
428 #. cannot follow
429 #. .BR vfork ()
430 #. and requires a kernel patch.
431 #. type: Plain text
432 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
433 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
434 msgid ""
435 "Details of the signal handling are obscure and differ between systems. The "
436 "BSD man page states: \"To avoid a possible deadlock situation, processes "
437 "that are children in the middle of a B<vfork>() are never sent B<SIGTTOU> "
438 "or B<SIGTTIN> signals; rather, output or I<ioctl>s are allowed and input "
439 "attempts result in an end-of-file indication.\""
440 msgstr ""
441
442 #. type: SH
443 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
444 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
445 #, no-wrap
446 msgid "SEE ALSO"
447 msgstr ""
448
449 #. type: Plain text
450 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
451 #: opensuse-tumbleweed
452 msgid ""
453 "B<clone>(2), B<execve>(2), B<_exit>(2), B<fork>(2), B<_Fork>(3), "
454 "B<unshare>(2), B<wait>(2)"
455 msgstr ""
456
457 #. type: TH
458 #: debian-trixie
459 #, no-wrap
460 msgid "2024-05-02"
461 msgstr ""
462
463 #. type: TH
464 #: debian-trixie
465 #, no-wrap
466 msgid "Linux man-pages 6.9.1"
467 msgstr ""
468
469 #. type: Plain text
470 #: debian-trixie
471 msgid "Standard C library (I<libc>, I<-lc>)"
472 msgstr ""
473
474 #. In the release notes for 4.2BSD Sam Leffler wrote: `vfork: Is still
475 #. present, but definitely on its way out'.
476 #. type: Plain text
477 #: debian-trixie fedora-44 fedora-rawhide
478 msgid ""
479 "The B<vfork>() system call appeared in 3.0BSD. In 4.4BSD it was made "
480 "synonymous to B<fork>(2) but NetBSD introduced it again; see E<.UR http://"
481 "www.netbsd.org\\:/Documentation\\:/kernel\\:/vfork.html> E<.UE .> In Linux, "
482 "it has been equivalent to B<fork>(2) until Linux 2.2.0-pre6 or so. Since "
483 "Linux 2.2.0-pre9 (on i386, somewhat later on other architectures) it is an "
484 "independent system call. Support was added in glibc 2.0.112."
485 msgstr ""
486
487 #. type: Plain text
488 #: debian-trixie fedora-44 fedora-rawhide
489 msgid ""
490 "B<clone>(2), B<execve>(2), B<_exit>(2), B<fork>(2), B<unshare>(2), B<wait>(2)"
491 msgstr ""
492
493 #. type: TH
494 #: fedora-44 fedora-rawhide
495 #, no-wrap
496 msgid "2024-07-23"
497 msgstr ""
498
499 #. type: TH
500 #: fedora-44 fedora-rawhide
501 #, no-wrap
502 msgid "Linux man-pages 6.13"
503 msgstr ""
504
505 #. type: TH
506 #: mageia-cauldron
507 #, no-wrap
508 msgid "Linux man-pages 6.17"
509 msgstr ""
510
511 #. type: TH
512 #: opensuse-leap-16-1 opensuse-tumbleweed
513 #, no-wrap
514 msgid "Linux man-pages (unreleased)"
515 msgstr ""