Debian Codegraph @

po/fr/man3/posix_spawn.3.po

raw
1 # French translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Christophe Blaess <https://www.blaess.fr/christophe/>, 1996-2003.
5 # Stéphan Rafin <[email protected]>, 2002.
6 # Thierry Vignaud <[email protected]>, 1999, 2002.
7 # François Micaux, 2002.
8 # Alain Portal <[email protected]>, 2003-2008.
9 # Jean-Philippe Guérard <[email protected]>, 2005-2006.
10 # Jean-Luc Coulon (f5ibh) <[email protected]>, 2006-2007.
11 # Julien Cristau <[email protected]>, 2006-2007.
12 # Thomas Huriaux <[email protected]>, 2006-2008.
13 # Nicolas François <[email protected]>, 2006-2008.
14 # Florentin Duneau <[email protected]>, 2006-2010.
15 # Simon Paillard <[email protected]>, 2006, 2013, 2014.
16 # Denis Barbier <[email protected]>, 2006, 2010, 2011.
17 # David Prévot <[email protected]>, 2010, 2012-2014.
18 # Grégoire Scano <[email protected]>, 2021.
19 msgid ""
20 msgstr ""
21 "Project-Id-Version: manpages-l10n 4.22.0\n"
22 "POT-Creation-Date: 2026-06-05 06:35+0200\n"
23 "PO-Revision-Date: 2025-05-30 00:56+0200\n"
24 "Last-Translator: Grégoire Scano <[email protected]>\n"
25 "Language-Team: French <[email protected]>\n"
26 "Language: fr\n"
27 "MIME-Version: 1.0\n"
28 "Content-Type: text/plain; charset=UTF-8\n"
29 "Content-Transfer-Encoding: 8bit\n"
30 "Plural-Forms: nplurals=2; plural=n > 1;\n"
31 "X-Generator: Lokalize 22.12.3\n"
32
33 #. type: TH
34 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
35 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
36 #, no-wrap
37 msgid "posix_spawn"
38 msgstr "posix_spawn"
39
40 #. type: TH
41 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
42 #: opensuse-tumbleweed
43 #, no-wrap
44 msgid "2026-02-08"
45 msgstr "8 février 2026"
46
47 #. type: TH
48 #: archlinux debian-unstable
49 #, no-wrap
50 msgid "Linux man-pages 6.18"
51 msgstr "Pages du manuel de Linux 6.18"
52
53 #. type: SH
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 #, no-wrap
57 msgid "NAME"
58 msgstr "NOM"
59
60 #. type: Plain text
61 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
62 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
63 msgid "posix_spawn, posix_spawnp - spawn a process"
64 msgstr "posix_spawn, posix_spawnp — Engendrer un processus"
65
66 #. type: SH
67 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
68 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
69 #, no-wrap
70 msgid "LIBRARY"
71 msgstr "BIBLIOTHÈQUE"
72
73 #. type: Plain text
74 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
75 #: opensuse-leap-16-1 opensuse-tumbleweed
76 msgid "Standard C library (I<libc>,\\ I<-lc>)"
77 msgstr "Bibliothèque C standard (I<libc>,\\ I<-lc>)"
78
79 #. type: SH
80 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
81 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
82 #, no-wrap
83 msgid "SYNOPSIS"
84 msgstr "SYNOPSIS"
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 #, no-wrap
90 msgid "B<#include E<lt>spawn.hE<gt>>\n"
91 msgstr "B<#include E<lt>spawn.hE<gt>>\n"
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 #, no-wrap
97 msgid ""
98 "B<int posix_spawn(pid_t *restrict >I<pid>B<, const char *restrict >I<path>B<,>\n"
99 "B< const posix_spawn_file_actions_t *restrict >I<file_actions>B<,>\n"
100 "B< const posix_spawnattr_t *restrict >I<attrp>B<,>\n"
101 "B< char *const >I<argv>B<[restrict],>\n"
102 "B< char *const >I<envp>B<[restrict]);>\n"
103 "B<int posix_spawnp(pid_t *restrict >I<pid>B<, const char *restrict >I<file>B<,>\n"
104 "B< const posix_spawn_file_actions_t *restrict >I<file_actions>B<,>\n"
105 "B< const posix_spawnattr_t *restrict >I<attrp>B<,>\n"
106 "B< char *const >I<argv>B<[restrict],>\n"
107 "B< char *const >I<envp>B<[restrict]);>\n"
108 msgstr ""
109 "B<int posix_spawn(pid_t *restrict >I<pid>B<, const char *restrict >I<path>B<,>\n"
110 "B< const posix_spawn_file_actions_t *restrict >I<file_actions>B<,>\n"
111 "B< const posix_spawnattr_t *restrict >I<attrp>B<,>\n"
112 "B< char *const >I<argv>B<[restrict],>\n"
113 "B< char *const >I<envp>B<[restrict]);>\n"
114 "B<int posix_spawnp(pid_t *restrict >I<pid>B<, const char *restrict >I<file>B<,>\n"
115 "B< const posix_spawn_file_actions_t *restrict >I<file_actions>B<,>\n"
116 "B< const posix_spawnattr_t *restrict >I<attrp>B<,>\n"
117 "B< char *const >I<argv>B<[restrict],>\n"
118 "B< char *const >I<envp>B<[restrict]);>\n"
119
120 #. type: SH
121 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
122 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
123 #, no-wrap
124 msgid "DESCRIPTION"
125 msgstr "DESCRIPTION"
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 "The B<posix_spawn>() and B<posix_spawnp>() functions are used to create a "
132 "new child process that executes a specified file. These functions were "
133 "specified by POSIX to provide a standardized method of creating new "
134 "processes on machines that lack the capability to support the B<fork>(2) "
135 "system call. These machines are generally small, embedded systems lacking "
136 "MMU support."
137 msgstr ""
138 "Les fonctions B<posix_spawn>() et B<posix_spawnp>() sont utilisées pour "
139 "créer un processus enfant qui exécute le fichier indiqué. Ces fonctions sont "
140 "spécifiées par POSIX pour fournir une méthode standard de création de "
141 "nouveaux processus sur les machines n'ayant pas la capacité de prendre "
142 "l'appel système B<fork>(2) en charge. Ces machines sont en général de petits "
143 "systèmes embarqués sans MMU."
144
145 #. type: Plain text
146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
148 msgid ""
149 "The B<posix_spawn>() and B<posix_spawnp>() functions provide the "
150 "functionality of a combined B<fork>(2) and B<exec>(3), with some optional "
151 "housekeeping steps in the child process before the B<exec>(3). These "
152 "functions are not meant to replace the B<fork>(2) and B<execve>(2) system "
153 "calls. In fact, they provide only a subset of the functionality that can be "
154 "achieved by using the system calls."
155 msgstr ""
156 "Les fonctions B<posix_spawn>() et B<posix_spawnp>() fournissent les "
157 "fonctionnalités de B<fork>(2) et B<exec>(3) combinées, complétées par des "
158 "étapes facultatives de nettoyage dans l'enfant avant l'appel à B<exec>(3). "
159 "Ces fonctions n'ont pas vocation à remplacer les appels systèmes B<fork>(2) "
160 "et B<execve>(2). En fait, elles ne fournissent qu'un sous-ensemble des "
161 "fonctionnalités qui peuvent être réalisées par ces appels systèmes."
162
163 #. type: Plain text
164 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
165 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
166 msgid ""
167 "The only difference between B<posix_spawn>() and B<posix_spawnp>() is the "
168 "manner in which they specify the file to be executed by the child process. "
169 "With B<posix_spawn>(), the executable file is specified as a pathname (which "
170 "can be absolute or relative). With B<posix_spawnp>(), the executable file "
171 "is specified as a simple filename; the system searches for this file in the "
172 "list of directories specified by B<PATH> (in the same way as for "
173 "B<execvp>(3)). For the remainder of this page, the discussion is phrased in "
174 "terms of B<posix_spawn>(), with the understanding that B<posix_spawnp>() "
175 "differs only on the point just described."
176 msgstr ""
177 "La seule différence entre B<posix_spawn>() et B<posix_spawnp>() est la "
178 "manière avec laquelle elles spécifient le fichier devant être exécuté par le "
179 "processus enfant. Avec B<posix_spawn>(), le fichier exécutable est indiqué "
180 "par un chemin (absolu ou relatif). Avec B<posix_spawnp>(), le fichier "
181 "exécutable n'est indiqué que par un nom de fichier et le système le cherche "
182 "dans la liste des répertoires indiqués dans B<PATH> (de la même façon que "
183 "B<execvp>(3)). Le reste de cette page est écrit du point de vue de "
184 "B<posix_spawn>() et il est à garder en mémoire que B<posix_spawnp>() ne "
185 "diffère que par le point qui vient d'être décrit."
186
187 #. type: Plain text
188 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
189 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
190 msgid "The remaining arguments to these two functions are as follows:"
191 msgstr "Les arguments restants de ces fonctions sont comme suit :"
192
193 #. type: TP
194 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
195 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
196 #, no-wrap
197 msgid "I<pid>"
198 msgstr "I<pid>"
199
200 #. type: Plain text
201 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
202 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
203 msgid ""
204 "points to a buffer that is used to return the process ID of the new child "
205 "process."
206 msgstr ""
207 "pointe vers un tampon utilisé pour retourner l'identifiant du nouveau "
208 "processus enfant."
209
210 #. type: TP
211 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
212 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
213 #, no-wrap
214 msgid "I<file_actions>"
215 msgstr "I<file_actions>"
216
217 #. type: Plain text
218 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
219 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
220 msgid ""
221 "points to a I<spawn file actions object> that specifies file-related actions "
222 "to be performed in the child between the B<fork>(2) and B<exec>(3) steps. "
223 "This object is initialized and populated before the B<posix_spawn>() call "
224 "using B<posix_spawn_file_actions_init>(3) and the "
225 "B<posix_spawn_file_actions_*>() functions."
226 msgstr ""
227 "pointe vers un I<objet d'actions sur fichier> qui indique les actions en "
228 "lien avec des fichiers devant être effectuées par l'enfant entre les étapes "
229 "B<fork>(2) et B<exec>(3). Cet objet est initialisé et rempli avant l'appel à "
230 "B<posix_spawn>() par un appel aux fonctions "
231 "B<posix_spawn_file_actions_init>(3) et B<posix_spawn_file_actions_*>()."
232
233 #. type: TP
234 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
235 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
236 #, no-wrap
237 msgid "I<attrp>"
238 msgstr "I<attrp>"
239
240 #. type: Plain text
241 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
242 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
243 msgid ""
244 "points to an I<attributes objects> that specifies various attributes of the "
245 "created child process. This object is initialized and populated before the "
246 "B<posix_spawn>() call using B<posix_spawnattr_init>(3) and the "
247 "B<posix_spawnattr_*>() functions."
248 msgstr ""
249 "pointe vers un I<objet d'attributs> qui spécifie divers attributs du "
250 "processus enfant créé. Cet objet est initialisé et rempli avant l'appel à "
251 "B<posix_spawn>() par un appel aux fonctions B<posix_spawnattr_init>(3) et "
252 "B<posix_spawnattr_*>()."
253
254 #. type: TP
255 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
256 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
257 #, no-wrap
258 msgid "I<argv>"
259 msgstr "I<argv>"
260
261 #. type: TQ
262 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
263 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
264 #, no-wrap
265 msgid "I<envp>"
266 msgstr "I<envp>"
267
268 #. type: Plain text
269 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
270 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
271 msgid ""
272 "specify the argument list and environment for the program that is executed "
273 "in the child process, as for B<execve>(2)."
274 msgstr ""
275 "indiquent la liste des arguments ainsi que l'environnement du programme qui "
276 "doit être exécuté dans le processus enfant, de la même façon que "
277 "B<execve>(2)."
278
279 #. type: Plain text
280 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
281 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
282 msgid ""
283 "Below, the functions are described in terms of a three-step process: the "
284 "B<fork>() step, the pre-B<exec>() step (executed in the child), and the "
285 "B<exec>() step (executed in the child)."
286 msgstr ""
287 "Ci-dessous, les fonctions sont décrites selon une méthode en trois étapes : "
288 "B<fork>(), pré-B<exec>() (exécuté dans l'enfant) et B<exec>() (exécuté dans "
289 "l'enfant)."
290
291 #. type: SS
292 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
293 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
294 #, no-wrap
295 msgid "fork() step"
296 msgstr "L’étape fork()"
297
298 #. type: Plain text
299 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
300 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
301 msgid ""
302 "Since glibc 2.24, the B<posix_spawn>() function commences by calling "
303 "B<clone>(2) with B<CLONE_VM> and B<CLONE_VFORK> flags. Older "
304 "implementations use B<fork>(2), or possibly B<vfork>(2) (see below)."
305 msgstr ""
306 "Depuis la glibc 2.24, la fonction B<posix_spawn>() commence par appeler "
307 "B<clone>(2) avec les drapeaux B<CLONE_VM> et B<CLONE_VFORK>. Les "
308 "implémentations plus anciennes utilisent B<fork>(2) ou même B<vfork>(2) "
309 "(voir ci-dessous)."
310
311 #. type: Plain text
312 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
313 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
314 msgid ""
315 "The PID of the new child process is placed in I<*pid>. The "
316 "B<posix_spawn>() function then returns control to the parent process."
317 msgstr ""
318 "L'identifiant du nouveau processus enfant est placé dans I<*pid>. La "
319 "fonction B<posix_spawn>() rend alors la main au processus appelant."
320
321 #. type: Plain text
322 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
323 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
324 msgid ""
325 "Subsequently, the parent can use one of the system calls described in "
326 "B<wait>(2) to check the status of the child process. If the child fails in "
327 "any of the housekeeping steps described below, or fails to execute the "
328 "desired file, it exits with a status of 127."
329 msgstr ""
330 "Ensuite, le parent peut utiliser l'un des appels système décrits dans "
331 "B<wait>(2) pour vérifier l’état du processus enfant. Si l'enfant échoue dans "
332 "n'importe laquelle des étapes de nettoyage décrites ci-dessous ou n'arrive "
333 "pas à exécuter le fichier indiqué, il retourne avec un état 127. "
334
335 #. type: Plain text
336 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
337 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
338 msgid ""
339 "Before glibc 2.24, the child process is created using B<vfork>(2) instead "
340 "of B<fork>(2) when either of the following is true:"
341 msgstr ""
342 "Avant la glibc 2.24, le processus enfant est créé avec B<vfork>(2) au lieu "
343 "de B<fork>(2) lorsqu'une des conditions suivantes est remplie :"
344
345 #. type: IP
346 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
347 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
348 #, no-wrap
349 msgid "\\[bu]"
350 msgstr "-"
351
352 #. type: Plain text
353 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
354 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
355 msgid ""
356 "the I<spawn-flags> element of the attributes object pointed to by I<attrp> "
357 "contains the GNU-specific flag B<POSIX_SPAWN_USEVFORK>; or"
358 msgstr ""
359 "l'élément I<spawn-flags> de l'objet d'attributs sur lequel I<attrp> pointe "
360 "contient le drapeau B<POSIX_SPAWN_USEVFORK> spécifique à GNU ; ou"
361
362 #. type: Plain text
363 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
364 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
365 msgid ""
366 "I<file_actions> is NULL and the I<spawn-flags> element of the attributes "
367 "object pointed to by I<attrp> does I<not> contain B<POSIX_SPAWN_SETSIGMASK>, "
368 "B<POSIX_SPAWN_SETSIGDEF>, B<POSIX_SPAWN_SETSCHEDPARAM>, "
369 "B<POSIX_SPAWN_SETSCHEDULER>, B<POSIX_SPAWN_SETPGROUP>, or "
370 "B<POSIX_SPAWN_RESETIDS>."
371 msgstr ""
372 "I<file_actions> est NULL et l'élément I<spawn-flags> de l'objet d'attributs "
373 "sur lequel pointe I<attrp> ne contient I<pas> B<POSIX_SPAWN_SETSIGMASK>, "
374 "B<POSIX_SPAWN_SETSIGDEF>, B<POSIX_SPAWN_SETSCHEDPARAM>, "
375 "B<POSIX_SPAWN_SETSCHEDULER>, B<POSIX_SPAWN_SETPGROUP> ou "
376 "B<POSIX_SPAWN_RESETIDS>."
377
378 #. type: Plain text
379 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
380 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
381 msgid ""
382 "In other words, B<vfork>(2) is used if the caller requests it, or if there "
383 "is no cleanup expected in the child before it B<exec>(3)s the requested file."
384 msgstr ""
385 "En d'autres termes, B<vfork>(2) est utilisée si l'appelant le demande ou si "
386 "aucun nettoyage n'est attendu dans l'enfant avant qu'il n'B<exec>(3)ute le "
387 "fichier demandé."
388
389 #. type: SS
390 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
391 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
392 #, no-wrap
393 msgid "pre-exec() step: housekeeping"
394 msgstr "L’étape pré-exec() : nettoyage"
395
396 #. type: Plain text
397 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
398 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
399 msgid ""
400 "In between the B<fork()> and the B<exec()> steps, a child process may need "
401 "to perform a set of housekeeping actions. The B<posix_spawn>() and "
402 "B<posix_spawnp>() functions support a small, well-defined set of system "
403 "tasks that the child process can accomplish before it executes the "
404 "executable file. These operations are controlled by the attributes object "
405 "pointed to by I<attrp> and the file actions object pointed to by "
406 "I<file_actions>. In the child, processing is done in the following sequence:"
407 msgstr ""
408 "Entre les étapes B<fork>() et B<exec>(), un processus enfant peut avoir à "
409 "effectuer un ensemble d'actions de nettoyage. Les fonctions B<posix_spawn>() "
410 "et B<posix_spawnp>() prennent en charge un ensemble, petit et bien "
411 "déterminé, de tâches système que l'enfant peut accomplir avant d'exécuter le "
412 "fichier exécutable. Ces opérations sont contrôlées par l'objet d'attributs "
413 "sur lequel I<attrp> pointe et l'objet d'actions sur fichier sur lequel "
414 "I<file_actions> pointe. Dans l'enfant, le traitement est fait dans l'ordre "
415 "suivant :"
416
417 #. type: IP
418 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
419 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
420 #, no-wrap
421 msgid "(1)"
422 msgstr "(1)"
423
424 #. type: Plain text
425 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
426 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
427 msgid ""
428 "Process attribute actions: signal mask, signal default handlers, scheduling "
429 "algorithm and parameters, process group, and effective user and group IDs "
430 "are changed as specified by the attributes object pointed to by I<attrp>."
431 msgstr ""
432 "Actions d'attributs de processus : masque de signaux, gestionnaires de "
433 "signaux par défaut, algorithme d'ordonnancement et paramètres, groupe du "
434 "processus, et les identifiants d'utilisateur et de groupe effectifs sont "
435 "changés comme indiqué dans l'objet d'attributs vers lequel I<attrp> pointe."
436
437 #. type: IP
438 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
439 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
440 #, no-wrap
441 msgid "(2)"
442 msgstr "(2)"
443
444 #. type: Plain text
445 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
446 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
447 msgid ""
448 "File actions, as specified in the I<file_actions> argument, are performed in "
449 "the order that they were specified using calls to the "
450 "B<posix_spawn_file_actions_add*>() functions."
451 msgstr ""
452 "Les actions sur fichier, telles qu'indiquées dans l'argument I<file_action>, "
453 "sont effectuées dans l'ordre dans lequel elles ont été spécifiées par les "
454 "appels aux fonctions B<posix_spawn_file_actions_add*>()."
455
456 #. type: IP
457 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
458 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
459 #, no-wrap
460 msgid "(3)"
461 msgstr "(3)"
462
463 #. type: Plain text
464 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
465 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
466 msgid "File descriptors with the B<FD_CLOEXEC> flag set are closed."
467 msgstr ""
468 "Les descripteurs de fichiers avec le drapeau B<FD_CLOEXEC> sont fermés."
469
470 #. type: Plain text
471 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
472 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
473 msgid ""
474 "All process attributes in the child, other than those affected by attributes "
475 "specified in the object pointed to by I<attrp> and the file actions in the "
476 "object pointed to by I<file_actions>, will be affected as though the child "
477 "was created with B<fork>(2) and it executed the program with B<execve>(2)."
478 msgstr ""
479 "Tous les attributs de processus de l'enfant, autres que ceux affectés par "
480 "les attributs indiqués dans l'objet vers lequel I<attrp> pointe et par les "
481 "actions sur fichier indiquées dans l'objet vers lequel I<file_actions> "
482 "pointe, seront affectés comme si l'enfant avait été créé par B<fork>(2) et "
483 "que le programme avait été exécuté par B<execve>(2)."
484
485 #. type: Plain text
486 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
487 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
488 msgid ""
489 "The process attributes actions are defined by the attributes object pointed "
490 "to by I<attrp>. The I<spawn-flags> attribute (set using "
491 "B<posix_spawnattr_setflags>(3)) controls the general actions that occur, "
492 "and other attributes in the object specify values to be used during those "
493 "actions."
494 msgstr ""
495 "Les actions d'attributs de processus sont définies par l'objet d'attributs "
496 "vers lequel I<attrp> pointe. L'attribut I<spawn-flags> (indiqué par un appel "
497 "à B<posix_spawnattr_setflags>(3)) contrôle les actions globales effectuées, "
498 "et les autres attributs de l'objet déterminent les valeurs utilisées durant "
499 "ces actions."
500
501 #. type: Plain text
502 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
503 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
504 msgid ""
505 "The effects of the flags that may be specified in I<spawn-flags> are as "
506 "follows:"
507 msgstr ""
508 "Les effets des drapeaux qui peuvent être indiqués dans I<spawn-flags> sont "
509 "les suivants :"
510
511 #. type: TP
512 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
513 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
514 #, no-wrap
515 msgid "B<POSIX_SPAWN_SETSIGMASK>"
516 msgstr "B<POSIX_SPAWN_SETSIGMASK>"
517
518 #. FIXME .
519 #. (see
520 #. .BR posix_spawnattr_setsigmask (3))
521 #. type: Plain text
522 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
523 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
524 msgid ""
525 "Set the signal mask to the signal set specified in the I<spawn-sigmask> "
526 "attribute of the object pointed to by I<attrp>. If the "
527 "B<POSIX_SPAWN_SETSIGMASK> flag is not set, then the child inherits the "
528 "parent's signal mask."
529 msgstr ""
530 "Fixe le masque de signaux à l'ensemble donné dans l'attribut I<spawn-"
531 "sigmask> de l'objet vers lequel I<attrp> pointe. Si le drapeau "
532 "B<POSIX_SPAWN_SETSIGMASK> n'est pas levé, alors l'enfant hérite du masque de "
533 "signaux de son parent."
534
535 #. type: TP
536 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
537 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
538 #, no-wrap
539 msgid "B<POSIX_SPAWN_SETSIGDEF>"
540 msgstr "B<POSIX_SPAWN_SETSIGDEF>"
541
542 #. FIXME .
543 #. (see
544 #. .BR posix_spawnattr_setsigdefault (3))
545 #. type: Plain text
546 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
547 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
548 msgid ""
549 "Reset the disposition of all signals in the set specified in the I<spawn-"
550 "sigdefault> attribute of the object pointed to by I<attrp> to the default. "
551 "For the treatment of the dispositions of signals not specified in the "
552 "I<spawn-sigdefault> attribute, or the treatment when "
553 "B<POSIX_SPAWN_SETSIGDEF> is not specified, see B<execve>(2)."
554 msgstr ""
555 "Réétablit la disposition de tous les signaux indiqués dans l'attribut "
556 "I<spawn-sigdefault> de l'objet vers lequel I<attrp> pointe à la valeur par "
557 "défaut. Pour le traitement des dispositions de signaux non spécifiées dans "
558 "l'attribut I<spawn-sigdefault> ou le traitement lorsque "
559 "B<POSIX_SPAWN_SETSIGDEF> n'est pas spécifié, consultez B<execve>(2)."
560
561 #. type: TP
562 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
563 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
564 #, no-wrap
565 msgid "B<POSIX_SPAWN_SETSCHEDPARAM>"
566 msgstr "B<POSIX_SPAWN_SETSCHEDPARAM>"
567
568 #. (POSIX_PRIORITY_SCHEDULING only)
569 #. FIXME .
570 #. (see
571 #. .BR posix_spawnattr_setschedparam (3))
572 #. type: Plain text
573 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
574 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
575 msgid ""
576 "If this flag is set, and the B<POSIX_SPAWN_SETSCHEDULER> flag is not set, "
577 "then set the scheduling parameters to the parameters specified in the "
578 "I<spawn-schedparam> attribute of the object pointed to by I<attrp>."
579 msgstr ""
580 "Si ce drapeau est levé et que le drapeau B<POSIX_SPAWN_SETSCHEDULER> n'est "
581 "pas levé, fixer alors les paramètres de l'ordonnanceur aux paramètres "
582 "définis dans l'attribut I<spawn-schedparam> de l'objet sur lequel I<attrp> "
583 "pointe."
584
585 #. type: TP
586 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
587 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
588 #, no-wrap
589 msgid "B<POSIX_SPAWN_SETSCHEDULER>"
590 msgstr "B<POSIX_SPAWN_SETSCHEDULER>"
591
592 #. type: Plain text
593 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
594 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
595 msgid ""
596 "Set the scheduling policy algorithm and parameters of the child, as follows:"
597 msgstr ""
598 "Fixe l'algorithme de stratégie d'ordonnancement et les paramètres de "
599 "l'enfant comme suit :"
600
601 #. FIXME .
602 #. (see
603 #. .BR posix_spawnattr_setpolicy (3))
604 #. type: Plain text
605 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
606 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
607 msgid ""
608 "The scheduling policy is set to the value specified in the I<spawn-"
609 "schedpolicy> attribute of the object pointed to by I<attrp>."
610 msgstr ""
611 "La stratégie d'ordonnancement est réglée à la valeur indiquée dans "
612 "l'attribut I<spawn-schedpolicy> de l'objet sur lequel I<attrp> pointe."
613
614 #. FIXME .
615 #. (see
616 #. .BR posix_spawnattr_setschedparam (3))
617 #. type: Plain text
618 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
619 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
620 msgid ""
621 "The scheduling parameters are set to the value specified in the I<spawn-"
622 "schedparam> attribute of the object pointed to by I<attrp> (but see BUGS)."
623 msgstr ""
624 "Les paramètres de l'ordonnanceur sont fixés à la valeur indiquée dans "
625 "l'attribut I<spawn-schedparam> de l'objet sur lequel I<attrp> pointe (mais "
626 "voir la section BOGUES)."
627
628 #. type: Plain text
629 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
630 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
631 msgid ""
632 "If the B<POSIX_SPAWN_SETSCHEDPARAM> and B<POSIX_SPAWN_SETSCHEDPOLICY> flags "
633 "are not specified, the child inherits the corresponding scheduling "
634 "attributes from the parent."
635 msgstr ""
636 "Si les drapeaux B<POSIX_SPAWN_SETSCHEDPARAM> et "
637 "B<POSIX_SPAWN_SETSCHEDPOLICY> ne sont pas spécifiés, l'enfant hérite du "
638 "parent les attributs correspondants de l'ordonnanceur."
639
640 #. type: TP
641 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
642 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
643 #, no-wrap
644 msgid "B<POSIX_SPAWN_RESETIDS>"
645 msgstr "B<POSIX_SPAWN_RESETIDS>"
646
647 #. type: Plain text
648 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
649 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
650 msgid ""
651 "If this flag is set, reset the effective UID and GID to the real UID and GID "
652 "of the parent process. If this flag is not set, then the child retains the "
653 "effective UID and GID of the parent. In either case, if the set-user-ID and "
654 "set-group-ID permission bits are enabled on the executable file, their "
655 "effect will override the setting of the effective UID and GID (se "
656 "B<execve>(2))."
657 msgstr ""
658 "Si le drapeau est levé, réinitialiser les UID et GID effectifs aux UID et "
659 "GID réels du processus parent. Si ce drapeau n'est pas indiqué, alors "
660 "l'enfant conserve les UID et GID effectifs du processus parent. Dans les "
661 "deux cas, si les bits de permission set-user-ID et set-group-ID sont activés "
662 "sur le fichier exécutable, leur effet surcharge la valeur des UID et GID "
663 "effectifs (voir B<execve>(2))."
664
665 #. type: TP
666 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
667 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
668 #, no-wrap
669 msgid "B<POSIX_SPAWN_SETPGROUP>"
670 msgstr "B<POSIX_SPAWN_SETPGROUP>"
671
672 #. FIXME .
673 #. (see
674 #. .BR posix_spawnattr_setpgroup (3))
675 #. type: Plain text
676 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
677 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
678 msgid ""
679 "Set the process group to the value specified in the I<spawn-pgroup> "
680 "attribute of the object pointed to by I<attrp>. If the I<spawn-pgroup> "
681 "attribute has the value 0, the child's process group ID is made the same as "
682 "its process ID. If the B<POSIX_SPAWN_SETPGROUP> flag is not set, the child "
683 "inherits the parent's process group ID."
684 msgstr ""
685 "Fixer le groupe du processus à la valeur indiquée dans l'attribut I<spawn-"
686 "pgroup> de l'objet sur lequel I<attrp> pointe. Si l'attribut I<spawn-pgroup> "
687 "à une valeur de 0, l'identifiant de groupe du processus enfant est rendu "
688 "identique à l'identifiant de processus. Si le drapeau "
689 "B<POSIX_SPAWN_SETPGROUP> n'est pas levé, l'enfant hérite de l'identifiant de "
690 "groupe du processus parent."
691
692 #. type: TP
693 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
694 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
695 #, no-wrap
696 msgid "B<POSIX_SPAWN_USEVFORK>"
697 msgstr "B<POSIX_SPAWN_USEVFORK>"
698
699 #. type: Plain text
700 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
701 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
702 msgid ""
703 "Since glibc 2.24, this flag has no effect. On older implementations, "
704 "setting this flag forces the B<fork()> step to use B<vfork>(2) instead of "
705 "B<fork>(2). The B<_GNU_SOURCE> feature test macro must be defined to obtain "
706 "the definition of this constant."
707 msgstr ""
708 "Depuis la version 2.24 de la glibc, ce drapeau n'a aucun effet. Sur des "
709 "implémentations plus anciennes, lever ce drapeau force l’étape B<fork()> à "
710 "utiliser B<vfork>(2) à la place de B<fork>(2). La macro de test de "
711 "fonctionnalités B<_GNU_SOURCE> doit être définie pour obtenir une définition "
712 "de cette constante."
713
714 #. type: TP
715 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
716 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
717 #, no-wrap
718 msgid "B<POSIX_SPAWN_SETSID> (since glibc 2.26)"
719 msgstr "B<POSIX_SPAWN_SETSID> (depuis la glibc 2.26)"
720
721 #. This flag has been accepted in POSIX, see:
722 #. http://austingroupbugs.net/view.php?id=1044
723 #. and has been implemented since glibc 2.26
724 #. commit daeb1fa2e1b33323e719015f5f546988bd4cc73b
725 #. type: Plain text
726 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
727 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
728 msgid ""
729 "If this flag is set, the child process shall create a new session and become "
730 "the session leader. The child process shall also become the process group "
731 "leader of the new process group in the session (see B<setsid>(2)). The "
732 "B<_GNU_SOURCE> feature test macro must be defined to obtain the definition "
733 "of this constant."
734 msgstr ""
735 "Si ce drapeau est levé, le processus enfant doit créer une nouvelle session "
736 "et devenir le responsable de cette session. Le processus enfant doit aussi "
737 "devenir le responsable du nouveau groupe du processus de la session (voir "
738 "B<setid>(2)). La macro de test de fonctionnalités B<_GNU_SOURCE> doit être "
739 "définie pour obtenir la définition de cette constante."
740
741 #. mtk: I think we probably don't want to say the following, since it
742 #. could lead people to do the wrong thing
743 #. The POSIX standard tells you to call
744 #. this function to de-initialize the attributes object pointed to by
745 #. .I attrp
746 #. when you are done with it;
747 #. however, on Linux systems this operation is a no-op.
748 #. type: Plain text
749 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
750 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
751 msgid ""
752 "If I<attrp> is NULL, then the default behaviors described above for each "
753 "flag apply."
754 msgstr ""
755 "Si I<attrp> est NULL, alors les comportements par défaut décrits plus haut "
756 "pour chaque drapeau s'appliquent."
757
758 #. type: Plain text
759 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
760 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
761 msgid ""
762 "The I<file_actions> argument specifies a sequence of file operations that "
763 "are performed in the child process after the general processing described "
764 "above, and before it performs the B<exec>(3). If I<file_actions> is NULL, "
765 "then no special action is taken, and standard B<exec>(3) semantics apply\\"
766 "[em]file descriptors open before the exec remain open in the new process, "
767 "except those for which the B<FD_CLOEXEC> flag has been set. File locks "
768 "remain in place."
769 msgstr ""
770 "L'argument I<file_actions> indique une séquence d'opérations sur fichier "
771 "effectuées dans le processus enfant après le traitement général décrit plus "
772 "haut et avant de faire l’étape B<exec>(). Si B<file_actions> est NULL, "
773 "aucune action spécifique n'est effectuée et la sémantique standard de "
774 "B<exec>(3) s'applique : les descripteurs de fichier ouverts avant B<exec>() "
775 "restent ouverts dans le nouveau processus à l'exception de ceux pour "
776 "lesquels le drapeau B<FD_CLOEXEC> a été levé. Les verrous de fichier restent "
777 "en place."
778
779 #. FIXME . I think the following is best placed in the
780 #. posix_spawn_file_actions_adddup2(3) page, and a similar statement is
781 #. also needed in posix_spawn_file_actions_addclose(3)
782 #. Note that you can specify file descriptors in
783 #. .I posix_spawn_file_actions_adddup2 (3)
784 #. which would not be usable if you called
785 #. .BR dup2 (2)
786 #. at that time--i.e., file descriptors that are opened or
787 #. closed by the earlier operations
788 #. added to
789 #. .I file_actions .
790 #. type: Plain text
791 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
792 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
793 msgid ""
794 "If I<file_actions> is not NULL, then it contains an ordered set of requests "
795 "to B<open>(2), B<close>(2), and B<dup2>(2) files. These requests are added "
796 "to the I<file_actions> by B<posix_spawn_file_actions_addopen>(3), "
797 "B<posix_spawn_file_actions_addclose>(3), and "
798 "B<posix_spawn_file_actions_adddup2>(3). The requested operations are "
799 "performed in the order they were added to I<file_actions>."
800 msgstr ""
801 "Si I<file_actions> n'est pas NULL, il contient un ensemble ordonné de "
802 "demandes pour exécuter B<open>(2), B<close>(2) et B<dup2>() sur des "
803 "fichiers . Ces requêtes sont ajoutées à I<file_actions> par "
804 "B<posix_spawn_file_actions_addopen>(3), "
805 "B<posix_spawn_file_actions_addclose>(3) et "
806 "B<posix_spawn_file_actions_adddup2>(3). Les opérations demandées sont "
807 "effectuées dans l'ordre dans lequel elles ont été ajoutées à I<file_actions>."
808
809 #. type: Plain text
810 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
811 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
812 msgid ""
813 "If any of the housekeeping actions fails (due to bogus values being passed "
814 "or other reasons why signal handling, process scheduling, process group ID "
815 "functions, and file descriptor operations might fail), the child process "
816 "exits with exit value 127."
817 msgstr ""
818 "Si une des actions de nettoyage échoue (à cause de mauvaises valeurs ou pour "
819 "toute autre raison pour laquelle la gestion de signaux, l'ordonnancement de "
820 "processus, les fonctions d'identifiant de groupe de processus ou "
821 "d'opérations de descripteur de fichier peuvent échouer), le processus enfant "
822 "termine avec un code de retour de 127."
823
824 #. type: SS
825 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
826 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
827 #, no-wrap
828 msgid "exec() step"
829 msgstr "L’étape exec()"
830
831 #. type: Plain text
832 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
833 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
834 msgid ""
835 "Once the child has successfully forked and performed all requested pre-exec "
836 "steps, the child runs the requested executable."
837 msgstr ""
838 "Une fois que l'enfant s'est dédoublé sans erreur et a exécuté toutes les "
839 "étapes B<pré-exec>(), l'enfant lance l'exécutable souhaité."
840
841 #. type: Plain text
842 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
843 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
844 msgid ""
845 "The child process takes its environment from the I<envp> argument, which is "
846 "interpreted as if it had been passed to B<execve>(2). The arguments to the "
847 "created process come from the I<argv> argument, which is processed as for "
848 "B<execve>(2)."
849 msgstr ""
850 "Le processus enfant récupère son environnement depuis l'argument I<envp>, "
851 "analysé comme si B<execve>(2) avait été appelé avec. Les arguments du "
852 "processus créé viennent de l'argument I<argv>, analysé comme pour "
853 "B<execve>(2)."
854
855 #. type: SH
856 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
857 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
858 #, no-wrap
859 msgid "RETURN VALUE"
860 msgstr "VALEUR RENVOYÉE"
861
862 #. type: Plain text
863 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
864 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
865 msgid ""
866 "Upon successful completion, B<posix_spawn>() and B<posix_spawnp>() place "
867 "the PID of the child process in I<pid>, and return 0. If there is an error "
868 "during the B<fork()> step, then no child is created, the contents of I<*pid> "
869 "are unspecified, and these functions return an error number as described "
870 "below."
871 msgstr ""
872 "En cas de succès, B<posix_spawn>() et B<posix_spawnp>() placent "
873 "l'identifiant du processus enfant dans I<pid> et renvoient B<0>. En cas "
874 "d'erreur lors de l’étape B<fork()>, aucun enfant n'est créé, le contenu de "
875 "I<*pid> n'est pas défini et ces fonctions renvoient un code d'erreur comme "
876 "décrit plus bas."
877
878 #. type: Plain text
879 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
880 #: opensuse-tumbleweed
881 #, fuzzy
882 #| msgid ""
883 #| "Even when these functions return a success status, the child process may "
884 #| "still fail for a plethora of reasons related to its pre-B<exec>() "
885 #| "initialization. In addition, the B<exec>(3) may fail. In all of these "
886 #| "cases, the child process will exit with the exit value of 127."
887 msgid ""
888 "Even when these functions return a success status, the child process may "
889 "still fail for a plethora of reasons related to its pre-B<exec>() "
890 "initialization. In addition, the B<exec>(3) may fail. In all of these "
891 "cases, the child process will exit with the exit value of 127."
892 msgstr ""
893 "Même lorsque ces fonctions renvoient un état de réussite, le processus "
894 "enfant peut encore échouer pour une pléthore de raisons liées au B<pré-"
895 "exec>(). De plus, B<exec>(3) peut échouer. Dans tous ces cas, le processus "
896 "enfant termine avec 127 comme code de retour."
897
898 #. type: SH
899 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
900 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
901 #, no-wrap
902 msgid "ERRORS"
903 msgstr "ERREURS"
904
905 #. type: Plain text
906 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
907 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
908 msgid ""
909 "The B<posix_spawn>() and B<posix_spawnp>() functions fail only in the case "
910 "where the underlying B<fork>(2), B<vfork>(2), or B<clone>(2) call fails; in "
911 "these cases, these functions return an error number, which will be one of "
912 "the errors described for B<fork>(2), B<vfork>(2), or B<clone>(2)."
913 msgstr ""
914 "Les fonctions B<posix_spawn>() et B<posix_spawnp>() n'échouent que dans le "
915 "cas où l'appel sous-jacent à B<fork>(2), B<vfork>(2) ou B<clone>(2) échoue. "
916 "Dans ces cas, ces fonctions renvoient un code d'erreur correspondant aux "
917 "erreurs décrites pour B<fork>(2), B<vfork>(2) ou B<clone>(2)."
918
919 #. type: Plain text
920 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
921 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
922 msgid "In addition, these functions fail if:"
923 msgstr "De plus, ces fonction échouent si :"
924
925 #. type: TP
926 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
927 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
928 #, no-wrap
929 msgid "B<ENOSYS>"
930 msgstr "B<ENOSYS>"
931
932 #. type: Plain text
933 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
934 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
935 msgid "Function not supported on this system."
936 msgstr "Fonction non prise en charge sur ce système."
937
938 #. type: SH
939 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
940 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
941 #, no-wrap
942 msgid "STANDARDS"
943 msgstr "NORMES"
944
945 #. type: Plain text
946 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
947 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
948 msgid "POSIX.1-2008."
949 msgstr "POSIX.1-2008."
950
951 #. type: SH
952 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
953 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
954 #, no-wrap
955 msgid "HISTORY"
956 msgstr "HISTORIQUE"
957
958 #. FIXME . This piece belongs in spawnattr_setflags(3)
959 #. The
960 #. .B POSIX_SPAWN_USEVFORK
961 #. flag is a GNU extension; the
962 #. .B _GNU_SOURCE
963 #. feature test macro must be defined (before including any header files)
964 #. to obtain the definition of this constant.
965 #. type: Plain text
966 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
967 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
968 msgid "glibc 2.2. POSIX.1-2001."
969 msgstr "glibc 2.2. POSIX.1-2001."
970
971 #. type: SH
972 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
973 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
974 #, no-wrap
975 msgid "NOTES"
976 msgstr "NOTES"
977
978 #. type: Plain text
979 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
980 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
981 msgid ""
982 "The housekeeping activities in the child are controlled by the objects "
983 "pointed to by I<attrp> (for non-file actions) and I<file_actions> In POSIX "
984 "parlance, the I<posix_spawnattr_t> and I<posix_spawn_file_actions_t> data "
985 "types are referred to as objects, and their elements are not specified by "
986 "name. Portable programs should initialize these objects using only the "
987 "POSIX-specified functions. (In other words, although these objects may be "
988 "implemented as structures containing fields, portable programs must avoid "
989 "dependence on such implementation details.)"
990 msgstr ""
991 "Les activités de nettoyage dans l'enfant sont contrôlées par les objets sur "
992 "lesquels I<attrp> pointe (pour les actions n'agissant pas sur des fichiers) "
993 "et I<file_actions>. Dans le jargon POSIX, les types de données "
994 "I<posix_spawnattr_t> et I<posix_spawn_file_actions_t> sont évoqués comme des "
995 "objets et leurs éléments ne sont pas spécifiés par des noms. Les programmes "
996 "portables doivent initialiser ces objets par l'appel aux fonctions "
997 "spécifiées par POSIX uniquement. En d'autres termes, bien que ces objets "
998 "puissent être implémentés avec des structures contenant des champs, les "
999 "programmes portables doivent éviter toute dépendance à de tels détails "
1000 "d'implémentation."
1001
1002 #. Tested on glibc 2.12
1003 #. type: Plain text
1004 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1005 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1006 msgid ""
1007 "According to POSIX, it is unspecified whether fork handlers established with "
1008 "B<pthread_atfork>(3) are called when B<posix_spawn>() is invoked. Since "
1009 "glibc 2.24, the fork handlers are not executed in any case. On older "
1010 "implementations, fork handlers are called only if the child is created using "
1011 "B<fork>(2)."
1012 msgstr ""
1013 "Selon POSIX, il n'est pas déterminé si les gestionnaires de dédoublement "
1014 "établis avec B<pthread_atfork>(3) sont appelés lorsque B<posix_spawn>() est "
1015 "appelée. Depuis la version 2.24 de la glibc, les gestionnaires de "
1016 "dédoublement ne sont jamais exécutés. Sur des implémentations plus "
1017 "anciennes, les gestionnaires de dédoublement ne sont appelés que si l'enfant "
1018 "est créé avec B<fork>(2)."
1019
1020 #. type: Plain text
1021 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1022 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1023 msgid ""
1024 "There is no \"posix_fspawn\" function (i.e., a function that is to "
1025 "B<posix_spawn>() as B<fexecve>(3) is to B<execve>(2)). However, this "
1026 "functionality can be obtained by specifying the I<path> argument as one of "
1027 "the files in the caller's I</proc/self/fd> directory."
1028 msgstr ""
1029 "Il n'existe pas de fonction « posix_fspawn » (c'est-à-dire une fonction qui "
1030 "serait à B<posix_spawn>() ce que B<fexecve>(3) est à B<execve>(2)). "
1031 "Cependant, cette fonctionnalité peut être obtenue en spécifiant l'argument "
1032 "I<path> comme l'un des fichiers dans le répertoire I</proc/self/fd> de "
1033 "l'appelant."
1034
1035 #. type: SH
1036 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1037 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1038 #, no-wrap
1039 msgid "BUGS"
1040 msgstr "BOGUES"
1041
1042 #. http://sourceware.org/bugzilla/show_bug.cgi?id=12052
1043 #. type: Plain text
1044 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1045 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1046 msgid ""
1047 "POSIX.1 says that when B<POSIX_SPAWN_SETSCHEDULER> is specified in I<spawn-"
1048 "flags>, then the B<POSIX_SPAWN_SETSCHEDPARAM> (if present) is ignored. "
1049 "However, before glibc 2.14, calls to B<posix_spawn>() failed with an error "
1050 "if B<POSIX_SPAWN_SETSCHEDULER> was specified without also specifying "
1051 "B<POSIX_SPAWN_SETSCHEDPARAM>."
1052 msgstr ""
1053 "POSIX.1 spécifie que lorsque B<POSIX_SPAWN_SETSCHEDULER> est indiqué dans "
1054 "I<spawn-flags>, alors B<POSIX_SPAWN_SETSCHEDPARAM> est ignoré s'il est "
1055 "présent. Cependant, avant la version 2.14 de la glibc, les appels à "
1056 "B<posix_spawn>() échouent avec une erreur si B<POSIX_SPAWN_SETSCHEDULER> est "
1057 "indiqué sans que I<POSIX_SPAWN_SETSCHEDPARAM> ne le soit également."
1058
1059 #. type: SH
1060 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1061 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1062 #, no-wrap
1063 msgid "EXAMPLES"
1064 msgstr "EXEMPLES"
1065
1066 #. type: Plain text
1067 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1068 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1069 msgid ""
1070 "The program below demonstrates the use of various functions in the POSIX "
1071 "spawn API. The program accepts command-line attributes that can be used to "
1072 "create file actions and attributes objects. The remaining command-line "
1073 "arguments are used as the executable name and command-line arguments of the "
1074 "program that is executed in the child."
1075 msgstr ""
1076 "Le programme suivant illustre l'utilisation de plusieurs fonctions de l'API "
1077 "spawn de POSIX. Le programme accepte des attributs en ligne de commande qui "
1078 "peuvent être utilisés pour créer des objets d'actions sur fichier ou "
1079 "d'attributs. Les arguments de la ligne de commande restants sont utilisés "
1080 "comme nom de l'exécutable et comme arguments de ligne de commande du "
1081 "programme exécuté dans l'enfant."
1082
1083 #. type: Plain text
1084 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1085 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1086 msgid ""
1087 "In the first run, the B<date>(1) command is executed in the child, and the "
1088 "B<posix_spawn>() call employs no file actions or attributes objects."
1089 msgstr ""
1090 "Dans la première invocation, la commande B<date>(1) est exécutée dans "
1091 "l'enfant et l'appel à B<posix_spawn>() n'utilise pas d'objets d'actions sur "
1092 "fichier ou d'attributs."
1093
1094 #. type: Plain text
1095 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1096 #: opensuse-tumbleweed
1097 #, fuzzy, no-wrap
1098 #| msgid ""
1099 #| "$ B<./a.out date>\n"
1100 #| "PID of child: 7634\n"
1101 #| "Tue Feb 1 19:47:50 CEST 2011\n"
1102 #| "Child status: exited, status=0\n"
1103 msgid ""
1104 "$B< ./a.out date>;\n"
1105 "PID of child: 7634\n"
1106 "Tue Feb 1 19:47:50 CEST 2011\n"
1107 "Child status: exited, status=0\n"
1108 msgstr ""
1109 "$ B<./a.out date>\n"
1110 "PID de l'enfant : 7634\n"
1111 "Tue Feb 1 19:47:50 CEST 2011\n"
1112 "État de l'enfant : terminé, statut=0\n"
1113
1114 #. type: Plain text
1115 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1116 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1117 msgid ""
1118 "In the next run, the I<-c> command-line option is used to create a file "
1119 "actions object that closes standard output in the child. Consequently, "
1120 "B<date>(1) fails when trying to perform output and exits with a status of 1."
1121 msgstr ""
1122 "Dans la deuxième invocation, l'option en ligne de commande I<-c> est "
1123 "utilisée pour créer un objet d'actions sur fichier qui ferme la sortie "
1124 "standard dans l'enfant. Par la suite, B<date>(1) échoue lors d'une tentative "
1125 "d'écriture et termine avec un état B<1>."
1126
1127 #. type: Plain text
1128 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1129 #: opensuse-tumbleweed
1130 #, fuzzy, no-wrap
1131 #| msgid ""
1132 #| "$ B<./a.out -c date>\n"
1133 #| "PID of child: 7636\n"
1134 #| "date: write error: Bad file descriptor\n"
1135 #| "Child status: exited, status=1\n"
1136 msgid ""
1137 "$B< ./a.out -c date>;\n"
1138 "PID of child: 7636\n"
1139 "date: write error: Bad file descriptor\n"
1140 "Child status: exited, status=1\n"
1141 msgstr ""
1142 "$ B<./a.out -c date>\n"
1143 "PID de l'enfant : 7636\n"
1144 "date : erreur d'écriture : Mauvais descripteur de fichier\n"
1145 "État de l'enfant : terminé, état=1\n"
1146
1147 #. type: Plain text
1148 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1149 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1150 msgid ""
1151 "In the next run, the I<-s> command-line option is used to create an "
1152 "attributes object that specifies that all (blockable) signals in the child "
1153 "should be blocked. Consequently, trying to kill child with the default "
1154 "signal sent by B<kill>(1) (i.e., B<SIGTERM>) fails, because that signal is "
1155 "blocked. Therefore, to kill the child, B<SIGKILL> is necessary (B<SIGKILL> "
1156 "can't be blocked)."
1157 msgstr ""
1158 "Dans l'invocation suivante, l'option en ligne de commande I<-s> est utilisée "
1159 "pour créer un objet d'attributs qui indique que tous les signaux (blocables) "
1160 "doivent être bloqués dans l'enfant. Par la suite, une tentative de tuer "
1161 "l'enfant par le signal par défaut envoyé par B<kill>(1) (c'est-à-dire "
1162 "B<SIGTERM>) échoue car ce signal est bloqué. Par conséquent, il est "
1163 "nécessaire d'utiliser B<SIGKILL> pour tuer l'enfant (car B<SIGKILL> ne peut "
1164 "être bloqué)."
1165
1166 #. type: Plain text
1167 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1168 #: opensuse-tumbleweed
1169 #, fuzzy, no-wrap
1170 #| msgid ""
1171 #| "$ B<./a.out -s sleep 60 &>\n"
1172 #| "[1] 7637\n"
1173 #| "$ PID of child: 7638\n"
1174 msgid ""
1175 "$B< ./a.out -s sleep 60 &>\n"
1176 "[1] 7637\n"
1177 "$ PID of child: 7638\n"
1178 msgstr ""
1179 "$ B<./a.out -s sleep 60 &>\n"
1180 "[1] 7637\n"
1181 "$ PID de l'enfant : 7638\n"
1182
1183 #. type: Plain text
1184 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1185 #: opensuse-tumbleweed
1186 #, fuzzy, no-wrap
1187 #| msgid ""
1188 #| "$ B<kill 7638>\n"
1189 #| "$ B<kill -KILL 7638>\n"
1190 #| "$ Child status: killed by signal 9\n"
1191 #| "[1]+ Done ./a.out -s sleep 60\n"
1192 msgid ""
1193 "$B< kill 7638>;\n"
1194 "$B< kill -KILL 7638>;\n"
1195 "$ Child status: killed by signal 9\n"
1196 "[1]+ Done ./a.out -s sleep 60\n"
1197 msgstr ""
1198 "$ B<kill 7638>\n"
1199 "$ B<kill -KILL 7638>\n"
1200 "$ État de l'enfant : tué par le signal 9\n"
1201 "[1]+ Fait ./a.out -s sleep 60\n"
1202
1203 #. type: Plain text
1204 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1205 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1206 msgid ""
1207 "When we try to execute a nonexistent command in the child, the B<exec>(3) "
1208 "fails and the child exits with a status of 127."
1209 msgstr ""
1210 "Lorsque l'enfant tente d'exécuter une commande qui n'existe pas, l'appel à "
1211 "B<exec>(3) échoue et l'enfant termine avec un état 127."
1212
1213 #. type: Plain text
1214 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1215 #: opensuse-tumbleweed
1216 #, fuzzy, no-wrap
1217 #| msgid ""
1218 #| "$ B<./a.out xxxxx\n"
1219 #| "PID of child: 10190\n"
1220 #| "Child status: exited, status=127>\n"
1221 msgid ""
1222 "$B< ./a.out xxxxx>;\n"
1223 "PID of child: 10190\n"
1224 "Child status: exited, status=127\n"
1225 msgstr ""
1226 "$ B<./a.out xxxxx\n"
1227 "PID de l'enfant : 10190\n"
1228 "Statut de l'enfant : terminé, état=127>\n"
1229
1230 #. type: SS
1231 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1232 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1233 #, no-wrap
1234 msgid "Program source"
1235 msgstr "Source du programme"
1236
1237 #. type: Plain text
1238 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1239 #: opensuse-tumbleweed
1240 #, fuzzy, no-wrap
1241 #| msgid ""
1242 #| "#include E<lt>errno.hE<gt>\n"
1243 #| "#include E<lt>spawn.hE<gt>\n"
1244 #| "#include E<lt>stdint.hE<gt>\n"
1245 #| "#include E<lt>stdio.hE<gt>\n"
1246 #| "#include E<lt>stdlib.hE<gt>\n"
1247 #| "#include E<lt>string.hE<gt>\n"
1248 #| "#include E<lt>unistd.hE<gt>\n"
1249 #| "#include E<lt>wait.hE<gt>\n"
1250 #| "\\&\n"
1251 #| "#define errExit(msg) do { perror(msg); \\[rs]\n"
1252 #| " exit(EXIT_FAILURE); } while (0)\n"
1253 #| "\\&\n"
1254 #| "#define errExitEN(en, msg) \\[rs]\n"
1255 #| " do { errno = en; perror(msg); \\[rs]\n"
1256 #| " exit(EXIT_FAILURE); } while (0)\n"
1257 #| "\\&\n"
1258 #| "char **environ;\n"
1259 #| "\\&\n"
1260 #| "int\n"
1261 #| "main(int argc, char *argv[])\n"
1262 #| "{\n"
1263 #| " pid_t child_pid;\n"
1264 #| " int s, opt, status;\n"
1265 #| " sigset_t mask;\n"
1266 #| " posix_spawnattr_t attr;\n"
1267 #| " posix_spawnattr_t *attrp;\n"
1268 #| " posix_spawn_file_actions_t file_actions;\n"
1269 #| " posix_spawn_file_actions_t *file_actionsp;\n"
1270 #| "\\&\n"
1271 #| " /* Parse command-line options, which can be used to specify an\n"
1272 #| " attributes object and file actions object for the child. */\n"
1273 #| "\\&\n"
1274 #| " attrp = NULL;\n"
1275 #| " file_actionsp = NULL;\n"
1276 #| "\\&\n"
1277 #| " while ((opt = getopt(argc, argv, \"sc\")) != -1) {\n"
1278 #| " switch (opt) {\n"
1279 #| " case \\[aq]c\\[aq]: /* -c: close standard output in child */\n"
1280 #| "\\&\n"
1281 #| " /* Create a file actions object and add a \"close\"\n"
1282 #| " action to it. */\n"
1283 #| "\\&\n"
1284 #| " s = posix_spawn_file_actions_init(&file_actions);\n"
1285 #| " if (s != 0)\n"
1286 #| " errExitEN(s, \"posix_spawn_file_actions_init\");\n"
1287 #| "\\&\n"
1288 #| " s = posix_spawn_file_actions_addclose(&file_actions,\n"
1289 #| " STDOUT_FILENO);\n"
1290 #| " if (s != 0)\n"
1291 #| " errExitEN(s, \"posix_spawn_file_actions_addclose\");\n"
1292 #| "\\&\n"
1293 #| " file_actionsp = &file_actions;\n"
1294 #| " break;\n"
1295 #| "\\&\n"
1296 #| " case \\[aq]s\\[aq]: /* -s: block all signals in child */\n"
1297 #| "\\&\n"
1298 #| " /* Create an attributes object and add a \"set signal mask\"\n"
1299 #| " action to it. */\n"
1300 #| "\\&\n"
1301 #| " s = posix_spawnattr_init(&attr);\n"
1302 #| " if (s != 0)\n"
1303 #| " errExitEN(s, \"posix_spawnattr_init\");\n"
1304 #| " s = posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGMASK);\n"
1305 #| " if (s != 0)\n"
1306 #| " errExitEN(s, \"posix_spawnattr_setflags\");\n"
1307 #| "\\&\n"
1308 #| " sigfillset(&mask);\n"
1309 #| " s = posix_spawnattr_setsigmask(&attr, &mask);\n"
1310 #| " if (s != 0)\n"
1311 #| " errExitEN(s, \"posix_spawnattr_setsigmask\");\n"
1312 #| "\\&\n"
1313 #| " attrp = &attr;\n"
1314 #| " break;\n"
1315 #| " }\n"
1316 #| " }\n"
1317 #| "\\&\n"
1318 #| " /* Spawn the child. The name of the program to execute and the\n"
1319 #| " command-line arguments are taken from the command-line arguments\n"
1320 #| " of this program. The environment of the program execed in the\n"
1321 #| " child is made the same as the parent\\[aq]s environment. */\n"
1322 #| "\\&\n"
1323 #| " s = posix_spawnp(&child_pid, argv[optind], file_actionsp, attrp,\n"
1324 #| " &argv[optind], environ);\n"
1325 #| " if (s != 0)\n"
1326 #| " errExitEN(s, \"posix_spawn\");\n"
1327 #| "\\&\n"
1328 #| " /* Destroy any objects that we created earlier. */\n"
1329 #| "\\&\n"
1330 #| " if (attrp != NULL) {\n"
1331 #| " s = posix_spawnattr_destroy(attrp);\n"
1332 #| " if (s != 0)\n"
1333 #| " errExitEN(s, \"posix_spawnattr_destroy\");\n"
1334 #| " }\n"
1335 #| "\\&\n"
1336 #| " if (file_actionsp != NULL) {\n"
1337 #| " s = posix_spawn_file_actions_destroy(file_actionsp);\n"
1338 #| " if (s != 0)\n"
1339 #| " errExitEN(s, \"posix_spawn_file_actions_destroy\");\n"
1340 #| " }\n"
1341 #| "\\&\n"
1342 #| " printf(\"PID of child: %jd\\[rs]n\", (intmax_t) child_pid);\n"
1343 #| "\\&\n"
1344 #| " /* Monitor status of the child until it terminates. */\n"
1345 #| "\\&\n"
1346 #| " do {\n"
1347 #| " s = waitpid(child_pid, &status, WUNTRACED | WCONTINUED);\n"
1348 #| " if (s == -1)\n"
1349 #| " errExit(\"waitpid\");\n"
1350 #| "\\&\n"
1351 #| " printf(\"Child status: \");\n"
1352 #| " if (WIFEXITED(status)) {\n"
1353 #| " printf(\"exited, status=%d\\[rs]n\", WEXITSTATUS(status));\n"
1354 #| " } else if (WIFSIGNALED(status)) {\n"
1355 #| " printf(\"killed by signal %d\\[rs]n\", WTERMSIG(status));\n"
1356 #| " } else if (WIFSTOPPED(status)) {\n"
1357 #| " printf(\"stopped by signal %d\\[rs]n\", WSTOPSIG(status));\n"
1358 #| " } else if (WIFCONTINUED(status)) {\n"
1359 #| " printf(\"continued\\[rs]n\");\n"
1360 #| " }\n"
1361 #| " } while (!WIFEXITED(status) && !WIFSIGNALED(status));\n"
1362 #| "\\&\n"
1363 #| " exit(EXIT_SUCCESS);\n"
1364 #| "}\n"
1365 msgid ""
1366 "#include E<lt>err.hE<gt>\n"
1367 "#include E<lt>errno.hE<gt>\n"
1368 "#include E<lt>spawn.hE<gt>\n"
1369 "#include E<lt>stdint.hE<gt>\n"
1370 "#include E<lt>stdio.hE<gt>\n"
1371 "#include E<lt>stdlib.hE<gt>\n"
1372 "#include E<lt>string.hE<gt>\n"
1373 "#include E<lt>unistd.hE<gt>\n"
1374 "#include E<lt>wait.hE<gt>\n"
1375 "\\&\n"
1376 "char **environ;\n"
1377 "\\&\n"
1378 "int\n"
1379 "main(int argc, char *argv[])\n"
1380 "{\n"
1381 " pid_t child_pid;\n"
1382 " int s, opt, status;\n"
1383 " sigset_t mask;\n"
1384 " posix_spawnattr_t attr;\n"
1385 " posix_spawnattr_t *attrp;\n"
1386 " posix_spawn_file_actions_t file_actions;\n"
1387 " posix_spawn_file_actions_t *file_actionsp;\n"
1388 "\\&\n"
1389 " /* Parse command-line options, which can be used to specify an\n"
1390 " attributes object and file actions object for the child. */\n"
1391 "\\&\n"
1392 " attrp = NULL;\n"
1393 " file_actionsp = NULL;\n"
1394 "\\&\n"
1395 " while ((opt = getopt(argc, argv, \"sc\")) != -1) {\n"
1396 " switch (opt) {\n"
1397 " case \\[aq]c\\[aq]: /* -c: close standard output in child */\n"
1398 "\\&\n"
1399 " /* Create a file actions object and add a \"close\"\n"
1400 " action to it. */\n"
1401 "\\&\n"
1402 " s = posix_spawn_file_actions_init(&file_actions);\n"
1403 " if (s != 0)\n"
1404 " errc(EXIT_FAILURE, s, \"posix_spawn_file_actions_init\");\n"
1405 "\\&\n"
1406 " s = posix_spawn_file_actions_addclose(&file_actions,\n"
1407 " STDOUT_FILENO);\n"
1408 " if (s != 0)\n"
1409 " errc(EXIT_FAILURE, s, \"posix_spawn_file_actions_addclose\");\n"
1410 "\\&\n"
1411 " file_actionsp = &file_actions;\n"
1412 " break;\n"
1413 "\\&\n"
1414 " case \\[aq]s\\[aq]: /* -s: block all signals in child */\n"
1415 "\\&\n"
1416 " /* Create an attributes object and add a \"set signal mask\"\n"
1417 " action to it. */\n"
1418 "\\&\n"
1419 " s = posix_spawnattr_init(&attr);\n"
1420 " if (s != 0)\n"
1421 " errc(EXIT_FAILURE, s, \"posix_spawnattr_init\");\n"
1422 " s = posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGMASK);\n"
1423 " if (s != 0)\n"
1424 " errc(EXIT_FAILURE, s, \"posix_spawnattr_setflags\");\n"
1425 "\\&\n"
1426 " sigfillset(&mask);\n"
1427 " s = posix_spawnattr_setsigmask(&attr, &mask);\n"
1428 " if (s != 0)\n"
1429 " errc(EXIT_FAILURE, s, \"posix_spawnattr_setsigmask\");\n"
1430 "\\&\n"
1431 " attrp = &attr;\n"
1432 " break;\n"
1433 " }\n"
1434 " }\n"
1435 "\\&\n"
1436 " if (argv[optind] == NULL) {\n"
1437 " fprintf(stderr, \"Usage: %s [-cs] executable [args]\\[rs]n\", argv[0]);\n"
1438 " exit(EXIT_FAILURE);\n"
1439 " }\n"
1440 "\\&\n"
1441 " /* Spawn the child. The name of the program to execute and the\n"
1442 " command-line arguments are taken from the command-line arguments\n"
1443 " of this program. The environment of the program execed in the\n"
1444 " child is made the same as the parent\\[aq]s environment. */\n"
1445 "\\&\n"
1446 " s = posix_spawnp(&child_pid, argv[optind], file_actionsp, attrp,\n"
1447 " &argv[optind], environ);\n"
1448 " if (s != 0)\n"
1449 " errc(EXIT_FAILURE, s, \"posix_spawn\");\n"
1450 "\\&\n"
1451 " /* Destroy any objects that we created earlier. */\n"
1452 "\\&\n"
1453 " if (attrp != NULL) {\n"
1454 " s = posix_spawnattr_destroy(attrp);\n"
1455 " if (s != 0)\n"
1456 " errc(EXIT_FAILURE, s, \"posix_spawnattr_destroy\");\n"
1457 " }\n"
1458 "\\&\n"
1459 " if (file_actionsp != NULL) {\n"
1460 " s = posix_spawn_file_actions_destroy(file_actionsp);\n"
1461 " if (s != 0)\n"
1462 " errc(EXIT_FAILURE, s, \"posix_spawn_file_actions_destroy\");\n"
1463 " }\n"
1464 "\\&\n"
1465 " printf(\"PID of child: %jd\\[rs]n\", (intmax_t) child_pid);\n"
1466 "\\&\n"
1467 " /* Monitor status of the child until it terminates. */\n"
1468 "\\&\n"
1469 " do {\n"
1470 " s = waitpid(child_pid, &status, WUNTRACED | WCONTINUED);\n"
1471 " if (s == -1)\n"
1472 " err(EXIT_FAILURE, \"waitpid\");\n"
1473 "\\&\n"
1474 " printf(\"Child status: \");\n"
1475 " if (WIFEXITED(status)) {\n"
1476 " printf(\"exited, status=%d\\[rs]n\", WEXITSTATUS(status));\n"
1477 " } else if (WIFSIGNALED(status)) {\n"
1478 " printf(\"killed by signal %d\\[rs]n\", WTERMSIG(status));\n"
1479 " } else if (WIFSTOPPED(status)) {\n"
1480 " printf(\"stopped by signal %d\\[rs]n\", WSTOPSIG(status));\n"
1481 " } else if (WIFCONTINUED(status)) {\n"
1482 " printf(\"continued\\[rs]n\");\n"
1483 " }\n"
1484 " } while (!WIFEXITED(status) && !WIFSIGNALED(status));\n"
1485 "\\&\n"
1486 " exit(EXIT_SUCCESS);\n"
1487 "}\n"
1488 msgstr ""
1489 "#include E<lt>errno.hE<gt>\n"
1490 "#include E<lt>spawn.hE<gt>\n"
1491 "#include E<lt>stdint.hE<gt>\n"
1492 "#include E<lt>stdio.hE<gt>\n"
1493 "#include E<lt>stdlib.hE<gt>\n"
1494 "#include E<lt>string.hE<gt>\n"
1495 "#include E<lt>unistd.hE<gt>\n"
1496 "#include E<lt>wait.hE<gt>\n"
1497 "\\&\n"
1498 "#define errExit(msg) do { perror(msg); \\[rs]\n"
1499 " exit(EXIT_FAILURE); } while (0)\n"
1500 "\\&\n"
1501 "#define errExitEN(en, msg) \\[rs]\n"
1502 " do { errno = en; perror(msg); \\[rs]\n"
1503 " exit(EXIT_FAILURE); } while (0)\n"
1504 "\\&\n"
1505 "char **environ;\n"
1506 "\\&\n"
1507 "int\n"
1508 "main(int argc, char *argv[])\n"
1509 "{\n"
1510 " pid_t child_pid;\n"
1511 " int s, opt, status;\n"
1512 " sigset_t mask;\n"
1513 " posix_spawnattr_t attr;\n"
1514 " posix_spawnattr_t *attrp;\n"
1515 " posix_spawn_file_actions_t file_actions;\n"
1516 " posix_spawn_file_actions_t *file_actionsp;\n"
1517 "\\&\n"
1518 " /* Lire les options de la ligne de commande pouvant être utilisées\n"
1519 " pour indiquer un objet d'attributs et un objet d'actions sur fichier\n"
1520 " fichier pour l'enfant. */\n"
1521 "\\&\n"
1522 " attrp = NULL;\n"
1523 " file_actionsp = NULL;\n"
1524 "\\&\n"
1525 " while ((opt = getopt(argc, argv, \"sc\")) != -1) {\n"
1526 " switch (opt) {\n"
1527 " case \\[aq]c\\[aq]: /* -c: fermer la sortie standard dans\n"
1528 " l'enfant */\n"
1529 "\\&\n"
1530 " /* Créer un objet d'actions de fichier et lui ajouter\n"
1531 " une action \"fermer\". */\n"
1532 "\\&\n"
1533 " s = posix_spawn_file_actions_init(&file_actions);\n"
1534 " if (s != 0)\n"
1535 " errExitEN(s, \"posix_spawn_file_actions_init\");\n"
1536 "\\&\n"
1537 " s = posix_spawn_file_actions_addclose(&file_actions,\n"
1538 " STDOUT_FILENO);\n"
1539 " if (s != 0)\n"
1540 " errExitEN(s, \"posix_spawn_file_actions_addclose\");\n"
1541 "\\&\n"
1542 " file_actionsp = &file_actions;\n"
1543 " break;\n"
1544 "\\&\n"
1545 " case \\[aq]s\\[aq]: /* -s: bloquer tous les signaux dans\n"
1546 " l'enfant */\n"
1547 "\\&\n"
1548 " /* Créer un objet d'attributs et lui ajouter\n"
1549 " une action \"établir un masque de signaux\". */\n"
1550 "\\&\n"
1551 " s = posix_spawnattr_init(&attr);\n"
1552 " if (s != 0)\n"
1553 " errExitEN(s, \"posix_spawnattr_init\");\n"
1554 " s = posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGMASK);\n"
1555 " if (s != 0)\n"
1556 " errExitEN(s, \"posix_spawnattr_setflags\");\n"
1557 "\\&\n"
1558 " sigfillset(&mask);\n"
1559 " s = posix_spawnattr_setsigmask(&attr, &mask);\n"
1560 " if (s != 0)\n"
1561 " errExitEN(s, \"posix_spawnattr_setsigmask\");\n"
1562 "\\&\n"
1563 " attrp = &attr;\n"
1564 " break;\n"
1565 " }\n"
1566 " }\n"
1567 "\\&\n"
1568 " /* Créer l'enfant. Le nom du programme à exécuter et les arguments de\n"
1569 " la ligne de commande sont récupérés dans les arguments de la ligne\n"
1570 " de commande de ce programme. L'environnement du programme exécuté\n"
1571 " dans l'enfant est identique à l'environnement du parent. */\n"
1572 "\\&\n"
1573 " s = posix_spawnp(&child_pid, argv[optind], file_actionsp, attrp,\n"
1574 " &argv[optind], environ);\n"
1575 " if (s != 0)\n"
1576 " errExitEN(s, \"posix_spawn\");\n"
1577 "\\&\n"
1578 " /* Détruire tout objet créé précédemment. */\n"
1579 "\\&\n"
1580 " if (attrp != NULL) {\n"
1581 " s = posix_spawnattr_destroy(attrp);\n"
1582 " if (s != 0)\n"
1583 " errExitEN(s, \"posix_spawnattr_destroy\");\n"
1584 " }\n"
1585 "\\&\n"
1586 " if (file_actionsp != NULL) {\n"
1587 " s = posix_spawn_file_actions_destroy(file_actionsp);\n"
1588 " if (s != 0)\n"
1589 " errExitEN(s, \"posix_spawn_file_actions_destroy\");\n"
1590 " }\n"
1591 "\\&\n"
1592 " printf(\"PID de l'enfant : %jd\\[rs]n\", (intmax_t) child_pid);\n"
1593 "\\&\n"
1594 " /* Observer l’état de l'enfant jusqu'à son arrêt. */\n"
1595 "\\&\n"
1596 " do {\n"
1597 " s = waitpid(child_pid, &status, WUNTRACED | WCONTINUED);\n"
1598 " if (s == -1)\n"
1599 " errExit(\"waitpid\");\n"
1600 "\\&\n"
1601 " printf(\"Child status: \");\n"
1602 " if (WIFEXITED(status)) {\n"
1603 " printf(\"terminé, état=%d\\[rs]n\", WEXITSTATUS(status));\n"
1604 " } else if (WIFSIGNALED(status)) {\n"
1605 " printf(\"tué par le signal %d\\[rs]n\", WTERMSIG(status));\n"
1606 " } else if (WIFSTOPPED(status)) {\n"
1607 " printf(\"arrêté par le signal %d\\[rs]n\", WSTOPSIG(status));\n"
1608 " } else if (WIFCONTINUED(status)) {\n"
1609 " printf(\"reprise\\[rs]n\");\n"
1610 " }\n"
1611 " } while (!WIFEXITED(status) && !WIFSIGNALED(status));\n"
1612 "\\&\n"
1613 " exit(EXIT_SUCCESS);\n"
1614 "}\n"
1615
1616 #. SRC END
1617 #. type: SH
1618 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1619 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1620 #, no-wrap
1621 msgid "SEE ALSO"
1622 msgstr "VOIR AUSSI"
1623
1624 #. type: Plain text
1625 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1626 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1627 msgid ""
1628 "B<close>(2), B<dup2>(2), B<execl>(2), B<execlp>(2), B<fork>(2), B<open>(2), "
1629 "B<sched_setparam>(2), B<sched_setscheduler>(2), B<setpgid>(2), B<setuid>(2), "
1630 "B<sigaction>(2), B<sigprocmask>(2), B<posix_spawn_file_actions_addclose>(3), "
1631 "B<posix_spawn_file_actions_adddup2>(3), "
1632 "B<posix_spawn_file_actions_addopen>(3), "
1633 "B<posix_spawn_file_actions_destroy>(3), B<posix_spawn_file_actions_init>(3), "
1634 "B<posix_spawnattr_destroy>(3), B<posix_spawnattr_getflags>(3), "
1635 "B<posix_spawnattr_getpgroup>(3), B<posix_spawnattr_getschedparam>(3), "
1636 "B<posix_spawnattr_getschedpolicy>(3), B<posix_spawnattr_getsigdefault>(3), "
1637 "B<posix_spawnattr_getsigmask>(3), B<posix_spawnattr_init>(3), "
1638 "B<posix_spawnattr_setflags>(3), B<posix_spawnattr_setpgroup>(3), "
1639 "B<posix_spawnattr_setschedparam>(3), B<posix_spawnattr_setschedpolicy>(3), "
1640 "B<posix_spawnattr_setsigdefault>(3), B<posix_spawnattr_setsigmask>(3), "
1641 "B<pthread_atfork>(3), I<E<lt>spawn.hE<gt>>, Base Definitions volume of "
1642 "POSIX.1-2001, I<http://www.opengroup.org/unix/online.html>"
1643 msgstr ""
1644 "B<close>(2), B<dup2>(2), B<execl>(2), B<execlp>(2), B<fork>(2), B<open>(2), "
1645 "B<sched_setparam>(2), B<sched_setscheduler>(2), B<setpgid>(2), B<setuid>(2), "
1646 "B<sigaction>(2), B<sigprocmask>(2), B<posix_spawn_file_actions_addclose>(3), "
1647 "B<posix_spawn_file_actions_adddup2>(3), "
1648 "B<posix_spawn_file_actions_addopen>(3), "
1649 "B<posix_spawn_file_actions_destroy>(3), B<posix_spawn_file_actions_init>(3), "
1650 "B<posix_spawnattr_destroy>(3), B<posix_spawnattr_getflags>(3), "
1651 "B<posix_spawnattr_getpgroup>(3), B<posix_spawnattr_getschedparam>(3), "
1652 "B<posix_spawnattr_getschedpolicy>(3), B<posix_spawnattr_getsigdefault>(3), "
1653 "B<posix_spawnattr_getsigmask>(3), B<posix_spawnattr_init>(3), "
1654 "B<posix_spawnattr_setflags>(3), B<posix_spawnattr_setpgroup>(3), "
1655 "B<posix_spawnattr_setschedparam>(3), B<posix_spawnattr_setschedpolicy>(3), "
1656 "B<posix_spawnattr_setsigdefault>(3), B<posix_spawnattr_setsigmask>(3), "
1657 "B<pthread_atfork>(3), I<E<lt>spawn.hE<gt>>, Base Definitions volume of "
1658 "POSIX.1-2001, I<http://www.opengroup.org/unix/online.html>"
1659
1660 #. type: TH
1661 #: debian-trixie
1662 #, no-wrap
1663 msgid "2024-06-15"
1664 msgstr "15 juin 2024"
1665
1666 #. type: TH
1667 #: debian-trixie
1668 #, no-wrap
1669 msgid "Linux man-pages 6.9.1"
1670 msgstr "Pages du manuel de Linux 6.9.1"
1671
1672 #. type: Plain text
1673 #: debian-trixie
1674 msgid "Standard C library (I<libc>, I<-lc>)"
1675 msgstr "Bibliothèque C standard (I<libc>, I<-lc>)"
1676
1677 #. type: Plain text
1678 #: debian-trixie fedora-44 fedora-rawhide
1679 msgid ""
1680 "Even when these functions return a success status, the child process may "
1681 "still fail for a plethora of reasons related to its pre-B<exec>() "
1682 "initialization. In addition, the B<exec>(3) may fail. In all of these "
1683 "cases, the child process will exit with the exit value of 127."
1684 msgstr ""
1685 "Même lorsque ces fonctions renvoient un état de réussite, le processus "
1686 "enfant peut encore échouer pour une pléthore de raisons liées au B<pré-"
1687 "exec>(). De plus, B<exec>(3) peut échouer. Dans tous ces cas, le processus "
1688 "enfant termine avec 127 comme code de retour."
1689
1690 #. type: Plain text
1691 #: debian-trixie fedora-44 fedora-rawhide
1692 #, no-wrap
1693 msgid ""
1694 "$ B<./a.out date>\n"
1695 "PID of child: 7634\n"
1696 "Tue Feb 1 19:47:50 CEST 2011\n"
1697 "Child status: exited, status=0\n"
1698 msgstr ""
1699 "$ B<./a.out date>\n"
1700 "PID de l'enfant : 7634\n"
1701 "Tue Feb 1 19:47:50 CEST 2011\n"
1702 "État de l'enfant : terminé, statut=0\n"
1703
1704 #. type: Plain text
1705 #: debian-trixie fedora-44 fedora-rawhide
1706 #, no-wrap
1707 msgid ""
1708 "$ B<./a.out -c date>\n"
1709 "PID of child: 7636\n"
1710 "date: write error: Bad file descriptor\n"
1711 "Child status: exited, status=1\n"
1712 msgstr ""
1713 "$ B<./a.out -c date>\n"
1714 "PID de l'enfant : 7636\n"
1715 "date : erreur d'écriture : Mauvais descripteur de fichier\n"
1716 "État de l'enfant : terminé, état=1\n"
1717
1718 #. type: Plain text
1719 #: debian-trixie fedora-44 fedora-rawhide
1720 #, no-wrap
1721 msgid ""
1722 "$ B<./a.out -s sleep 60 &>\n"
1723 "[1] 7637\n"
1724 "$ PID of child: 7638\n"
1725 msgstr ""
1726 "$ B<./a.out -s sleep 60 &>\n"
1727 "[1] 7637\n"
1728 "$ PID de l'enfant : 7638\n"
1729
1730 #. type: Plain text
1731 #: debian-trixie fedora-44 fedora-rawhide
1732 #, no-wrap
1733 msgid ""
1734 "$ B<kill 7638>\n"
1735 "$ B<kill -KILL 7638>\n"
1736 "$ Child status: killed by signal 9\n"
1737 "[1]+ Done ./a.out -s sleep 60\n"
1738 msgstr ""
1739 "$ B<kill 7638>\n"
1740 "$ B<kill -KILL 7638>\n"
1741 "$ État de l'enfant : tué par le signal 9\n"
1742 "[1]+ Fait ./a.out -s sleep 60\n"
1743
1744 #. type: Plain text
1745 #: debian-trixie fedora-44 fedora-rawhide
1746 #, no-wrap
1747 msgid ""
1748 "$ B<./a.out xxxxx\n"
1749 "PID of child: 10190\n"
1750 "Child status: exited, status=127>\n"
1751 msgstr ""
1752 "$ B<./a.out xxxxx\n"
1753 "PID de l'enfant : 10190\n"
1754 "Statut de l'enfant : terminé, état=127>\n"
1755
1756 #. type: Plain text
1757 #: debian-trixie fedora-44 fedora-rawhide
1758 #, no-wrap
1759 msgid ""
1760 "#include E<lt>errno.hE<gt>\n"
1761 "#include E<lt>spawn.hE<gt>\n"
1762 "#include E<lt>stdint.hE<gt>\n"
1763 "#include E<lt>stdio.hE<gt>\n"
1764 "#include E<lt>stdlib.hE<gt>\n"
1765 "#include E<lt>string.hE<gt>\n"
1766 "#include E<lt>unistd.hE<gt>\n"
1767 "#include E<lt>wait.hE<gt>\n"
1768 "\\&\n"
1769 "#define errExit(msg) do { perror(msg); \\[rs]\n"
1770 " exit(EXIT_FAILURE); } while (0)\n"
1771 "\\&\n"
1772 "#define errExitEN(en, msg) \\[rs]\n"
1773 " do { errno = en; perror(msg); \\[rs]\n"
1774 " exit(EXIT_FAILURE); } while (0)\n"
1775 "\\&\n"
1776 "char **environ;\n"
1777 "\\&\n"
1778 "int\n"
1779 "main(int argc, char *argv[])\n"
1780 "{\n"
1781 " pid_t child_pid;\n"
1782 " int s, opt, status;\n"
1783 " sigset_t mask;\n"
1784 " posix_spawnattr_t attr;\n"
1785 " posix_spawnattr_t *attrp;\n"
1786 " posix_spawn_file_actions_t file_actions;\n"
1787 " posix_spawn_file_actions_t *file_actionsp;\n"
1788 "\\&\n"
1789 " /* Parse command-line options, which can be used to specify an\n"
1790 " attributes object and file actions object for the child. */\n"
1791 "\\&\n"
1792 " attrp = NULL;\n"
1793 " file_actionsp = NULL;\n"
1794 "\\&\n"
1795 " while ((opt = getopt(argc, argv, \"sc\")) != -1) {\n"
1796 " switch (opt) {\n"
1797 " case \\[aq]c\\[aq]: /* -c: close standard output in child */\n"
1798 "\\&\n"
1799 " /* Create a file actions object and add a \"close\"\n"
1800 " action to it. */\n"
1801 "\\&\n"
1802 " s = posix_spawn_file_actions_init(&file_actions);\n"
1803 " if (s != 0)\n"
1804 " errExitEN(s, \"posix_spawn_file_actions_init\");\n"
1805 "\\&\n"
1806 " s = posix_spawn_file_actions_addclose(&file_actions,\n"
1807 " STDOUT_FILENO);\n"
1808 " if (s != 0)\n"
1809 " errExitEN(s, \"posix_spawn_file_actions_addclose\");\n"
1810 "\\&\n"
1811 " file_actionsp = &file_actions;\n"
1812 " break;\n"
1813 "\\&\n"
1814 " case \\[aq]s\\[aq]: /* -s: block all signals in child */\n"
1815 "\\&\n"
1816 " /* Create an attributes object and add a \"set signal mask\"\n"
1817 " action to it. */\n"
1818 "\\&\n"
1819 " s = posix_spawnattr_init(&attr);\n"
1820 " if (s != 0)\n"
1821 " errExitEN(s, \"posix_spawnattr_init\");\n"
1822 " s = posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGMASK);\n"
1823 " if (s != 0)\n"
1824 " errExitEN(s, \"posix_spawnattr_setflags\");\n"
1825 "\\&\n"
1826 " sigfillset(&mask);\n"
1827 " s = posix_spawnattr_setsigmask(&attr, &mask);\n"
1828 " if (s != 0)\n"
1829 " errExitEN(s, \"posix_spawnattr_setsigmask\");\n"
1830 "\\&\n"
1831 " attrp = &attr;\n"
1832 " break;\n"
1833 " }\n"
1834 " }\n"
1835 "\\&\n"
1836 " /* Spawn the child. The name of the program to execute and the\n"
1837 " command-line arguments are taken from the command-line arguments\n"
1838 " of this program. The environment of the program execed in the\n"
1839 " child is made the same as the parent\\[aq]s environment. */\n"
1840 "\\&\n"
1841 " s = posix_spawnp(&child_pid, argv[optind], file_actionsp, attrp,\n"
1842 " &argv[optind], environ);\n"
1843 " if (s != 0)\n"
1844 " errExitEN(s, \"posix_spawn\");\n"
1845 "\\&\n"
1846 " /* Destroy any objects that we created earlier. */\n"
1847 "\\&\n"
1848 " if (attrp != NULL) {\n"
1849 " s = posix_spawnattr_destroy(attrp);\n"
1850 " if (s != 0)\n"
1851 " errExitEN(s, \"posix_spawnattr_destroy\");\n"
1852 " }\n"
1853 "\\&\n"
1854 " if (file_actionsp != NULL) {\n"
1855 " s = posix_spawn_file_actions_destroy(file_actionsp);\n"
1856 " if (s != 0)\n"
1857 " errExitEN(s, \"posix_spawn_file_actions_destroy\");\n"
1858 " }\n"
1859 "\\&\n"
1860 " printf(\"PID of child: %jd\\[rs]n\", (intmax_t) child_pid);\n"
1861 "\\&\n"
1862 " /* Monitor status of the child until it terminates. */\n"
1863 "\\&\n"
1864 " do {\n"
1865 " s = waitpid(child_pid, &status, WUNTRACED | WCONTINUED);\n"
1866 " if (s == -1)\n"
1867 " errExit(\"waitpid\");\n"
1868 "\\&\n"
1869 " printf(\"Child status: \");\n"
1870 " if (WIFEXITED(status)) {\n"
1871 " printf(\"exited, status=%d\\[rs]n\", WEXITSTATUS(status));\n"
1872 " } else if (WIFSIGNALED(status)) {\n"
1873 " printf(\"killed by signal %d\\[rs]n\", WTERMSIG(status));\n"
1874 " } else if (WIFSTOPPED(status)) {\n"
1875 " printf(\"stopped by signal %d\\[rs]n\", WSTOPSIG(status));\n"
1876 " } else if (WIFCONTINUED(status)) {\n"
1877 " printf(\"continued\\[rs]n\");\n"
1878 " }\n"
1879 " } while (!WIFEXITED(status) && !WIFSIGNALED(status));\n"
1880 "\\&\n"
1881 " exit(EXIT_SUCCESS);\n"
1882 "}\n"
1883 msgstr ""
1884 "#include E<lt>errno.hE<gt>\n"
1885 "#include E<lt>spawn.hE<gt>\n"
1886 "#include E<lt>stdint.hE<gt>\n"
1887 "#include E<lt>stdio.hE<gt>\n"
1888 "#include E<lt>stdlib.hE<gt>\n"
1889 "#include E<lt>string.hE<gt>\n"
1890 "#include E<lt>unistd.hE<gt>\n"
1891 "#include E<lt>wait.hE<gt>\n"
1892 "\\&\n"
1893 "#define errExit(msg) do { perror(msg); \\[rs]\n"
1894 " exit(EXIT_FAILURE); } while (0)\n"
1895 "\\&\n"
1896 "#define errExitEN(en, msg) \\[rs]\n"
1897 " do { errno = en; perror(msg); \\[rs]\n"
1898 " exit(EXIT_FAILURE); } while (0)\n"
1899 "\\&\n"
1900 "char **environ;\n"
1901 "\\&\n"
1902 "int\n"
1903 "main(int argc, char *argv[])\n"
1904 "{\n"
1905 " pid_t child_pid;\n"
1906 " int s, opt, status;\n"
1907 " sigset_t mask;\n"
1908 " posix_spawnattr_t attr;\n"
1909 " posix_spawnattr_t *attrp;\n"
1910 " posix_spawn_file_actions_t file_actions;\n"
1911 " posix_spawn_file_actions_t *file_actionsp;\n"
1912 "\\&\n"
1913 " /* Lire les options de la ligne de commande pouvant être utilisées\n"
1914 " pour indiquer un objet d'attributs et un objet d'actions sur fichier\n"
1915 " fichier pour l'enfant. */\n"
1916 "\\&\n"
1917 " attrp = NULL;\n"
1918 " file_actionsp = NULL;\n"
1919 "\\&\n"
1920 " while ((opt = getopt(argc, argv, \"sc\")) != -1) {\n"
1921 " switch (opt) {\n"
1922 " case \\[aq]c\\[aq]: /* -c: fermer la sortie standard dans\n"
1923 " l'enfant */\n"
1924 "\\&\n"
1925 " /* Créer un objet d'actions de fichier et lui ajouter\n"
1926 " une action \"fermer\". */\n"
1927 "\\&\n"
1928 " s = posix_spawn_file_actions_init(&file_actions);\n"
1929 " if (s != 0)\n"
1930 " errExitEN(s, \"posix_spawn_file_actions_init\");\n"
1931 "\\&\n"
1932 " s = posix_spawn_file_actions_addclose(&file_actions,\n"
1933 " STDOUT_FILENO);\n"
1934 " if (s != 0)\n"
1935 " errExitEN(s, \"posix_spawn_file_actions_addclose\");\n"
1936 "\\&\n"
1937 " file_actionsp = &file_actions;\n"
1938 " break;\n"
1939 "\\&\n"
1940 " case \\[aq]s\\[aq]: /* -s: bloquer tous les signaux dans\n"
1941 " l'enfant */\n"
1942 "\\&\n"
1943 " /* Créer un objet d'attributs et lui ajouter\n"
1944 " une action \"établir un masque de signaux\". */\n"
1945 "\\&\n"
1946 " s = posix_spawnattr_init(&attr);\n"
1947 " if (s != 0)\n"
1948 " errExitEN(s, \"posix_spawnattr_init\");\n"
1949 " s = posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGMASK);\n"
1950 " if (s != 0)\n"
1951 " errExitEN(s, \"posix_spawnattr_setflags\");\n"
1952 "\\&\n"
1953 " sigfillset(&mask);\n"
1954 " s = posix_spawnattr_setsigmask(&attr, &mask);\n"
1955 " if (s != 0)\n"
1956 " errExitEN(s, \"posix_spawnattr_setsigmask\");\n"
1957 "\\&\n"
1958 " attrp = &attr;\n"
1959 " break;\n"
1960 " }\n"
1961 " }\n"
1962 "\\&\n"
1963 " /* Créer l'enfant. Le nom du programme à exécuter et les arguments de\n"
1964 " la ligne de commande sont récupérés dans les arguments de la ligne\n"
1965 " de commande de ce programme. L'environnement du programme exécuté\n"
1966 " dans l'enfant est identique à l'environnement du parent. */\n"
1967 "\\&\n"
1968 " s = posix_spawnp(&child_pid, argv[optind], file_actionsp, attrp,\n"
1969 " &argv[optind], environ);\n"
1970 " if (s != 0)\n"
1971 " errExitEN(s, \"posix_spawn\");\n"
1972 "\\&\n"
1973 " /* Détruire tout objet créé précédemment. */\n"
1974 "\\&\n"
1975 " if (attrp != NULL) {\n"
1976 " s = posix_spawnattr_destroy(attrp);\n"
1977 " if (s != 0)\n"
1978 " errExitEN(s, \"posix_spawnattr_destroy\");\n"
1979 " }\n"
1980 "\\&\n"
1981 " if (file_actionsp != NULL) {\n"
1982 " s = posix_spawn_file_actions_destroy(file_actionsp);\n"
1983 " if (s != 0)\n"
1984 " errExitEN(s, \"posix_spawn_file_actions_destroy\");\n"
1985 " }\n"
1986 "\\&\n"
1987 " printf(\"PID de l'enfant : %jd\\[rs]n\", (intmax_t) child_pid);\n"
1988 "\\&\n"
1989 " /* Observer l’état de l'enfant jusqu'à son arrêt. */\n"
1990 "\\&\n"
1991 " do {\n"
1992 " s = waitpid(child_pid, &status, WUNTRACED | WCONTINUED);\n"
1993 " if (s == -1)\n"
1994 " errExit(\"waitpid\");\n"
1995 "\\&\n"
1996 " printf(\"Child status: \");\n"
1997 " if (WIFEXITED(status)) {\n"
1998 " printf(\"terminé, état=%d\\[rs]n\", WEXITSTATUS(status));\n"
1999 " } else if (WIFSIGNALED(status)) {\n"
2000 " printf(\"tué par le signal %d\\[rs]n\", WTERMSIG(status));\n"
2001 " } else if (WIFSTOPPED(status)) {\n"
2002 " printf(\"arrêté par le signal %d\\[rs]n\", WSTOPSIG(status));\n"
2003 " } else if (WIFCONTINUED(status)) {\n"
2004 " printf(\"reprise\\[rs]n\");\n"
2005 " }\n"
2006 " } while (!WIFEXITED(status) && !WIFSIGNALED(status));\n"
2007 "\\&\n"
2008 " exit(EXIT_SUCCESS);\n"
2009 "}\n"
2010
2011 #. type: TH
2012 #: fedora-44 fedora-rawhide
2013 #, no-wrap
2014 msgid "2024-07-23"
2015 msgstr "23 juillet 2024"
2016
2017 #. type: TH
2018 #: fedora-44 fedora-rawhide
2019 #, no-wrap
2020 msgid "Linux man-pages 6.13"
2021 msgstr "Pages du manuel de Linux 6.13"
2022
2023 #. type: TH
2024 #: mageia-cauldron
2025 #, no-wrap
2026 msgid "Linux man-pages 6.17"
2027 msgstr "Pages du manuel de Linux 6.17"
2028
2029 #. type: TH
2030 #: opensuse-leap-16-1 opensuse-tumbleweed
2031 #, no-wrap
2032 msgid "Linux man-pages (unreleased)"
2033 msgstr "Pages du manuel de Linux (non publiées)"