Debian Codegraph @

po/fr/man2/close.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 4.21.0\n"
22 "POT-Creation-Date: 2026-06-05 06:20+0200\n"
23 "PO-Revision-Date: 2024-03-02 17:42+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: 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 "close"
38 msgstr "close"
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 "close - close a file descriptor"
64 msgstr "close - Fermer 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 "B<int close(int >I<fd>B<);>\n"
98 msgstr "B<int close(int >I<fd>B<);>\n"
99
100 #. type: SH
101 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
102 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
103 #, no-wrap
104 msgid "DESCRIPTION"
105 msgstr "DESCRIPTION"
106
107 #. type: Plain text
108 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
109 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
110 msgid ""
111 "B<close>() closes a file descriptor, so that it no longer refers to any "
112 "file and may be reused. Any record locks (see B<fcntl>(2)) held on the "
113 "file it was associated with, and owned by the process, are removed "
114 "regardless of the file descriptor that was used to obtain the lock. This "
115 "has some unfortunate consequences and one should be extra careful when using "
116 "advisory record locking. See B<fcntl>(2) for discussion of the risks and "
117 "consequences as well as for the (probably preferred) open file description "
118 "locks."
119 msgstr ""
120 "B<close>() ferme le descripteur de fichier I<fd>, de manière à ce qu'il ne "
121 "référence plus aucun fichier, et puisse être réutilisé. Tous les "
122 "verrouillages (consultez B<fcntl>(2)) sur le fichier qui lui était associé, "
123 "appartenant au processus, sont supprimés quel que soit le descripteur de "
124 "fichier qui fut utilisé pour obtenir le verrouillage. Cela a quelques "
125 "conséquences malheureuses il convient d'être extrêmement prudent lors de "
126 "l'utilisation de verrouillages d’enregistrements coopératifs. Voir "
127 "B<fcntl>(2) pour une discussion sur les risques et conséquences et sur "
128 "l'utilisation (probablement préférable) des verrouillages de description de "
129 "fichier ouvert."
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 "If I<fd> is the last file descriptor referring to the underlying open file "
136 "description (see B<open>(2)), the resources associated with the open file "
137 "description are freed; if the file descriptor was the last reference to a "
138 "file which has been removed using B<unlink>(2), the file is deleted."
139 msgstr ""
140 "Si I<fd> est le dernier descripteur de fichier qui se réfère à une "
141 "description de fichier ouvert sous-jacente (consultez B<open>(2)), les "
142 "ressources associées à la description de fichier ouvert sont libérées. Si le "
143 "descripteur était la dernière référence sur un fichier supprimé avec "
144 "B<unlink>(2), le fichier est effectivement effacé."
145
146 #. type: SH
147 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
148 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
149 #, no-wrap
150 msgid "RETURN VALUE"
151 msgstr "VALEUR RENVOYÉE"
152
153 #. type: Plain text
154 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
155 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
156 msgid ""
157 "B<close>() returns zero on success. On error, -1 is returned, and I<errno> "
158 "is set to indicate the error."
159 msgstr ""
160 "Si elle réussit, la fonction B<close>() renvoie zéro. En cas d'erreur, elle "
161 "renvoie B<-1> et elle remplit I<errno> pour indiquer l'erreur."
162
163 #. type: SH
164 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
165 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
166 #, no-wrap
167 msgid "ERRORS"
168 msgstr "ERREURS"
169
170 #. type: TP
171 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
172 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
173 #, no-wrap
174 msgid "B<EBADF>"
175 msgstr "B<EBADF>"
176
177 #. type: Plain text
178 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
179 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
180 msgid "I<fd> isn't a valid open file descriptor."
181 msgstr "Le descripteur de fichier I<fd> est invalide."
182
183 #. type: TP
184 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
185 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
186 #, no-wrap
187 msgid "B<EINTR>"
188 msgstr "B<EINTR>"
189
190 #. Though, it's in doubt whether this error can ever occur; see
191 #. https://lwn.net/Articles/576478/ "Returning EINTR from close()"
192 #. type: Plain text
193 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
194 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
195 msgid "The B<close>() call was interrupted by a signal; see B<signal>(7)."
196 msgstr ""
197 "L'appel système B<close>() a été interrompu par un signal ; consultez "
198 "B<signal>(7)."
199
200 #. type: TP
201 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
202 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
203 #, no-wrap
204 msgid "B<EIO>"
205 msgstr "B<EIO>"
206
207 #. type: Plain text
208 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
209 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
210 msgid "An I/O error occurred."
211 msgstr "Une erreur d'entrée-sortie s'est produite."
212
213 #. type: TP
214 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
215 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
216 #, no-wrap
217 msgid "B<ENOSPC>"
218 msgstr "B<ENOSPC>"
219
220 #. type: TQ
221 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
222 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
223 #, no-wrap
224 msgid "B<EDQUOT>"
225 msgstr "B<EDQUOT>"
226
227 #. type: Plain text
228 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
229 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
230 msgid ""
231 "On NFS, these errors are not normally reported against the first write which "
232 "exceeds the available storage space, but instead against a subsequent "
233 "B<write>(2), B<fsync>(2), or B<close>()."
234 msgstr ""
235 "Sur NFS, ces erreurs ne sont en principe pas signalées lors de la première "
236 "écriture qui dépasse l'espace de stockage disponible, mais lors d'un "
237 "B<write>(2), B<fsync>(2) ou B<close>() consécutif."
238
239 #. type: Plain text
240 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
241 #: opensuse-tumbleweed
242 #, fuzzy
243 #| msgid ""
244 #| "See NOTES for a discussion of why B<close>() should not be retried after "
245 #| "an error."
246 msgid ""
247 "See CAVEATS for a discussion of why B<close>() should not be retried after "
248 "an error."
249 msgstr ""
250 "Voir les NOTES pour un point sur la raison pour laquelle B<close>() ne "
251 "devrait pas réessayer après une erreur."
252
253 #. type: SH
254 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
255 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
256 #, no-wrap
257 msgid "STANDARDS"
258 msgstr "NORMES"
259
260 #. type: Plain text
261 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
262 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
263 msgid "POSIX.1-2008."
264 msgstr "POSIX.1-2008."
265
266 #. type: SH
267 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
268 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
269 #, no-wrap
270 msgid "HISTORY"
271 msgstr "HISTORIQUE"
272
273 #. SVr4 documents an additional ENOLINK error condition.
274 #. type: Plain text
275 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
276 #: opensuse-tumbleweed
277 msgid "4.3BSD, SVr4, POSIX.1-1988."
278 msgstr "4.3BSD, SVr4, POSIX.1-1988."
279
280 #. type: SH
281 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
282 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
283 #, no-wrap
284 msgid "NOTES"
285 msgstr "NOTES"
286
287 #. type: Plain text
288 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
289 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
290 msgid ""
291 "The close-on-exec file descriptor flag can be used to ensure that a file "
292 "descriptor is automatically closed upon a successful B<execve>(2); see "
293 "B<fcntl>(2) for details."
294 msgstr ""
295 "L'attribut de descripteur de fichier close-on-exec peut être utilisé pour "
296 "s'assurer qu'un descripteur de fichier est fermé automatiquement en cas de "
297 "succès de B<execve>(2) ; voir B<fcntl>(2) pour des détails."
298
299 #. type: SH
300 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
301 #: opensuse-tumbleweed
302 #, no-wrap
303 msgid "CAVEATS"
304 msgstr ""
305
306 #. type: Plain text
307 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
308 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
309 msgid ""
310 "A successful close does not guarantee that the data has been successfully "
311 "saved to disk, as the kernel uses the buffer cache to defer writes. "
312 "Typically, filesystems do not flush buffers when a file is closed. If you "
313 "need to be sure that the data is physically stored on the underlying disk, "
314 "use B<fsync>(2). (It will depend on the disk hardware at this point.)"
315 msgstr ""
316 "Une fermeture sans erreur ne garantit pas que les données ont été vraiment "
317 "écrites sur le disque, car le noyau repousse les écritures le plus tard "
318 "possible. Il n'est pas fréquent qu'un système de fichiers vide les tampons "
319 "dès la fermeture d'un flux. Si vous désirez vous assurer que les "
320 "informations sont en sûreté sur le disque, utilisez B<fsync>(2) (mais des "
321 "considérations matérielles entrent en jeu à ce moment)."
322
323 #. type: SS
324 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
325 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
326 #, no-wrap
327 msgid "Multithreaded processes and close()"
328 msgstr "Processus multithreadés et close()"
329
330 #. #-#-#-#-# archlinux: close.2.pot (PACKAGE VERSION) #-#-#-#-#
331 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
332 #. From: Fredrik Noring <[email protected]>
333 #. One such race involves signals and ERESTARTSYS. If a file descriptor
334 #. in use by a system call is closed and then reused by, e.g., an
335 #. independent open() in some unrelated thread, before the original system
336 #. call has restarted after ERESTARTSYS, the original system call will
337 #. later restart with the reused file descriptor. This is most likely a
338 #. serious programming error.
339 #. type: Plain text
340 #. #-#-#-#-# debian-trixie: close.2.pot (PACKAGE VERSION) #-#-#-#-#
341 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
342 #. From: Fredrik Noring <[email protected]>
343 #. One such race involves signals and ERESTARTSYS. If a file descriptor
344 #. in use by a system call is closed and then reused by e.g. an
345 #. independent open() in some unrelated thread, before the original system
346 #. call has restarted after ERESTARTSYS, the original system call will
347 #. later restart with the reused file descriptor. This is most likely a
348 #. serious programming error.
349 #. type: Plain text
350 #. #-#-#-#-# debian-unstable: close.2.pot (PACKAGE VERSION) #-#-#-#-#
351 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
352 #. From: Fredrik Noring <[email protected]>
353 #. One such race involves signals and ERESTARTSYS. If a file descriptor
354 #. in use by a system call is closed and then reused by, e.g., an
355 #. independent open() in some unrelated thread, before the original system
356 #. call has restarted after ERESTARTSYS, the original system call will
357 #. later restart with the reused file descriptor. This is most likely a
358 #. serious programming error.
359 #. type: Plain text
360 #. #-#-#-#-# fedora-44: close.2.pot (PACKAGE VERSION) #-#-#-#-#
361 #. type: Plain text
362 #. #-#-#-#-# fedora-rawhide: close.2.pot (PACKAGE VERSION) #-#-#-#-#
363 #. type: Plain text
364 #. #-#-#-#-# mageia-cauldron: close.2.pot (PACKAGE VERSION) #-#-#-#-#
365 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
366 #. From: Fredrik Noring <[email protected]>
367 #. One such race involves signals and ERESTARTSYS. If a file descriptor
368 #. in use by a system call is closed and then reused by, e.g., an
369 #. independent open() in some unrelated thread, before the original system
370 #. call has restarted after ERESTARTSYS, the original system call will
371 #. later restart with the reused file descriptor. This is most likely a
372 #. serious programming error.
373 #. type: Plain text
374 #. #-#-#-#-# opensuse-leap-16-1: close.2.pot (PACKAGE VERSION) #-#-#-#-#
375 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
376 #. From: Fredrik Noring <[email protected]>
377 #. One such race involves signals and ERESTARTSYS. If a file descriptor
378 #. in use by a system call is closed and then reused by, e.g., an
379 #. independent open() in some unrelated thread, before the original system
380 #. call has restarted after ERESTARTSYS, the original system call will
381 #. later restart with the reused file descriptor. This is most likely a
382 #. serious programming error.
383 #. type: Plain text
384 #. #-#-#-#-# opensuse-tumbleweed: close.2.pot (PACKAGE VERSION) #-#-#-#-#
385 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
386 #. From: Fredrik Noring <[email protected]>
387 #. One such race involves signals and ERESTARTSYS. If a file descriptor
388 #. in use by a system call is closed and then reused by, e.g., an
389 #. independent open() in some unrelated thread, before the original system
390 #. call has restarted after ERESTARTSYS, the original system call will
391 #. later restart with the reused file descriptor. This is most likely a
392 #. serious programming error.
393 #. type: Plain text
394 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
395 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
396 msgid ""
397 "It is probably unwise to close file descriptors while they may be in use by "
398 "system calls in other threads in the same process. Since a file descriptor "
399 "may be reused, there are some obscure race conditions that may cause "
400 "unintended side effects."
401 msgstr ""
402 "Il est probablement imprudent de fermer des descripteurs de fichier alors "
403 "qu'ils peuvent peut-être être utilisés par des appels système dans d'autres "
404 "threads du même processus. Puisqu'un descripteur de fichier peut être "
405 "réutilisé, il y a des conditions de concurrence obscures qui peuvent "
406 "provoquer des effets de bord non désirés."
407
408 #. type: Plain text
409 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
410 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
411 msgid ""
412 "Furthermore, consider the following scenario where two threads are "
413 "performing operations on the same file descriptor:"
414 msgstr ""
415 "Par ailleurs, imaginez un scénario où deux threads effectuent plusieurs "
416 "opérations sur le même descripteur de fichier :"
417
418 #. type: IP
419 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
420 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
421 #, no-wrap
422 msgid "(1)"
423 msgstr "(1)"
424
425 #. type: Plain text
426 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
427 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
428 msgid ""
429 "One thread is blocked in an I/O system call on the file descriptor. For "
430 "example, it is trying to B<write>(2) to a pipe that is already full, or "
431 "trying to B<read>(2) from a stream socket which currently has no available "
432 "data."
433 msgstr ""
434 "Un thread est bloqué dans un appel système E/S sur le descripteur de "
435 "fichier. Par exemple, il essaie de B<write>(2) dans un tube déjà plein ou de "
436 "B<read>(2) depuis le socket d'un flux qui n'a pas de données disponibles "
437 "actuellement."
438
439 #. type: IP
440 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
441 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
442 #, no-wrap
443 msgid "(2)"
444 msgstr "(2)"
445
446 #. type: Plain text
447 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
448 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
449 msgid "Another thread closes the file descriptor."
450 msgstr "Un autre thread ferme le descripteur de fichier."
451
452 #. type: Plain text
453 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
454 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
455 msgid ""
456 "The behavior in this situation varies across systems. On some systems, when "
457 "the file descriptor is closed, the blocking system call returns immediately "
458 "with an error."
459 msgstr ""
460 "Dans cette situation, le comportement varie selon les systèmes. Sur "
461 "certains, quand le descripteur de fichier est fermé, l'appel système qui "
462 "bloque renvoie immédiatement une erreur."
463
464 #. 'struct file' in kernel-speak
465 #. type: Plain text
466 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
467 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
468 msgid ""
469 "On Linux (and possibly some other systems), the behavior is different: the "
470 "blocking I/O system call holds a reference to the underlying open file "
471 "description, and this reference keeps the description open until the I/O "
472 "system call completes. (See B<open>(2) for a discussion of open file "
473 "descriptions.) Thus, the blocking system call in the first thread may "
474 "successfully complete after the B<close>() in the second thread."
475 msgstr ""
476 "Sur Linux (et probablement d'autres systèmes), le comportement est "
477 "différent : l'appel système E/S bloquant conserve une référence à la "
478 "description du fichier ouvert sous-jacent et celle-ci garde la description "
479 "ouverte jusqu'à ce que l'appel système E/S se termine (voir B<open>(2) pour "
480 "un point sur les descriptions de fichiers ouverts). Ainsi, l'appel système "
481 "bloquant du premier thread peut se terminer avec succès après le B<close>() "
482 "du deuxième thread."
483
484 #. type: SS
485 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
486 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
487 #, no-wrap
488 msgid "Dealing with error returns from close()"
489 msgstr "Gérer les erreurs renvoyées par close()"
490
491 #. type: Plain text
492 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
493 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
494 msgid ""
495 "A careful programmer will check the return value of B<close>(), since it is "
496 "quite possible that errors on a previous B<write>(2) operation are reported "
497 "only on the final B<close>() that releases the open file description. "
498 "Failing to check the return value when closing a file may lead to I<silent> "
499 "loss of data. This can especially be observed with NFS and with disk quota."
500 msgstr ""
501 "Un programmeur prudent vérifiera le code de retour de B<close>(), car il est "
502 "possible qu'une erreur correspondant à un appel B<write>(2) antérieur ne "
503 "soit rapportée que lors du B<close>() final. Ne pas vérifier le code de "
504 "retour lorsqu’un fichier est fermé peut conduire à une perte B<silencieuse> "
505 "de données. Cela est principalement vrai dans le cas de systèmes de fichiers "
506 "NFS, ou avec l'utilisation des quotas de disques."
507
508 #. type: Plain text
509 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
510 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
511 msgid ""
512 "Note, however, that a failure return should be used only for diagnostic "
513 "purposes (i.e., a warning to the application that there may still be I/O "
514 "pending or there may have been failed I/O) or remedial purposes (e.g., "
515 "writing the file once more or creating a backup)."
516 msgstr ""
517 "Remarquez cependant que la valeur de retour ne devrait être utilisée que "
518 "pour les diagnostics (à savoir pour prévenir une application qu'il peut "
519 "rester des E/S en attente ou échouées) ou de correction (comme pour écrire "
520 "un fichier une ou plusieurs fois ou pour créer une sauvegarde)."
521
522 #
523 #. The file descriptor is released early in close();
524 #. close() ==> __close_fd():
525 #. __put_unused_fd() ==> __clear_open_fd()
526 #. return filp_close(file, files);
527 #. The errors are returned by filp_close() after the FD has been
528 #. cleared for re-use.
529 #. filp_close()
530 #. type: Plain text
531 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
532 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
533 msgid ""
534 "Retrying the B<close>() after a failure return is the wrong thing to do, "
535 "since this may cause a reused file descriptor from another thread to be "
536 "closed. This can occur because the Linux kernel I<always> releases the file "
537 "descriptor early in the close operation, freeing it for reuse; the steps "
538 "that may return an error, such as flushing data to the filesystem or device, "
539 "occur only later in the close operation."
540 msgstr ""
541 "Réessayer B<close>() après un renvoi d'échec n'est pas la bonne manière de "
542 "faire, car il peut en résulter que le descripteur d'un fichier qui serait "
543 "réutilisé à partir d'un autre thread se ferme. Cela est possible car le "
544 "noyau Linux abandonne I<toujours> tôt le descripteur de fichier lors d'une "
545 "opération de fermeture, ce qui le libère pour être réutilisé ; les étapes de "
546 "renvoi d'erreur telles que l'effacement des données sur le système de "
547 "fichiers ou le périphérique arrivent plus tard dans l'opération de fermeture."
548
549 #. FreeBSD documents this explicitly. From the look of the source code
550 #. SVR4, ancient SunOS, later Solaris, and AIX all do this.
551 #. type: Plain text
552 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
553 #: opensuse-tumbleweed
554 #, fuzzy
555 #| msgid ""
556 #| "Many other implementations similarly always close the file descriptor "
557 #| "(except in the case of B<EBADF>, meaning that the file descriptor was "
558 #| "invalid) even if they subsequently report an error on return from "
559 #| "B<close>(). POSIX.1 is currently silent on this point, but there are "
560 #| "plans to mandate this behavior in the next major release of the standard."
561 msgid ""
562 "Many other implementations similarly always close the file descriptor "
563 "(except in the case of B<EBADF>, meaning that the file descriptor was "
564 "invalid) even if they subsequently report an error on return from "
565 "B<close>(). POSIX.1-2008 was silent on this point."
566 msgstr ""
567 "De même, beaucoup d'autres implémentations ferment toujours le descripteur "
568 "de fichier (sauf en cas de B<EBADF>, qui signifie que le descripteur de "
569 "fichier n'était pas valable), même si elles signalent ensuite une erreur "
570 "renvoyée par B<close>(). POSIX.1 ne dit rien aujourd'hui sur ce point mais "
571 "ce comportement sera rendu obligatoire dans la prochaine version majeure du "
572 "standard."
573
574 #. type: Plain text
575 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
576 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
577 msgid ""
578 "A careful programmer who wants to know about I/O errors may precede "
579 "B<close>() with a call to B<fsync>(2)."
580 msgstr ""
581 "Un programmeur prudent qui veut savoir les erreurs E/S doit faire précéder "
582 "B<close>() d'un appel B<fsync>(2)."
583
584 #. type: Plain text
585 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
586 #: opensuse-tumbleweed
587 #, fuzzy
588 #| msgid ""
589 #| "The B<EINTR> error is a somewhat special case. Regarding the B<EINTR> "
590 #| "error, POSIX.1-2008 says:"
591 msgid ""
592 "The B<EINTR> error is a somewhat special case. Regarding the B<EINTR> "
593 "error, POSIX.1-2008 said:"
594 msgstr ""
595 "L'erreur B<EINTR> est un cas un peu particulier. Concernant l'erreur "
596 "B<EINTR>, POSIX.1-2008 dit :"
597
598 #. type: Plain text
599 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
600 #: opensuse-tumbleweed
601 #, fuzzy
602 #| msgid ""
603 #| "If B<close>() is interrupted by a signal that is to be caught, it shall "
604 #| "return -1 with I<errno> set to B<EINTR> and the state of I<fildes> is "
605 #| "unspecified."
606 msgid ""
607 "If B<close>() is interrupted by a signal that is to be caught, it shall "
608 "return -1 with I<errno> set to B<EINTR> and the state of I<fd> is "
609 "unspecified."
610 msgstr ""
611 "Si B<close>() est interrompu par un signal qui doit être récupéré, il "
612 "renverra B<-1> et positionnera I<errno> sur B<EINTR> et l'état de I<fildes> "
613 "ne sera pas spécifié."
614
615 #
616 #. type: Plain text
617 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
618 #: opensuse-tumbleweed
619 #, fuzzy
620 #| msgid ""
621 #| "This permits the behavior that occurs on Linux and many other "
622 #| "implementations, where, as with other errors that may be reported by "
623 #| "B<close>(), the file descriptor is guaranteed to be closed. However, it "
624 #| "also permits another possibility: that the implementation returns an "
625 #| "B<EINTR> error and keeps the file descriptor open. (According to its "
626 #| "documentation, HP-UX's B<close>() does this.) The caller must then once "
627 #| "more use B<close>() to close the file descriptor, to avoid file "
628 #| "descriptor leaks. This divergence in implementation behaviors provides a "
629 #| "difficult hurdle for portable applications, since on many "
630 #| "implementations, B<close>() must not be called again after an B<EINTR> "
631 #| "error, and on at least one, B<close>() must be called again. There are "
632 #| "plans to address this conundrum for the next major release of the POSIX.1 "
633 #| "standard."
634 msgid ""
635 "This permits the behavior that occurs on Linux and many other "
636 "implementations, where, as with other errors that may be reported by "
637 "B<close>(), the file descriptor is guaranteed to be closed. However, it "
638 "also permits another possibility: that the implementation returns an "
639 "B<EINTR> error and keeps the file descriptor open. (According to its "
640 "documentation, HP-UX's B<close>() does this.) The caller must then once "
641 "more use B<close>() to close the file descriptor, to avoid file descriptor "
642 "leaks. This divergence in implementation behaviors provides a difficult "
643 "hurdle for portable applications, since on many implementations, B<close>() "
644 "must not be called again after an B<EINTR> error, and on at least one, "
645 "B<close>() must be called again."
646 msgstr ""
647 "Cela autorise un comportement qui arrive sur Linux et beaucoup d'autres "
648 "implémentations, où, comme pour beaucoup d'erreurs pouvant être signalées "
649 "par B<close>(), le descripteur de fichier se fermera assurément. Néanmoins, "
650 "cela permet aussi une autre possibilité : l'implémentation renvoie une "
651 "erreur B<EINTR> et laisse le descripteur de fichier ouvert (selon sa "
652 "documentation, le B<close>() de HP-UX fait cela). L'appelant doit donc "
653 "utiliser une fois de plus B<close>() pour fermer le descripteur de fichier, "
654 "afin d'éviter des fuites du descripteur de fichier. Cette divergence de "
655 "comportements dans l'implémentation apporte un obstacle difficile à la "
656 "portabilité des applications car sur beaucoup d'implémentations, B<close>() "
657 "ne doit pas être rappelé après une erreur B<EINTR>, tandis que sur au moins "
658 "une d'elles, B<close>() doit être rappelé. Il est envisagé de s'occuper de "
659 "ce casse-tête dans la prochaine version majeure du standard POSIX.1."
660
661 #. type: Plain text
662 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
663 #: opensuse-tumbleweed
664 msgid ""
665 "POSIX.1-2024 standardized the behavior of HP-UX, making Linux and many other "
666 "implementations non-conforming. There are no plans to change the behavior "
667 "on Linux."
668 msgstr ""
669
670 #. type: SH
671 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
672 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
673 #, no-wrap
674 msgid "SEE ALSO"
675 msgstr "VOIR AUSSI"
676
677 #. type: Plain text
678 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
679 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
680 msgid ""
681 "B<close_range>(2), B<fcntl>(2), B<fsync>(2), B<open>(2), B<shutdown>(2), "
682 "B<unlink>(2), B<fclose>(3)"
683 msgstr ""
684 "B<close_range>(2), B<fcntl>(2), B<fsync>(2), B<open>(2), B<shutdown>(2), "
685 "B<unlink>(2), B<fclose>(3)"
686
687 #. type: TH
688 #: debian-trixie
689 #, no-wrap
690 msgid "2024-05-02"
691 msgstr "2 mai 2024"
692
693 #. type: TH
694 #: debian-trixie
695 #, no-wrap
696 msgid "Linux man-pages 6.9.1"
697 msgstr "Pages du manuel de Linux 6.9.1"
698
699 #. type: Plain text
700 #: debian-trixie
701 msgid "Standard C library (I<libc>, I<-lc>)"
702 msgstr "Bibliothèque C standard (I<libc>, I<-lc>)"
703
704 #. type: Plain text
705 #: debian-trixie fedora-44 fedora-rawhide
706 msgid ""
707 "See NOTES for a discussion of why B<close>() should not be retried after an "
708 "error."
709 msgstr ""
710 "Voir les NOTES pour un point sur la raison pour laquelle B<close>() ne "
711 "devrait pas réessayer après une erreur."
712
713 #. SVr4 documents an additional ENOLINK error condition.
714 #. type: Plain text
715 #: debian-trixie fedora-44 fedora-rawhide
716 msgid "POSIX.1-2001, SVr4, 4.3BSD."
717 msgstr "POSIX.1-2001, SVr4, 4.3BSD."
718
719 #. FreeBSD documents this explicitly. From the look of the source code
720 #. SVR4, ancient SunOS, later Solaris, and AIX all do this.
721 #. Issue 8
722 #. type: Plain text
723 #: debian-trixie fedora-44 fedora-rawhide
724 msgid ""
725 "Many other implementations similarly always close the file descriptor "
726 "(except in the case of B<EBADF>, meaning that the file descriptor was "
727 "invalid) even if they subsequently report an error on return from "
728 "B<close>(). POSIX.1 is currently silent on this point, but there are plans "
729 "to mandate this behavior in the next major release of the standard."
730 msgstr ""
731 "De même, beaucoup d'autres implémentations ferment toujours le descripteur "
732 "de fichier (sauf en cas de B<EBADF>, qui signifie que le descripteur de "
733 "fichier n'était pas valable), même si elles signalent ensuite une erreur "
734 "renvoyée par B<close>(). POSIX.1 ne dit rien aujourd'hui sur ce point mais "
735 "ce comportement sera rendu obligatoire dans la prochaine version majeure du "
736 "standard."
737
738 #. type: Plain text
739 #: debian-trixie fedora-44 fedora-rawhide
740 msgid ""
741 "The B<EINTR> error is a somewhat special case. Regarding the B<EINTR> "
742 "error, POSIX.1-2008 says:"
743 msgstr ""
744 "L'erreur B<EINTR> est un cas un peu particulier. Concernant l'erreur "
745 "B<EINTR>, POSIX.1-2008 dit :"
746
747 #. type: Plain text
748 #: debian-trixie fedora-44 fedora-rawhide
749 msgid ""
750 "If B<close>() is interrupted by a signal that is to be caught, it shall "
751 "return -1 with I<errno> set to B<EINTR> and the state of I<fildes> is "
752 "unspecified."
753 msgstr ""
754 "Si B<close>() est interrompu par un signal qui doit être récupéré, il "
755 "renverra B<-1> et positionnera I<errno> sur B<EINTR> et l'état de I<fildes> "
756 "ne sera pas spécifié."
757
758 #
759 #. FIXME . for later review when Issue 8 is one day released...
760 #. POSIX proposes further changes for EINTR
761 #. http://austingroupbugs.net/tag_view_page.php?tag_id=8
762 #. http://austingroupbugs.net/view.php?id=529
763 #. FIXME .
764 #. Review the following glibc bug later
765 #. https://sourceware.org/bugzilla/show_bug.cgi?id=14627
766 #. type: Plain text
767 #: debian-trixie fedora-44 fedora-rawhide
768 msgid ""
769 "This permits the behavior that occurs on Linux and many other "
770 "implementations, where, as with other errors that may be reported by "
771 "B<close>(), the file descriptor is guaranteed to be closed. However, it "
772 "also permits another possibility: that the implementation returns an "
773 "B<EINTR> error and keeps the file descriptor open. (According to its "
774 "documentation, HP-UX's B<close>() does this.) The caller must then once "
775 "more use B<close>() to close the file descriptor, to avoid file descriptor "
776 "leaks. This divergence in implementation behaviors provides a difficult "
777 "hurdle for portable applications, since on many implementations, B<close>() "
778 "must not be called again after an B<EINTR> error, and on at least one, "
779 "B<close>() must be called again. There are plans to address this conundrum "
780 "for the next major release of the POSIX.1 standard."
781 msgstr ""
782 "Cela autorise un comportement qui arrive sur Linux et beaucoup d'autres "
783 "implémentations, où, comme pour beaucoup d'erreurs pouvant être signalées "
784 "par B<close>(), le descripteur de fichier se fermera assurément. Néanmoins, "
785 "cela permet aussi une autre possibilité : l'implémentation renvoie une "
786 "erreur B<EINTR> et laisse le descripteur de fichier ouvert (selon sa "
787 "documentation, le B<close>() de HP-UX fait cela). L'appelant doit donc "
788 "utiliser une fois de plus B<close>() pour fermer le descripteur de fichier, "
789 "afin d'éviter des fuites du descripteur de fichier. Cette divergence de "
790 "comportements dans l'implémentation apporte un obstacle difficile à la "
791 "portabilité des applications car sur beaucoup d'implémentations, B<close>() "
792 "ne doit pas être rappelé après une erreur B<EINTR>, tandis que sur au moins "
793 "une d'elles, B<close>() doit être rappelé. Il est envisagé de s'occuper de "
794 "ce casse-tête dans la prochaine version majeure du standard POSIX.1."
795
796 #. type: TH
797 #: fedora-44 fedora-rawhide
798 #, no-wrap
799 msgid "2024-07-23"
800 msgstr "23 juillet 2024"
801
802 #. type: TH
803 #: fedora-44 fedora-rawhide
804 #, no-wrap
805 msgid "Linux man-pages 6.13"
806 msgstr "Pages du manuel de Linux 6.13"
807
808 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
809 #. From: Fredrik Noring <[email protected]>
810 #. One such race involves signals and ERESTARTSYS. If a file descriptor
811 #. in use by a system call is closed and then reused by e.g. an
812 #. independent open() in some unrelated thread, before the original system
813 #. call has restarted after ERESTARTSYS, the original system call will
814 #. later restart with the reused file descriptor. This is most likely a
815 #. serious programming error.
816 #. type: Plain text
817 #: fedora-44 fedora-rawhide
818 msgid ""
819 "When dealing with sockets, you have to be sure that there is no B<recv>(2) "
820 "still blocking on it on another thread, otherwise it might block forever, "
821 "since no more messages will be send via the socket. Be sure to use "
822 "B<shutdown>(2) to shut down all parts the connection before closing the "
823 "socket."
824 msgstr ""
825 "Quand on gère des sockets, vous devez être sûr qu'il n'y a pas de B<recv>(2) "
826 "qui bloque dessus sur un autre thread, sans quoi il pourrait être bloqué "
827 "pour toujours, puisqu'aucun message ne lui sera plus envoyé par le socket. "
828 "Assurez-vous d'éteindre B<shutdown>(2) pour éteindre tous les bouts de "
829 "connexion avant de fermer le socket."
830
831 #. type: TH
832 #: mageia-cauldron
833 #, no-wrap
834 msgid "Linux man-pages 6.17"
835 msgstr "Pages du manuel de Linux 6.17"
836
837 #. type: TH
838 #: opensuse-leap-16-1 opensuse-tumbleweed
839 #, no-wrap
840 msgid "Linux man-pages (unreleased)"
841 msgstr "Pages du manuel de Linux (non publiées)"