Debian Codegraph @

po/fr/man2/dup.2.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 # Jean-Philippe MENGUAL <[email protected]>, 2020-2024.
19 msgid ""
20 msgstr ""
21 "Project-Id-Version: manpages-l10n\n"
22 "POT-Creation-Date: 2026-06-05 06:23+0200\n"
23 "PO-Revision-Date: 2024-01-23 14:10+0100\n"
24 "Last-Translator: Jean-Philippe MENGUAL <[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: Weblate 3.1.1\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 "dup"
38 msgstr "dup"
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 "dup, dup2, dup3 - duplicate a file descriptor"
64 msgstr "dup, dup2, dup3 - Dupliquer un descripteur de fichier"
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>unistd.hE<gt>>\n"
91 msgstr "B<#include E<lt>unistd.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 dup(int >I<oldfd>B<);>\n"
99 "B<int dup2(int >I<oldfd>B<, int >I<newfd>B<);>\n"
100 msgstr ""
101 "B<int dup(int >I<oldfd>B<);>\n"
102 "B<int dup2(int >I<oldfd>B<, int >I<newfd>B<);>\n"
103
104 #. type: Plain text
105 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
106 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
107 #, no-wrap
108 msgid ""
109 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
110 "B<#include E<lt>fcntl.hE<gt>> /* Definition of B<O_*> constants */\n"
111 "B<#include E<lt>unistd.hE<gt>>\n"
112 msgstr ""
113 "B<#define _GNU_SOURCE> /* Consultez feature_test_macros(7) */\n"
114 "B<#include E<lt>fcntl.hE<gt>> /* Définition des constantes B<O_*> */\n"
115 "B<#include E<lt>unistd.hE<gt>>\n"
116
117 #. type: Plain text
118 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
119 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
120 #, no-wrap
121 msgid "B<int dup3(int >I<oldfd>B<, int >I<newfd>B<, int >I<flags>B<);>\n"
122 msgstr "B<int dup3(int >I<oldfd>B<, int >I<newfd>B<, int >I<flags>B<);>\n"
123
124 #. type: SH
125 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
126 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
127 #, no-wrap
128 msgid "DESCRIPTION"
129 msgstr "DESCRIPTION"
130
131 #. type: Plain text
132 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
133 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
134 msgid ""
135 "The B<dup>() system call allocates a new file descriptor that refers to the "
136 "same open file description as the descriptor I<oldfd>. (For an explanation "
137 "of open file descriptions, see B<open>(2).) The new file descriptor number "
138 "is guaranteed to be the lowest-numbered file descriptor that was unused in "
139 "the calling process."
140 msgstr ""
141 "L'appel système B<dup>() affecte un nouveau descripteur de fichier qui se "
142 "rapporte à la même description de fichier ouvert que le descripteur I<oldfd> "
143 "(pour une explication sur les descriptions de fichier ouvert, voir "
144 "B<open>(2)). Le numéro du nouveau descripteur de fichier est garanti d'être "
145 "le plus petit qui n'est pas utilisé par le processus appelant."
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 "After a successful return, the old and new file descriptors may be used "
152 "interchangeably. Since the two file descriptors refer to the same open file "
153 "description, they share file offset and file status flags; for example, if "
154 "the file offset is modified by using B<lseek>(2) on one of the file "
155 "descriptors, the offset is also changed for the other file descriptor."
156 msgstr ""
157 "Après un appel réussi, l'ancien et le nouveau descripteur peuvent être "
158 "utilisés de manière interchangeable. Ils référencent la même description de "
159 "fichier et ainsi partagent les pointeurs de position et les drapeaux. Par "
160 "exemple, si le pointeur de position est modifié en utilisant B<lseek>(2) sur "
161 "l'un des descripteurs, la position est également changée pour l'autre."
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 two file descriptors do not share file descriptor flags (the close-on-"
168 "exec flag). The close-on-exec flag (B<FD_CLOEXEC>; see B<fcntl>(2)) for "
169 "the duplicate descriptor is off."
170 msgstr ""
171 "Les deux descripteurs de fichier ne partagent pas les attributs (celui "
172 "close\\(hyon\\(hyexec. L'attribut close\\(hyon\\(hyexec (B<FD_CLOEXEC>\\ ; "
173 "consultez B<fcntl>(2)) pour le descripteur en double est désactivé."
174
175 #. type: SS
176 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
177 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
178 #, no-wrap
179 msgid "dup2()"
180 msgstr "dup2()"
181
182 #. type: Plain text
183 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
184 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
185 msgid ""
186 "The B<dup2>() system call performs the same task as B<dup>(), but instead "
187 "of using the lowest-numbered unused file descriptor, it uses the file "
188 "descriptor number specified in I<newfd>. In other words, the file "
189 "descriptor I<newfd> is adjusted so that it now refers to the same open file "
190 "description as I<oldfd>."
191 msgstr ""
192 "L'appel système B<dup2>() effectue la même tâche que B<dup>(), mais au lieu "
193 "de prendre le plus petit numéro de descripteur de fichier inutilisé, il "
194 "utilise le numéro de descripteur passé dans I<newfd>. En d'autres termes, le "
195 "descripteur de fichier I<newfd> est modifié pour se rapporter à la même "
196 "description de fichier ouvert que I<oldfd>."
197
198 #. type: Plain text
199 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
200 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
201 msgid ""
202 "If the file descriptor I<newfd> was previously open, it is closed before "
203 "being reused; the close is performed silently (i.e., any errors during the "
204 "close are not reported by B<dup2>())."
205 msgstr ""
206 "Si le descripteur de fichier I<newfd> était ouvert, il est fermé avant "
207 "d'être réutilisé ; la fermeture se passe en silence (c'est-à-dire que les "
208 "messages d'erreur à la fermeture ne sont pas indiqués par B<dup2>())."
209
210 #. type: Plain text
211 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
212 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
213 msgid ""
214 "The steps of closing and reusing the file descriptor I<newfd> are performed "
215 "I<atomically>. This is important, because trying to implement equivalent "
216 "functionality using B<close>(2) and B<dup>() would be subject to race "
217 "conditions, whereby I<newfd> might be reused between the two steps. Such "
218 "reuse could happen because the main program is interrupted by a signal "
219 "handler that allocates a file descriptor, or because a parallel thread "
220 "allocates a file descriptor."
221 msgstr ""
222 "Les étapes de fermeture et de réutilisation du descripteur de fichier "
223 "I<newfd> sont effectuées de manière I<atomique>. Cela est important, parce "
224 "qu'essayer d'implémenter des fonctionnalités équivalentes avec B<close>(2) "
225 "et B<dup>() entraînerait une situation de compétition (« race condition »), "
226 "où I<newfd> pourrait être réutilisé entre les deux étapes. Une telle "
227 "réutilisation peut intervenir si le programme principal est interrompu par "
228 "un gestionnaire de signaux qui alloue un descripteur de fichier, ou parce "
229 "qu'un processus léger qui s'exécute en parallèle alloue un descripteur de "
230 "fichier."
231
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 "Note the following points:"
236 msgstr "Notez les points suivants\\ :"
237
238 #. type: IP
239 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
240 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
241 #, no-wrap
242 msgid "\\[bu]"
243 msgstr "-"
244
245 #. type: Plain text
246 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
247 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
248 msgid ""
249 "If I<oldfd> is not a valid file descriptor, then the call fails, and "
250 "I<newfd> is not closed."
251 msgstr ""
252 "Si I<oldfd> n'est pas un descripteur de fichier valable, alors l'appel "
253 "échoue et I<newfd> n'est pas fermé."
254
255 #. type: Plain text
256 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
257 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
258 msgid ""
259 "If I<oldfd> is a valid file descriptor, and I<newfd> has the same value as "
260 "I<oldfd>, then B<dup2>() does nothing, and returns I<newfd>."
261 msgstr ""
262 "Si I<oldfd> est un descripteur de fichier valable et I<newfd> a la même "
263 "valeur que I<oldfd>, alors B<dup2>() ne fait rien et renvoie I<newfd>."
264
265 #. type: SS
266 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
267 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
268 #, no-wrap
269 msgid "dup3()"
270 msgstr "dup3()"
271
272 #. type: Plain text
273 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
274 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
275 msgid "B<dup3>() is the same as B<dup2>(), except that:"
276 msgstr "B<dup3>() est identique à B<dup2>(), à l'exception de :"
277
278 #. type: Plain text
279 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
280 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
281 msgid ""
282 "The caller can force the close-on-exec flag to be set for the new file "
283 "descriptor by specifying B<O_CLOEXEC> in I<flags>. See the description of "
284 "the same flag in B<open>(2) for reasons why this may be useful."
285 msgstr ""
286 "L'appelant peut forcer l'attribut close-on-exec à être positionné pour le "
287 "nouveau descripteur de fichier en ajoutant B<O_CLOEXEC> dans I<flags>. "
288 "Consultez la description de cet attribut dans B<open>(2) pour savoir "
289 "pourquoi cela peut être utile."
290
291 #. Ulrich Drepper, LKML, 2008-10-09:
292 #. We deliberately decided on this change. Otherwise, what is the
293 #. result of dup3(fd, fd, O_CLOEXEC)?
294 #. type: Plain text
295 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
296 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
297 msgid ""
298 "If I<oldfd> equals I<newfd>, then B<dup3>() fails with the error B<EINVAL>."
299 msgstr ""
300 "Si I<oldfd> est égal à I<newfd>, alors B<dup3>() échoue avec l'erreur "
301 "B<EINVAL>."
302
303 #. type: SH
304 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
305 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
306 #, no-wrap
307 msgid "RETURN VALUE"
308 msgstr "VALEUR RENVOYÉE"
309
310 #. type: Plain text
311 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
312 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
313 msgid ""
314 "On success, these system calls return the new file descriptor. On error, -1 "
315 "is returned, and I<errno> is set to indicate the error."
316 msgstr ""
317 "Ces appels système renvoient le nouveau descripteur en cas de succès, ou "
318 "B<-1> en cas d'échec, auquel cas I<errno> est positionné pour indiquer "
319 "l'erreur."
320
321 #. type: SH
322 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
323 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
324 #, no-wrap
325 msgid "ERRORS"
326 msgstr "ERREURS"
327
328 #. type: TP
329 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
330 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
331 #, no-wrap
332 msgid "B<EBADF>"
333 msgstr "B<EBADF>"
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 "I<oldfd> isn't an open file descriptor."
339 msgstr "I<oldfd> n'est pas un descripteur de fichier ouvert."
340
341 #. type: Plain text
342 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
343 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
344 msgid ""
345 "I<newfd> is out of the allowed range for file descriptors (see the "
346 "discussion of B<RLIMIT_NOFILE> in B<getrlimit>(2))."
347 msgstr ""
348 "I<newfd> est en dehors de la plage autorisée pour des descripteurs de "
349 "fichier (voir le point sur B<RLIMIT_NOFILE> dans B<getrlimit>(2))."
350
351 #. type: TP
352 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
353 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
354 #, no-wrap
355 msgid "B<EBUSY>"
356 msgstr "B<EBUSY>"
357
358 #. type: Plain text
359 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
360 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
361 msgid ""
362 "(Linux only) This may be returned by B<dup2>() or B<dup3>() during a race "
363 "condition with B<open>(2) and B<dup>()."
364 msgstr ""
365 "(Linux seulement) Cette valeur peut être renvoyée par B<dup2>() ou B<dup3>() "
366 "lors d'une concurrence critique avec B<open>(2) et B<dup>()."
367
368 #. type: TP
369 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
370 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
371 #, no-wrap
372 msgid "B<EINTR>"
373 msgstr "B<EINTR>"
374
375 #. type: Plain text
376 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
377 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
378 msgid ""
379 "The B<dup2>() or B<dup3>() call was interrupted by a signal; see "
380 "B<signal>(7)."
381 msgstr ""
382 "L'appel B<dup2>() ou B<dup3>() a été interrompu par un signal ; consultez "
383 "B<signal>(7)."
384
385 #. type: TP
386 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
387 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
388 #, no-wrap
389 msgid "B<EINVAL>"
390 msgstr "B<EINVAL>"
391
392 #. type: Plain text
393 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
394 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
395 msgid "(B<dup3>()) I<flags> contain an invalid value."
396 msgstr "(B<dup3>()) I<flags> contient une valeur incorrecte."
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 "(B<dup3>()) I<oldfd> was equal to I<newfd>."
402 msgstr "(B<dup3>()) I<flags> était égal à I<newfd>."
403
404 #. type: TP
405 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
406 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
407 #, no-wrap
408 msgid "B<EMFILE>"
409 msgstr "B<EMFILE>"
410
411 #. type: Plain text
412 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
413 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
414 msgid ""
415 "The per-process limit on the number of open file descriptors has been "
416 "reached (see the discussion of B<RLIMIT_NOFILE> in B<getrlimit>(2))."
417 msgstr ""
418 "La limite du nombre de descripteurs de fichier ouverts par processus a été "
419 "atteinte (voir le point sur B<RLIMIT_NOFILE> dans B<getrlimit>(2))."
420
421 #. type: TP
422 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
423 #: opensuse-leap-16-1 opensuse-tumbleweed
424 #, no-wrap
425 msgid "B<ENOMEM>"
426 msgstr "B<ENOMEM>"
427
428 #. type: Plain text
429 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
430 #: opensuse-leap-16-1 opensuse-tumbleweed
431 msgid "Insufficient kernel memory was available."
432 msgstr "La mémoire disponible du noyau n'était pas suffisante."
433
434 #. type: SH
435 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
436 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
437 #, no-wrap
438 msgid "STANDARDS"
439 msgstr "NORMES"
440
441 #. type: Plain text
442 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
443 #: opensuse-tumbleweed
444 msgid "POSIX.1-2024."
445 msgstr "POSIX.1-2024."
446
447 #. type: SH
448 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
449 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
450 #, no-wrap
451 msgid "HISTORY"
452 msgstr "HISTORIQUE"
453
454 #. type: TP
455 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
456 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
457 #, no-wrap
458 msgid "B<dup>()"
459 msgstr "B<dup>()"
460
461 #. type: TQ
462 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
463 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
464 #, no-wrap
465 msgid "B<dup2>()"
466 msgstr "B<dup2>()"
467
468 #. SVr4 documents additional
469 #. EINTR and ENOLINK error conditions. POSIX.1 adds EINTR.
470 #. The EBUSY return is Linux-specific.
471 #. type: Plain text
472 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
473 #: opensuse-tumbleweed
474 msgid "4.3BSD, SVr4, POSIX.1-1988."
475 msgstr "4.3BSD, SVr4, POSIX.1-1988."
476
477 #. type: TP
478 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
479 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
480 #, no-wrap
481 msgid "B<dup3>()"
482 msgstr "B<dup3>()"
483
484 #. type: Plain text
485 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
486 #: opensuse-tumbleweed
487 #, fuzzy
488 #| msgid "POSIX.1-2008. Linux 2.6.16, glibc 2.4."
489 msgid "POSIX.1-2024. Linux 2.6.27, glibc 2.9."
490 msgstr "POSIX.1-2008. Linux 2.6.16, glibc 2.4."
491
492 #. type: SH
493 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
494 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
495 #, no-wrap
496 msgid "NOTES"
497 msgstr "NOTES"
498
499 #. type: Plain text
500 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
501 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
502 msgid ""
503 "The error returned by B<dup2>() is different from that returned by "
504 "B<fcntl(>..., B<F_DUPFD>, ...B<)> when I<newfd> is out of range. On some "
505 "systems, B<dup2>() also sometimes returns B<EINVAL> like B<F_DUPFD>."
506 msgstr ""
507 "Les erreurs renvoyées par B<dup2>() sont différentes de celles retournées "
508 "par B<fcntl(>..., B<F_DUPFD>, ...B<)> si I<newfd> n'est pas dans les valeurs "
509 "autorisées. Sur certains systèmes, B<dup2> retourne aussi parfois B<EINVAL> "
510 "comme B<F_DUPFD>."
511
512 #. type: Plain text
513 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
514 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
515 msgid ""
516 "If I<newfd> was open, any errors that would have been reported at "
517 "B<close>(2) time are lost. If this is of concern, then\\[em]unless the "
518 "program is single-threaded and does not allocate file descriptors in signal "
519 "handlers\\[em]the correct approach is I<not> to close I<newfd> before "
520 "calling B<dup2>(), because of the race condition described above. Instead, "
521 "code something like the following could be used:"
522 msgstr ""
523 "Si I<newfd> était ouvert, toute erreur qui aurait été rapportée au moment de "
524 "B<close>(2) est perdue. Si cela est d'importance, alors, à moins que le "
525 "programme ne soit monothread et n'alloue pas de descripteurs de fichier dans "
526 "des gestionnaires de signaux, l'approche correcte est de I<ne pas> fermer "
527 "I<newfd> avant d'appeler B<dup2>(), à cause de la condition de concurrence "
528 "décrite ci-dessus. À la place, un code semblable à celui ci-dessous peut "
529 "être utilisé :"
530
531 #. type: Plain text
532 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
533 #: opensuse-tumbleweed
534 #, fuzzy, no-wrap
535 #| msgid ""
536 #| "/* Obtain a duplicate of \\[aq]newfd\\[aq] that can subsequently\n"
537 #| " be used to check for close() errors; an EBADF error\n"
538 #| " means that \\[aq]newfd\\[aq] was not open. */\n"
539 #| "\\&\n"
540 #| "tmpfd = dup(newfd);\n"
541 #| "if (tmpfd == -1 && errno != EBADF) {\n"
542 #| " /* Handle unexpected dup() error. */\n"
543 #| "}\n"
544 #| "\\&\n"
545 #| "/* Atomically duplicate \\[aq]oldfd\\[aq] on \\[aq]newfd\\[aq]. */\n"
546 #| "\\&\n"
547 #| "if (dup2(oldfd, newfd) == -1) {\n"
548 #| " /* Handle dup2() error. */\n"
549 #| "}\n"
550 #| "\\&\n"
551 #| "/* Now check for close() errors on the file originally\n"
552 #| " referred to by \\[aq]newfd\\[aq]. */\n"
553 #| "\\&\n"
554 #| "if (tmpfd != -1) {\n"
555 #| " if (close(tmpfd) == -1) {\n"
556 #| " /* Handle errors from close. */\n"
557 #| " }\n"
558 #| "}\n"
559 msgid ""
560 "/* Obtain a duplicate of \\[aq]newfd\\[aq] that can subsequently\n"
561 " be used to check for close() errors; an EBADF error\n"
562 " means that \\[aq]newfd\\[aq] was not open. */\n"
563 "\\&\n"
564 "tmpfd = dup(newfd);\n"
565 "if (tmpfd == -1 && errno != EBADF) {\n"
566 " /* Handle unexpected dup() error. */\n"
567 "}\n"
568 "\\&\n"
569 "/* Atomically duplicate \\[aq]oldfd\\[aq] on \\[aq]newfd\\[aq]. */\n"
570 "\\&\n"
571 "if (dup2(oldfd, newfd) == -1) {\n"
572 " /* Handle dup2() error. */\n"
573 "}\n"
574 "\\&\n"
575 "/* Now check for close() errors on the file originally\n"
576 " referred to by \\[aq]newfd\\[aq]. */\n"
577 "\\&\n"
578 "if (tmpfd != -1) {\n"
579 " if (close(tmpfd) == -1) {\n"
580 " /* Handle errors from close. */\n"
581 " }\n"
582 "}\n"
583 msgstr ""
584 "/* Obtenir une copie de \\[aq]newfd\\[aq] qui peut ensuite être\n"
585 " utilisée pour vérifier les erreurs de close() ; une\n"
586 " erreur EBADF signifie que \\[aq]newfd\\[aq] n'était pas ouvert. */\n"
587 "\\&\n"
588 "tmpfd = dup(newfd);\n"
589 "if (tmpfd == -1 && errno != EBADF) {\n"
590 " /* Gérer une erreur inattendue de dup(). */\n"
591 "}\n"
592 "\\&\n"
593 "/* Copier \\[aq]oldfd\\[aq] dans \\[aq]newfd\\[aq] de manière atomique */\n"
594 "\\&\n"
595 "if (dup2(oldfd, newfd) == -1) {\n"
596 " /* Handle dup2() error. */\n"
597 "}\n"
598 "\\&\n"
599 "/* Maintenant, vérifier les erreurs de close() sur le fichier\n"
600 " originellement désigné par \\[aq]newfd\\[aq]. */\n"
601 "\\&\n"
602 "if (tmpfd != -1) {\n"
603 " if (close(tmpfd) == -1) {\n"
604 " /* Gérer les erreurs de close(). */\n"
605 " }\n"
606 "}\n"
607
608 #. type: SH
609 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
610 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
611 #, no-wrap
612 msgid "SEE ALSO"
613 msgstr "VOIR AUSSI"
614
615 #. type: Plain text
616 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
617 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
618 msgid "B<close>(2), B<fcntl>(2), B<open>(2), B<pidfd_getfd>(2)"
619 msgstr "B<close>(2), B<fcntl>(2), B<open>(2), B<pidfd_getfd>(2)"
620
621 #. type: TH
622 #: debian-trixie
623 #, no-wrap
624 msgid "2024-05-02"
625 msgstr "2 mai 2024"
626
627 #. type: TH
628 #: debian-trixie
629 #, no-wrap
630 msgid "Linux man-pages 6.9.1"
631 msgstr "Pages du manuel de Linux 6.9.1"
632
633 #. type: Plain text
634 #: debian-trixie
635 msgid "Standard C library (I<libc>, I<-lc>)"
636 msgstr "Bibliothèque C standard (I<libc>, I<-lc>)"
637
638 #. type: Plain text
639 #: debian-trixie fedora-44 fedora-rawhide
640 msgid "POSIX.1-2008."
641 msgstr "POSIX.1-2008."
642
643 #. type: Plain text
644 #: debian-trixie fedora-44 fedora-rawhide
645 msgid "Linux."
646 msgstr "Linux."
647
648 #. SVr4 documents additional
649 #. EINTR and ENOLINK error conditions. POSIX.1 adds EINTR.
650 #. The EBUSY return is Linux-specific.
651 #. type: Plain text
652 #: debian-trixie fedora-44 fedora-rawhide
653 msgid "POSIX.1-2001, SVr4, 4.3BSD."
654 msgstr "POSIX.1-2001, SVr4, 4.3BSD."
655
656 #. type: Plain text
657 #: debian-trixie fedora-44 fedora-rawhide
658 msgid "Linux 2.6.27, glibc 2.9."
659 msgstr "Linux 2.6.27, glibc 2.9."
660
661 #. type: Plain text
662 #: debian-trixie fedora-44 fedora-rawhide
663 #, no-wrap
664 msgid ""
665 "/* Obtain a duplicate of \\[aq]newfd\\[aq] that can subsequently\n"
666 " be used to check for close() errors; an EBADF error\n"
667 " means that \\[aq]newfd\\[aq] was not open. */\n"
668 "\\&\n"
669 "tmpfd = dup(newfd);\n"
670 "if (tmpfd == -1 && errno != EBADF) {\n"
671 " /* Handle unexpected dup() error. */\n"
672 "}\n"
673 "\\&\n"
674 "/* Atomically duplicate \\[aq]oldfd\\[aq] on \\[aq]newfd\\[aq]. */\n"
675 "\\&\n"
676 "if (dup2(oldfd, newfd) == -1) {\n"
677 " /* Handle dup2() error. */\n"
678 "}\n"
679 "\\&\n"
680 "/* Now check for close() errors on the file originally\n"
681 " referred to by \\[aq]newfd\\[aq]. */\n"
682 "\\&\n"
683 "if (tmpfd != -1) {\n"
684 " if (close(tmpfd) == -1) {\n"
685 " /* Handle errors from close. */\n"
686 " }\n"
687 "}\n"
688 msgstr ""
689 "/* Obtenir une copie de \\[aq]newfd\\[aq] qui peut ensuite être\n"
690 " utilisée pour vérifier les erreurs de close() ; une\n"
691 " erreur EBADF signifie que \\[aq]newfd\\[aq] n'était pas ouvert. */\n"
692 "\\&\n"
693 "tmpfd = dup(newfd);\n"
694 "if (tmpfd == -1 && errno != EBADF) {\n"
695 " /* Gérer une erreur inattendue de dup(). */\n"
696 "}\n"
697 "\\&\n"
698 "/* Copier \\[aq]oldfd\\[aq] dans \\[aq]newfd\\[aq] de manière atomique */\n"
699 "\\&\n"
700 "if (dup2(oldfd, newfd) == -1) {\n"
701 " /* Handle dup2() error. */\n"
702 "}\n"
703 "\\&\n"
704 "/* Maintenant, vérifier les erreurs de close() sur le fichier\n"
705 " originellement désigné par \\[aq]newfd\\[aq]. */\n"
706 "\\&\n"
707 "if (tmpfd != -1) {\n"
708 " if (close(tmpfd) == -1) {\n"
709 " /* Gérer les erreurs de close(). */\n"
710 " }\n"
711 "}\n"
712
713 #. type: TH
714 #: fedora-44 fedora-rawhide
715 #, no-wrap
716 msgid "2024-11-01"
717 msgstr "1 novembre 2024"
718
719 #. type: TH
720 #: fedora-44 fedora-rawhide
721 #, no-wrap
722 msgid "Linux man-pages 6.13"
723 msgstr "Pages du manuel de Linux 6.13"
724
725 #. type: TH
726 #: mageia-cauldron
727 #, no-wrap
728 msgid "Linux man-pages 6.17"
729 msgstr "Pages du manuel de Linux 6.17"
730
731 #. type: TH
732 #: opensuse-leap-16-1 opensuse-tumbleweed
733 #, no-wrap
734 msgid "Linux man-pages (unreleased)"
735 msgstr "Pages du manuel de Linux (non publiées)"