Debian Codegraph @

po/pt_BR/man2/close.2.po

raw
1 # Brazilian Portuguese translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # André Luiz Fassone <[email protected]>, 2000.
5 # Fábio Henrique F. Silva <[email protected]>, 2000.
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: manpages-l10n\n"
9 "POT-Creation-Date: 2026-06-05 06:20+0200\n"
10 "PO-Revision-Date: 2000-08-21 23:11+0200\n"
11 "Last-Translator: Fábio Henrique F. Silva <[email protected]>\n"
12 "Language-Team: Brazilian Portuguese <debian-l10n-"
13 "[email protected]>\n"
14 "Language: pt_BR\n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
19 "X-Generator: Lokalize 20.04.1\n"
20
21 #. type: TH
22 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
23 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
24 #, no-wrap
25 msgid "close"
26 msgstr "close"
27
28 #. type: TH
29 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
30 #: opensuse-tumbleweed
31 #, no-wrap
32 msgid "2026-02-08"
33 msgstr "8 fevereiro 2026"
34
35 #. type: TH
36 #: archlinux debian-unstable
37 #, fuzzy, no-wrap
38 #| msgid "Linux man-pages 6.17"
39 msgid "Linux man-pages 6.18"
40 msgstr "Linux man-pages 6.17"
41
42 #. type: SH
43 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
44 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
45 #, no-wrap
46 msgid "NAME"
47 msgstr "NOME"
48
49 #. type: Plain text
50 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
51 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
52 msgid "close - close a file descriptor"
53 msgstr "close - fecha um descritor de arquivo"
54
55 #. type: SH
56 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
57 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
58 #, no-wrap
59 msgid "LIBRARY"
60 msgstr "BIBLIOTECA"
61
62 #. type: Plain text
63 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
64 #: opensuse-leap-16-1 opensuse-tumbleweed
65 msgid "Standard C library (I<libc>,\\ I<-lc>)"
66 msgstr "Biblioteca C Padrão (I<libc>,\\ I<-lc>)"
67
68 #. type: SH
69 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
70 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
71 #, no-wrap
72 msgid "SYNOPSIS"
73 msgstr "SINOPSE"
74
75 #. type: Plain text
76 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
77 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
78 #, no-wrap
79 msgid "B<#include E<lt>unistd.hE<gt>>\n"
80 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
81
82 #. type: Plain text
83 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
84 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
85 #, no-wrap
86 msgid "B<int close(int >I<fd>B<);>\n"
87 msgstr "B<int close(int >I<fd>B<);>\n"
88
89 #. type: SH
90 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
91 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
92 #, no-wrap
93 msgid "DESCRIPTION"
94 msgstr "DESCRIÇÃO"
95
96 #. type: Plain text
97 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
98 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
99 #, fuzzy
100 #| msgid ""
101 #| "B<close> closes a file descriptor, so that it no longer refers to any "
102 #| "file and may be reused. Any locks held on the file it was associated "
103 #| "with, and owned by the process, are removed (regardless of the file "
104 #| "descriptor that was used to obtain the lock)."
105 msgid ""
106 "B<close>() closes a file descriptor, so that it no longer refers to any "
107 "file and may be reused. Any record locks (see B<fcntl>(2)) held on the "
108 "file it was associated with, and owned by the process, are removed "
109 "regardless of the file descriptor that was used to obtain the lock. This "
110 "has some unfortunate consequences and one should be extra careful when using "
111 "advisory record locking. See B<fcntl>(2) for discussion of the risks and "
112 "consequences as well as for the (probably preferred) open file description "
113 "locks."
114 msgstr ""
115 "B<close> fecha um descritor de arquivos. Assim que ele não se refira a "
116 "quaisquer arquivos poderá ser reusado. Qualquer bloqueio aplicado ao arquivo "
117 "e de propriedade do processo é removido (independente do descritor de "
118 "arquivo que foi usado para aplicar o bloqueio)."
119
120 #. type: Plain text
121 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
122 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
123 #, fuzzy
124 #| msgid ""
125 #| "If I<fd> is the last copy of a particular file descriptor the resources "
126 #| "associated with it are freed; if the descriptor was the last reference to "
127 #| "a file which has been removed using B<unlink>(2) the file is deleted."
128 msgid ""
129 "If I<fd> is the last file descriptor referring to the underlying open file "
130 "description (see B<open>(2)), the resources associated with the open file "
131 "description are freed; if the file descriptor was the last reference to a "
132 "file which has been removed using B<unlink>(2), the file is deleted."
133 msgstr ""
134 "Se I<fd> é a última cópia de um descritor de arquivos em particular os "
135 "recursos associados a ele serão liberados; se um descritor tem a última "
136 "referência para um arquivo o qual foi removido usando e B<unlink>(2) o "
137 "arquivo é apaguado."
138
139 #. type: SH
140 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
141 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
142 #, no-wrap
143 msgid "RETURN VALUE"
144 msgstr "VALOR DE RETORNO"
145
146 #. type: Plain text
147 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
148 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
149 #, fuzzy
150 #| msgid "B<close> returns zero on success, or -1 if an error occurred."
151 msgid ""
152 "B<close>() returns zero on success. On error, -1 is returned, and I<errno> "
153 "is set to indicate the error."
154 msgstr ""
155 "B<close> em caso de sucesso, 0 é retornado, caso contrário -1 é retornado."
156
157 #. type: SH
158 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
159 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
160 #, no-wrap
161 msgid "ERRORS"
162 msgstr "ERROS"
163
164 #. type: TP
165 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
166 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
167 #, no-wrap
168 msgid "B<EBADF>"
169 msgstr "B<EBADF>"
170
171 #. type: Plain text
172 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
173 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
174 msgid "I<fd> isn't a valid open file descriptor."
175 msgstr "I<fd> não é válido como descritor de arquivos."
176
177 #. type: TP
178 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
179 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
180 #, no-wrap
181 msgid "B<EINTR>"
182 msgstr "B<EINTR>"
183
184 #. Though, it's in doubt whether this error can ever occur; see
185 #. https://lwn.net/Articles/576478/ "Returning EINTR from close()"
186 #. type: Plain text
187 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
188 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
189 msgid "The B<close>() call was interrupted by a signal; see B<signal>(7)."
190 msgstr ""
191
192 #. type: TP
193 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
194 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
195 #, no-wrap
196 msgid "B<EIO>"
197 msgstr "B<EIO>"
198
199 #. type: Plain text
200 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
201 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
202 msgid "An I/O error occurred."
203 msgstr "Ocorreu um erro de E/S."
204
205 #. type: TP
206 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
207 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
208 #, no-wrap
209 msgid "B<ENOSPC>"
210 msgstr "B<ENOSPC>"
211
212 #. type: TQ
213 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
214 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
215 #, no-wrap
216 msgid "B<EDQUOT>"
217 msgstr "B<EDQUOT>"
218
219 #. type: Plain text
220 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
221 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
222 msgid ""
223 "On NFS, these errors are not normally reported against the first write which "
224 "exceeds the available storage space, but instead against a subsequent "
225 "B<write>(2), B<fsync>(2), or B<close>()."
226 msgstr ""
227
228 #. type: Plain text
229 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
230 #: opensuse-tumbleweed
231 msgid ""
232 "See CAVEATS for a discussion of why B<close>() should not be retried after "
233 "an error."
234 msgstr ""
235
236 #. type: SH
237 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
238 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
239 #, no-wrap
240 msgid "STANDARDS"
241 msgstr "PADRÕES"
242
243 #. type: Plain text
244 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
245 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
246 msgid "POSIX.1-2008."
247 msgstr "POSIX.1-2008."
248
249 #. type: SH
250 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
251 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
252 #, no-wrap
253 msgid "HISTORY"
254 msgstr "HISTÓRICO"
255
256 #. SVr4 documents an additional ENOLINK error condition.
257 #. type: Plain text
258 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
259 #: opensuse-tumbleweed
260 msgid "4.3BSD, SVr4, POSIX.1-1988."
261 msgstr "4.3BSD, SVr4, POSIX.1-1988."
262
263 #. type: SH
264 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
265 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
266 #, no-wrap
267 msgid "NOTES"
268 msgstr "NOTAS"
269
270 #. type: Plain text
271 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
272 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
273 msgid ""
274 "The close-on-exec file descriptor flag can be used to ensure that a file "
275 "descriptor is automatically closed upon a successful B<execve>(2); see "
276 "B<fcntl>(2) for details."
277 msgstr ""
278
279 #. type: SH
280 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
281 #: opensuse-tumbleweed
282 #, no-wrap
283 msgid "CAVEATS"
284 msgstr ""
285
286 #. type: Plain text
287 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
288 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
289 #, fuzzy
290 #| msgid ""
291 #| "A successful close does not guarantee that the data has been successfully "
292 #| "saved to disk, as the kernel defers writes. Is not common for a "
293 #| "filesystem to flush the buffers when the stream is closed. If you need to "
294 #| "be sure that the data is physically stored use fsync(2) or sync(2), they "
295 #| "will get you closer to that goal (it will depend on the disk hardware at "
296 #| "this point)."
297 msgid ""
298 "A successful close does not guarantee that the data has been successfully "
299 "saved to disk, as the kernel uses the buffer cache to defer writes. "
300 "Typically, filesystems do not flush buffers when a file is closed. If you "
301 "need to be sure that the data is physically stored on the underlying disk, "
302 "use B<fsync>(2). (It will depend on the disk hardware at this point.)"
303 msgstr ""
304 "Um fechamento bem sucedido não garante que os dados tenham sido armazenados "
305 "com sucesso no disco, já que o kernel adia escritas. Isto não é comum para "
306 "um sistema de arquivos que esvazia os buffers quando o fluxo é fechado. Se "
307 "você precisa estar certo que os dados foram fisicamente armazenados use "
308 "fsync(2) ou sync(2)."
309
310 #. type: SS
311 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
312 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
313 #, no-wrap
314 msgid "Multithreaded processes and close()"
315 msgstr ""
316
317 #. #-#-#-#-# archlinux: close.2.pot (PACKAGE VERSION) #-#-#-#-#
318 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
319 #. From: Fredrik Noring <[email protected]>
320 #. One such race involves signals and ERESTARTSYS. If a file descriptor
321 #. in use by a system call is closed and then reused by, e.g., an
322 #. independent open() in some unrelated thread, before the original system
323 #. call has restarted after ERESTARTSYS, the original system call will
324 #. later restart with the reused file descriptor. This is most likely a
325 #. serious programming error.
326 #. type: Plain text
327 #. #-#-#-#-# debian-trixie: close.2.pot (PACKAGE VERSION) #-#-#-#-#
328 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
329 #. From: Fredrik Noring <[email protected]>
330 #. One such race involves signals and ERESTARTSYS. If a file descriptor
331 #. in use by a system call is closed and then reused by e.g. an
332 #. independent open() in some unrelated thread, before the original system
333 #. call has restarted after ERESTARTSYS, the original system call will
334 #. later restart with the reused file descriptor. This is most likely a
335 #. serious programming error.
336 #. type: Plain text
337 #. #-#-#-#-# debian-unstable: close.2.pot (PACKAGE VERSION) #-#-#-#-#
338 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
339 #. From: Fredrik Noring <[email protected]>
340 #. One such race involves signals and ERESTARTSYS. If a file descriptor
341 #. in use by a system call is closed and then reused by, e.g., an
342 #. independent open() in some unrelated thread, before the original system
343 #. call has restarted after ERESTARTSYS, the original system call will
344 #. later restart with the reused file descriptor. This is most likely a
345 #. serious programming error.
346 #. type: Plain text
347 #. #-#-#-#-# fedora-44: close.2.pot (PACKAGE VERSION) #-#-#-#-#
348 #. type: Plain text
349 #. #-#-#-#-# fedora-rawhide: close.2.pot (PACKAGE VERSION) #-#-#-#-#
350 #. type: Plain text
351 #. #-#-#-#-# mageia-cauldron: close.2.pot (PACKAGE VERSION) #-#-#-#-#
352 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
353 #. From: Fredrik Noring <[email protected]>
354 #. One such race involves signals and ERESTARTSYS. If a file descriptor
355 #. in use by a system call is closed and then reused by, e.g., an
356 #. independent open() in some unrelated thread, before the original system
357 #. call has restarted after ERESTARTSYS, the original system call will
358 #. later restart with the reused file descriptor. This is most likely a
359 #. serious programming error.
360 #. type: Plain text
361 #. #-#-#-#-# opensuse-leap-16-1: close.2.pot (PACKAGE VERSION) #-#-#-#-#
362 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
363 #. From: Fredrik Noring <[email protected]>
364 #. One such race involves signals and ERESTARTSYS. If a file descriptor
365 #. in use by a system call is closed and then reused by, e.g., an
366 #. independent open() in some unrelated thread, before the original system
367 #. call has restarted after ERESTARTSYS, the original system call will
368 #. later restart with the reused file descriptor. This is most likely a
369 #. serious programming error.
370 #. type: Plain text
371 #. #-#-#-#-# opensuse-tumbleweed: close.2.pot (PACKAGE VERSION) #-#-#-#-#
372 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
373 #. From: Fredrik Noring <[email protected]>
374 #. One such race involves signals and ERESTARTSYS. If a file descriptor
375 #. in use by a system call is closed and then reused by, e.g., an
376 #. independent open() in some unrelated thread, before the original system
377 #. call has restarted after ERESTARTSYS, the original system call will
378 #. later restart with the reused file descriptor. This is most likely a
379 #. serious programming error.
380 #. type: Plain text
381 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
382 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
383 msgid ""
384 "It is probably unwise to close file descriptors while they may be in use by "
385 "system calls in other threads in the same process. Since a file descriptor "
386 "may be reused, there are some obscure race conditions that may cause "
387 "unintended side effects."
388 msgstr ""
389
390 #. type: Plain text
391 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
392 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
393 msgid ""
394 "Furthermore, consider the following scenario where two threads are "
395 "performing operations on the same file descriptor:"
396 msgstr ""
397
398 #. type: IP
399 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
400 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
401 #, no-wrap
402 msgid "(1)"
403 msgstr "(1)"
404
405 #. type: Plain text
406 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
407 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
408 msgid ""
409 "One thread is blocked in an I/O system call on the file descriptor. For "
410 "example, it is trying to B<write>(2) to a pipe that is already full, or "
411 "trying to B<read>(2) from a stream socket which currently has no available "
412 "data."
413 msgstr ""
414
415 #. type: IP
416 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
417 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
418 #, no-wrap
419 msgid "(2)"
420 msgstr "(2)"
421
422 #. type: Plain text
423 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
424 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
425 #, fuzzy
426 #| msgid "close - close a file descriptor"
427 msgid "Another thread closes the file descriptor."
428 msgstr "close - fecha um descritor de arquivo"
429
430 #. type: Plain text
431 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
432 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
433 msgid ""
434 "The behavior in this situation varies across systems. On some systems, when "
435 "the file descriptor is closed, the blocking system call returns immediately "
436 "with an error."
437 msgstr ""
438
439 #. 'struct file' in kernel-speak
440 #. type: Plain text
441 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
442 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
443 msgid ""
444 "On Linux (and possibly some other systems), the behavior is different: the "
445 "blocking I/O system call holds a reference to the underlying open file "
446 "description, and this reference keeps the description open until the I/O "
447 "system call completes. (See B<open>(2) for a discussion of open file "
448 "descriptions.) Thus, the blocking system call in the first thread may "
449 "successfully complete after the B<close>() in the second thread."
450 msgstr ""
451
452 #. type: SS
453 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
454 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
455 #, no-wrap
456 msgid "Dealing with error returns from close()"
457 msgstr ""
458
459 #. type: Plain text
460 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
461 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
462 msgid ""
463 "A careful programmer will check the return value of B<close>(), since it is "
464 "quite possible that errors on a previous B<write>(2) operation are reported "
465 "only on the final B<close>() that releases the open file description. "
466 "Failing to check the return value when closing a file may lead to I<silent> "
467 "loss of data. This can especially be observed with NFS and with disk quota."
468 msgstr ""
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 "Note, however, that a failure return should be used only for diagnostic "
475 "purposes (i.e., a warning to the application that there may still be I/O "
476 "pending or there may have been failed I/O) or remedial purposes (e.g., "
477 "writing the file once more or creating a backup)."
478 msgstr ""
479
480 #
481 #. The file descriptor is released early in close();
482 #. close() ==> __close_fd():
483 #. __put_unused_fd() ==> __clear_open_fd()
484 #. return filp_close(file, files);
485 #. The errors are returned by filp_close() after the FD has been
486 #. cleared for re-use.
487 #. filp_close()
488 #. type: Plain text
489 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
490 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
491 msgid ""
492 "Retrying the B<close>() after a failure return is the wrong thing to do, "
493 "since this may cause a reused file descriptor from another thread to be "
494 "closed. This can occur because the Linux kernel I<always> releases the file "
495 "descriptor early in the close operation, freeing it for reuse; the steps "
496 "that may return an error, such as flushing data to the filesystem or device, "
497 "occur only later in the close operation."
498 msgstr ""
499
500 #. FreeBSD documents this explicitly. From the look of the source code
501 #. SVR4, ancient SunOS, later Solaris, and AIX all do this.
502 #. type: Plain text
503 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
504 #: opensuse-tumbleweed
505 msgid ""
506 "Many other implementations similarly always close the file descriptor "
507 "(except in the case of B<EBADF>, meaning that the file descriptor was "
508 "invalid) even if they subsequently report an error on return from "
509 "B<close>(). POSIX.1-2008 was silent on this point."
510 msgstr ""
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 "A careful programmer who wants to know about I/O errors may precede "
517 "B<close>() with a call to B<fsync>(2)."
518 msgstr ""
519
520 #. type: Plain text
521 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
522 #: opensuse-tumbleweed
523 msgid ""
524 "The B<EINTR> error is a somewhat special case. Regarding the B<EINTR> "
525 "error, POSIX.1-2008 said:"
526 msgstr ""
527
528 #. type: Plain text
529 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
530 #: opensuse-tumbleweed
531 msgid ""
532 "If B<close>() is interrupted by a signal that is to be caught, it shall "
533 "return -1 with I<errno> set to B<EINTR> and the state of I<fd> is "
534 "unspecified."
535 msgstr ""
536
537 #. type: Plain text
538 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
539 #: opensuse-tumbleweed
540 msgid ""
541 "This permits the behavior that occurs on Linux and many other "
542 "implementations, where, as with other errors that may be reported by "
543 "B<close>(), the file descriptor is guaranteed to be closed. However, it "
544 "also permits another possibility: that the implementation returns an "
545 "B<EINTR> error and keeps the file descriptor open. (According to its "
546 "documentation, HP-UX's B<close>() does this.) The caller must then once "
547 "more use B<close>() to close the file descriptor, to avoid file descriptor "
548 "leaks. This divergence in implementation behaviors provides a difficult "
549 "hurdle for portable applications, since on many implementations, B<close>() "
550 "must not be called again after an B<EINTR> error, and on at least one, "
551 "B<close>() must be called again."
552 msgstr ""
553
554 #. type: Plain text
555 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
556 #: opensuse-tumbleweed
557 msgid ""
558 "POSIX.1-2024 standardized the behavior of HP-UX, making Linux and many other "
559 "implementations non-conforming. There are no plans to change the behavior "
560 "on Linux."
561 msgstr ""
562
563 #. type: SH
564 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
565 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
566 #, no-wrap
567 msgid "SEE ALSO"
568 msgstr "VEJA TAMBÉM"
569
570 #. type: Plain text
571 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
572 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
573 #, fuzzy
574 #| msgid ""
575 #| "B<fcntl>(2), B<fsync>(2), B<open>(2), B<shutdown>(2), B<unlink>(2), "
576 #| "B<fclose>(3)"
577 msgid ""
578 "B<close_range>(2), B<fcntl>(2), B<fsync>(2), B<open>(2), B<shutdown>(2), "
579 "B<unlink>(2), B<fclose>(3)"
580 msgstr ""
581 "B<fcntl>(2), B<fsync>(2), B<open>(2), B<shutdown>(2), B<unlink>(2), "
582 "B<fclose>(3)"
583
584 #. type: TH
585 #: debian-trixie
586 #, no-wrap
587 msgid "2024-05-02"
588 msgstr "2 maio 2024"
589
590 #. type: TH
591 #: debian-trixie
592 #, no-wrap
593 msgid "Linux man-pages 6.9.1"
594 msgstr "Linux man-pages 6.9.1"
595
596 #. type: Plain text
597 #: debian-trixie
598 msgid "Standard C library (I<libc>, I<-lc>)"
599 msgstr "Biblioteca C Padrão (I<libc>, I<-lc>)"
600
601 #. type: Plain text
602 #: debian-trixie fedora-44 fedora-rawhide
603 msgid ""
604 "See NOTES for a discussion of why B<close>() should not be retried after an "
605 "error."
606 msgstr ""
607
608 #. SVr4 documents an additional ENOLINK error condition.
609 #. type: Plain text
610 #: debian-trixie fedora-44 fedora-rawhide
611 msgid "POSIX.1-2001, SVr4, 4.3BSD."
612 msgstr "POSIX.1-2001, SVr4, 4.3BSD."
613
614 #. FreeBSD documents this explicitly. From the look of the source code
615 #. SVR4, ancient SunOS, later Solaris, and AIX all do this.
616 #. Issue 8
617 #. type: Plain text
618 #: debian-trixie fedora-44 fedora-rawhide
619 msgid ""
620 "Many other implementations similarly always close the file descriptor "
621 "(except in the case of B<EBADF>, meaning that the file descriptor was "
622 "invalid) even if they subsequently report an error on return from "
623 "B<close>(). POSIX.1 is currently silent on this point, but there are plans "
624 "to mandate this behavior in the next major release of the standard."
625 msgstr ""
626
627 #. type: Plain text
628 #: debian-trixie fedora-44 fedora-rawhide
629 msgid ""
630 "The B<EINTR> error is a somewhat special case. Regarding the B<EINTR> "
631 "error, POSIX.1-2008 says:"
632 msgstr ""
633
634 #. type: Plain text
635 #: debian-trixie fedora-44 fedora-rawhide
636 msgid ""
637 "If B<close>() is interrupted by a signal that is to be caught, it shall "
638 "return -1 with I<errno> set to B<EINTR> and the state of I<fildes> is "
639 "unspecified."
640 msgstr ""
641
642 #
643 #. FIXME . for later review when Issue 8 is one day released...
644 #. POSIX proposes further changes for EINTR
645 #. http://austingroupbugs.net/tag_view_page.php?tag_id=8
646 #. http://austingroupbugs.net/view.php?id=529
647 #. FIXME .
648 #. Review the following glibc bug later
649 #. https://sourceware.org/bugzilla/show_bug.cgi?id=14627
650 #. type: Plain text
651 #: debian-trixie fedora-44 fedora-rawhide
652 msgid ""
653 "This permits the behavior that occurs on Linux and many other "
654 "implementations, where, as with other errors that may be reported by "
655 "B<close>(), the file descriptor is guaranteed to be closed. However, it "
656 "also permits another possibility: that the implementation returns an "
657 "B<EINTR> error and keeps the file descriptor open. (According to its "
658 "documentation, HP-UX's B<close>() does this.) The caller must then once "
659 "more use B<close>() to close the file descriptor, to avoid file descriptor "
660 "leaks. This divergence in implementation behaviors provides a difficult "
661 "hurdle for portable applications, since on many implementations, B<close>() "
662 "must not be called again after an B<EINTR> error, and on at least one, "
663 "B<close>() must be called again. There are plans to address this conundrum "
664 "for the next major release of the POSIX.1 standard."
665 msgstr ""
666
667 #. type: TH
668 #: fedora-44 fedora-rawhide
669 #, no-wrap
670 msgid "2024-07-23"
671 msgstr "23 julho 2024"
672
673 #. type: TH
674 #: fedora-44 fedora-rawhide
675 #, no-wrap
676 msgid "Linux man-pages 6.13"
677 msgstr "Linux man-pages 6.13"
678
679 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
680 #. From: Fredrik Noring <[email protected]>
681 #. One such race involves signals and ERESTARTSYS. If a file descriptor
682 #. in use by a system call is closed and then reused by e.g. an
683 #. independent open() in some unrelated thread, before the original system
684 #. call has restarted after ERESTARTSYS, the original system call will
685 #. later restart with the reused file descriptor. This is most likely a
686 #. serious programming error.
687 #. type: Plain text
688 #: fedora-44 fedora-rawhide
689 msgid ""
690 "When dealing with sockets, you have to be sure that there is no B<recv>(2) "
691 "still blocking on it on another thread, otherwise it might block forever, "
692 "since no more messages will be send via the socket. Be sure to use "
693 "B<shutdown>(2) to shut down all parts the connection before closing the "
694 "socket."
695 msgstr ""
696
697 #. type: TH
698 #: mageia-cauldron
699 #, no-wrap
700 msgid "Linux man-pages 6.17"
701 msgstr "Linux man-pages 6.17"
702
703 #. type: TH
704 #: opensuse-leap-16-1 opensuse-tumbleweed
705 #, no-wrap
706 msgid "Linux man-pages (unreleased)"
707 msgstr "Linux man-pages (não lançado)"