Debian Codegraph @

po/ro/man2/close.2.po

raw
1 # Romanian translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Remus-Gabriel Chelu <[email protected]>, 2024, 2025.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.23.1\n"
8 "POT-Creation-Date: 2026-06-05 06:20+0200\n"
9 "PO-Revision-Date: 2025-11-04 19:10+0100\n"
10 "Last-Translator: Remus-Gabriel Chelu <[email protected]>\n"
11 "Language-Team: Romanian <[email protected]>\n"
12 "Language: ro\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
17 "20)) ? 1 : 2;\n"
18 "X-Generator: Poedit 3.6\n"
19
20 #. type: TH
21 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
22 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
23 #, no-wrap
24 msgid "close"
25 msgstr "close"
26
27 #. type: TH
28 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
29 #: opensuse-tumbleweed
30 #, no-wrap
31 msgid "2026-02-08"
32 msgstr "8 februarie 2026"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, no-wrap
37 msgid "Linux man-pages 6.18"
38 msgstr "Pagini de manual de Linux 6.18"
39
40 #. type: SH
41 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
42 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
43 #, no-wrap
44 msgid "NAME"
45 msgstr "NUME"
46
47 #. type: Plain text
48 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
49 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
50 msgid "close - close a file descriptor"
51 msgstr "close - închide un descriptor de fișier"
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 "LIBRARY"
58 msgstr "BIBLIOTECA"
59
60 #. type: Plain text
61 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
62 #: opensuse-leap-16-1 opensuse-tumbleweed
63 msgid "Standard C library (I<libc>,\\ I<-lc>)"
64 msgstr "Biblioteca C standard (I<libc>, I<-lc>)"
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 "SYNOPSIS"
71 msgstr "SINOPSIS"
72
73 #. type: Plain text
74 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
75 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
76 #, no-wrap
77 msgid "B<#include E<lt>unistd.hE<gt>>\n"
78 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
79
80 #. type: Plain text
81 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
82 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
83 #, no-wrap
84 msgid "B<int close(int >I<fd>B<);>\n"
85 msgstr "B<int close(int >I<fd>B<);>\n"
86
87 #. type: SH
88 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
89 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
90 #, no-wrap
91 msgid "DESCRIPTION"
92 msgstr "DESCRIERE"
93
94 #. type: Plain text
95 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
96 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
97 msgid ""
98 "B<close>() closes a file descriptor, so that it no longer refers to any "
99 "file and may be reused. Any record locks (see B<fcntl>(2)) held on the "
100 "file it was associated with, and owned by the process, are removed "
101 "regardless of the file descriptor that was used to obtain the lock. This "
102 "has some unfortunate consequences and one should be extra careful when using "
103 "advisory record locking. See B<fcntl>(2) for discussion of the risks and "
104 "consequences as well as for the (probably preferred) open file description "
105 "locks."
106 msgstr ""
107 "B<close>() închide un descriptor de fișier, astfel încât acesta să nu se mai "
108 "refere la niciun fișier și să poată fi reutilizat. Orice blocare de "
109 "înregistrare (a se vedea B<fcntl>(2)) deținută pe fișierul cu care a fost "
110 "asociată și deținută de proces este eliminată, indiferent de descriptorul de "
111 "fișier care a fost utilizat pentru obținerea blocării. Acest lucru are unele "
112 "consecințe nefericite și trebuie să fiți foarte atenți atunci când utilizați "
113 "blocarea înregistrării consultative. A se vedea B<fcntl>(2) pentru "
114 "discutarea riscurilor și consecințelor, precum și pentru blocajele de "
115 "descriere a fișierului deschis (probabil preferate)."
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 msgid ""
121 "If I<fd> is the last file descriptor referring to the underlying open file "
122 "description (see B<open>(2)), the resources associated with the open file "
123 "description are freed; if the file descriptor was the last reference to a "
124 "file which has been removed using B<unlink>(2), the file is deleted."
125 msgstr ""
126 "Dacă I<fd> este ultimul descriptor de fișier care se referă la descrierea "
127 "fișierului deschis subiacent (a se vedea B<open>(2)), resursele asociate "
128 "descrierii fișierului deschis sunt eliberate; dacă descriptorul de fișier a "
129 "fost ultima referință la un fișier care a fost eliminat utilizând "
130 "B<unlink>(2), fișierul este șters."
131
132 #. type: SH
133 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
134 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
135 #, no-wrap
136 msgid "RETURN VALUE"
137 msgstr "VALOAREA RETURNATĂ"
138
139 #. type: Plain text
140 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
141 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
142 msgid ""
143 "B<close>() returns zero on success. On error, -1 is returned, and I<errno> "
144 "is set to indicate the error."
145 msgstr ""
146 "B<close>() returnează zero în caz de succes. În caz de eroare, este returnat "
147 "-1, iar I<errno> este configurată pentru a indica eroarea."
148
149 #. type: SH
150 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
151 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
152 #, no-wrap
153 msgid "ERRORS"
154 msgstr "ERORI-IEȘIRE"
155
156 #. type: TP
157 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
158 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
159 #, no-wrap
160 msgid "B<EBADF>"
161 msgstr "B<EBADF>"
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 "I<fd> isn't a valid open file descriptor."
167 msgstr "I<fd> nu este un descriptor de fișier deschis valid."
168
169 #. type: TP
170 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
171 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
172 #, no-wrap
173 msgid "B<EINTR>"
174 msgstr "B<EINTR>"
175
176 #. Though, it's in doubt whether this error can ever occur; see
177 #. https://lwn.net/Articles/576478/ "Returning EINTR from close()"
178 #. type: Plain text
179 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
180 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
181 msgid "The B<close>() call was interrupted by a signal; see B<signal>(7)."
182 msgstr ""
183 "Apelul B<close>() a fost întrerupt de un semnal; consultați B<signal>(7)."
184
185 #. type: TP
186 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
187 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
188 #, no-wrap
189 msgid "B<EIO>"
190 msgstr "B<EIO>"
191
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 "An I/O error occurred."
196 msgstr "A apărut o eroare de In/Ieș."
197
198 #. type: TP
199 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
200 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
201 #, no-wrap
202 msgid "B<ENOSPC>"
203 msgstr "B<ENOSPC>"
204
205 #. type: TQ
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<EDQUOT>"
210 msgstr "B<EDQUOT>"
211
212 #. type: Plain text
213 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
214 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
215 msgid ""
216 "On NFS, these errors are not normally reported against the first write which "
217 "exceeds the available storage space, but instead against a subsequent "
218 "B<write>(2), B<fsync>(2), or B<close>()."
219 msgstr ""
220 "Pe NFS, aceste erori nu sunt în mod normal raportate la prima scriere care "
221 "depășește spațiul de stocare disponibil, ci la o scriere ulterioară "
222 "B<write>(2), B<fsync>(2) sau B<close>()."
223
224 #. type: Plain text
225 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
226 #: opensuse-tumbleweed
227 msgid ""
228 "See CAVEATS for a discussion of why B<close>() should not be retried after "
229 "an error."
230 msgstr ""
231 "Consultați secțiunea AVERTISMENTE pentru o discuție a motivului pentru care "
232 "B<close>() nu ar trebui să fie reapelat după o eroare."
233
234 #. type: SH
235 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
236 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
237 #, no-wrap
238 msgid "STANDARDS"
239 msgstr "STANDARDE"
240
241 #. type: Plain text
242 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
243 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
244 msgid "POSIX.1-2008."
245 msgstr "POSIX.1-2008."
246
247 #. type: SH
248 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
249 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
250 #, no-wrap
251 msgid "HISTORY"
252 msgstr "ISTORIC"
253
254 #. SVr4 documents an additional ENOLINK error condition.
255 #. type: Plain text
256 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
257 #: opensuse-tumbleweed
258 msgid "4.3BSD, SVr4, POSIX.1-1988."
259 msgstr "4.3BSD, SVr4, POSIX.1-1988."
260
261 #. type: SH
262 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
263 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
264 #, no-wrap
265 msgid "NOTES"
266 msgstr "NOTE"
267
268 #. type: Plain text
269 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
270 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
271 msgid ""
272 "The close-on-exec file descriptor flag can be used to ensure that a file "
273 "descriptor is automatically closed upon a successful B<execve>(2); see "
274 "B<fcntl>(2) for details."
275 msgstr ""
276 "Fanionul de descriptor de fișier close-on-exec poate fi utilizat pentru a se "
277 "asigura că un descriptor de fișier este închis automat în urma unui "
278 "B<execve>(2) reușit; consultați B<fcntl>(2) pentru detalii."
279
280 #. type: SH
281 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
282 #: opensuse-tumbleweed
283 #, no-wrap
284 msgid "CAVEATS"
285 msgstr "AVERTISMENTE"
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 "A successful close does not guarantee that the data has been successfully "
292 "saved to disk, as the kernel uses the buffer cache to defer writes. "
293 "Typically, filesystems do not flush buffers when a file is closed. If you "
294 "need to be sure that the data is physically stored on the underlying disk, "
295 "use B<fsync>(2). (It will depend on the disk hardware at this point.)"
296 msgstr ""
297 "O închidere reușită nu garantează că datele au fost salvate cu succes pe "
298 "disc, deoarece nucleul utilizează memoria cache pentru a amâna scrierile. De "
299 "obicei, sistemele de fișiere nu curăță tampoanele atunci când un fișier este "
300 "închis. Dacă trebuie să fiți siguri că datele sunt stocate fizic pe discul "
301 "de bază, utilizați B<fsync>(2); (aceasta va depinde de hardware-ul discului "
302 "în acest moment)."
303
304 #. type: SS
305 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
306 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
307 #, no-wrap
308 msgid "Multithreaded processes and close()"
309 msgstr "Procesele cu mai multe fire de execuție și close()"
310
311 #. #-#-#-#-# archlinux: close.2.pot (PACKAGE VERSION) #-#-#-#-#
312 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
313 #. From: Fredrik Noring <[email protected]>
314 #. One such race involves signals and ERESTARTSYS. If a file descriptor
315 #. in use by a system call is closed and then reused by, e.g., an
316 #. independent open() in some unrelated thread, before the original system
317 #. call has restarted after ERESTARTSYS, the original system call will
318 #. later restart with the reused file descriptor. This is most likely a
319 #. serious programming error.
320 #. type: Plain text
321 #. #-#-#-#-# debian-trixie: close.2.pot (PACKAGE VERSION) #-#-#-#-#
322 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
323 #. From: Fredrik Noring <[email protected]>
324 #. One such race involves signals and ERESTARTSYS. If a file descriptor
325 #. in use by a system call is closed and then reused by e.g. an
326 #. independent open() in some unrelated thread, before the original system
327 #. call has restarted after ERESTARTSYS, the original system call will
328 #. later restart with the reused file descriptor. This is most likely a
329 #. serious programming error.
330 #. type: Plain text
331 #. #-#-#-#-# debian-unstable: close.2.pot (PACKAGE VERSION) #-#-#-#-#
332 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
333 #. From: Fredrik Noring <[email protected]>
334 #. One such race involves signals and ERESTARTSYS. If a file descriptor
335 #. in use by a system call is closed and then reused by, e.g., an
336 #. independent open() in some unrelated thread, before the original system
337 #. call has restarted after ERESTARTSYS, the original system call will
338 #. later restart with the reused file descriptor. This is most likely a
339 #. serious programming error.
340 #. type: Plain text
341 #. #-#-#-#-# fedora-44: close.2.pot (PACKAGE VERSION) #-#-#-#-#
342 #. type: Plain text
343 #. #-#-#-#-# fedora-rawhide: close.2.pot (PACKAGE VERSION) #-#-#-#-#
344 #. type: Plain text
345 #. #-#-#-#-# mageia-cauldron: close.2.pot (PACKAGE VERSION) #-#-#-#-#
346 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
347 #. From: Fredrik Noring <[email protected]>
348 #. One such race involves signals and ERESTARTSYS. If a file descriptor
349 #. in use by a system call is closed and then reused by, e.g., an
350 #. independent open() in some unrelated thread, before the original system
351 #. call has restarted after ERESTARTSYS, the original system call will
352 #. later restart with the reused file descriptor. This is most likely a
353 #. serious programming error.
354 #. type: Plain text
355 #. #-#-#-#-# opensuse-leap-16-1: close.2.pot (PACKAGE VERSION) #-#-#-#-#
356 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
357 #. From: Fredrik Noring <[email protected]>
358 #. One such race involves signals and ERESTARTSYS. If a file descriptor
359 #. in use by a system call is closed and then reused by, e.g., an
360 #. independent open() in some unrelated thread, before the original system
361 #. call has restarted after ERESTARTSYS, the original system call will
362 #. later restart with the reused file descriptor. This is most likely a
363 #. serious programming error.
364 #. type: Plain text
365 #. #-#-#-#-# opensuse-tumbleweed: close.2.pot (PACKAGE VERSION) #-#-#-#-#
366 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
367 #. From: Fredrik Noring <[email protected]>
368 #. One such race involves signals and ERESTARTSYS. If a file descriptor
369 #. in use by a system call is closed and then reused by, e.g., an
370 #. independent open() in some unrelated thread, before the original system
371 #. call has restarted after ERESTARTSYS, the original system call will
372 #. later restart with the reused file descriptor. This is most likely a
373 #. serious programming error.
374 #. type: Plain text
375 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
376 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
377 msgid ""
378 "It is probably unwise to close file descriptors while they may be in use by "
379 "system calls in other threads in the same process. Since a file descriptor "
380 "may be reused, there are some obscure race conditions that may cause "
381 "unintended side effects."
382 msgstr ""
383 "Probabil că nu este înțelept să închideți descriptorii de fișier în timp ce "
384 "aceștia pot fi utilizați de apeluri de sistem în alte fire de execuție din "
385 "același proces. Deoarece un descriptor de fișier poate fi reutilizat, există "
386 "unele condiții de concurență ascunse care pot provoca efecte secundare "
387 "neintenționate."
388
389 #. type: Plain text
390 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
391 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
392 msgid ""
393 "Furthermore, consider the following scenario where two threads are "
394 "performing operations on the same file descriptor:"
395 msgstr ""
396 "În plus, luați în considerare următorul scenariu în care două fire "
397 "efectuează operații pe același descriptor de fișier:"
398
399 #. type: IP
400 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
401 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
402 #, no-wrap
403 msgid "(1)"
404 msgstr "(1)"
405
406 #. type: Plain text
407 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
408 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
409 msgid ""
410 "One thread is blocked in an I/O system call on the file descriptor. For "
411 "example, it is trying to B<write>(2) to a pipe that is already full, or "
412 "trying to B<read>(2) from a stream socket which currently has no available "
413 "data."
414 msgstr ""
415 "Un fir este blocat într-un apel de sistem I/O pe descriptorul de fișier. De "
416 "exemplu, încearcă să efectueze B<write>(2) pe o conductă care este deja "
417 "plină sau încearcă să efectueze B<read>(2) de la un soclu de flux care nu "
418 "are în prezent date disponibile."
419
420 #. type: IP
421 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
422 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
423 #, no-wrap
424 msgid "(2)"
425 msgstr "(2)"
426
427 #. type: Plain text
428 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
429 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
430 msgid "Another thread closes the file descriptor."
431 msgstr "Un alt fir închide descriptorul de fișier."
432
433 #. type: Plain text
434 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
435 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
436 msgid ""
437 "The behavior in this situation varies across systems. On some systems, when "
438 "the file descriptor is closed, the blocking system call returns immediately "
439 "with an error."
440 msgstr ""
441 "Comportamentul în această situație variază de la un sistem la altul. Pe "
442 "unele sisteme, atunci când descriptorul de fișier este închis, apelul de "
443 "sistem blocant returnează imediat cu o eroare."
444
445 #. 'struct file' in kernel-speak
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 ""
450 "On Linux (and possibly some other systems), the behavior is different: the "
451 "blocking I/O system call holds a reference to the underlying open file "
452 "description, and this reference keeps the description open until the I/O "
453 "system call completes. (See B<open>(2) for a discussion of open file "
454 "descriptions.) Thus, the blocking system call in the first thread may "
455 "successfully complete after the B<close>() in the second thread."
456 msgstr ""
457 "Pe Linux (și posibil pe alte sisteme), comportamentul este diferit: apelul "
458 "de sistem I/O blocant deține o referință la descrierea fișierului deschis, "
459 "iar această referință menține descrierea deschisă până la finalizarea "
460 "apelului de sistem I/O. (Consultați B<open>(2) pentru o discuție despre "
461 "descrierile de fișiere deschise). Astfel, apelul de sistem blocant din "
462 "primul fir poate fi finalizat cu succes după efectuarea B<close>() din al "
463 "doilea fir."
464
465 #. type: SS
466 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
467 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
468 #, no-wrap
469 msgid "Dealing with error returns from close()"
470 msgstr "Gestionarea răspunsurilor eronate de la close()"
471
472 #. type: Plain text
473 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
474 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
475 msgid ""
476 "A careful programmer will check the return value of B<close>(), since it is "
477 "quite possible that errors on a previous B<write>(2) operation are reported "
478 "only on the final B<close>() that releases the open file description. "
479 "Failing to check the return value when closing a file may lead to I<silent> "
480 "loss of data. This can especially be observed with NFS and with disk quota."
481 msgstr ""
482 "Un programator atent va verifica valoarea de returnare a B<close>(), "
483 "deoarece este foarte posibil ca erorile de la o operație anterioară "
484 "B<write>(2) să fie raportate numai la B<close>() final care eliberează "
485 "descrierea fișierului deschis. Ne verificarea valorii de returnare la "
486 "închiderea unui fișier poate duce la pierderea I<silențioasă> de date. Acest "
487 "lucru poate fi observat în special cu NFS și cu cota de disc."
488
489 #. type: Plain text
490 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
491 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
492 msgid ""
493 "Note, however, that a failure return should be used only for diagnostic "
494 "purposes (i.e., a warning to the application that there may still be I/O "
495 "pending or there may have been failed I/O) or remedial purposes (e.g., "
496 "writing the file once more or creating a backup)."
497 msgstr ""
498 "Rețineți, totuși, că o returnare în caz de eșec ar trebui utilizată numai în "
499 "scopuri de diagnosticare (de exemplu, un avertisment adresat aplicației că "
500 "este posibil să mai existe operații I/O în așteptare sau că este posibil să "
501 "fi existat operații I/O eșuate) sau în scopuri de remediere (de exemplu, "
502 "scrierea fișierului încă o dată sau crearea unei copii de rezervă)."
503
504 #
505 #. The file descriptor is released early in close();
506 #. close() ==> __close_fd():
507 #. __put_unused_fd() ==> __clear_open_fd()
508 #. return filp_close(file, files);
509 #. The errors are returned by filp_close() after the FD has been
510 #. cleared for re-use.
511 #. filp_close()
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 "Retrying the B<close>() after a failure return is the wrong thing to do, "
517 "since this may cause a reused file descriptor from another thread to be "
518 "closed. This can occur because the Linux kernel I<always> releases the file "
519 "descriptor early in the close operation, freeing it for reuse; the steps "
520 "that may return an error, such as flushing data to the filesystem or device, "
521 "occur only later in the close operation."
522 msgstr ""
523 "Reîncercarea operației B<close>() după un eșec este un lucru greșit de "
524 "făcut, deoarece acest lucru poate cauza închiderea unui descriptor de fișier "
525 "reutilizat de la un alt fir de execuție. Acest lucru se poate întâmpla "
526 "deoarece nucleul Linux eliberează I<întotdeauna> descriptorul de fișier la "
527 "începutul operației de închidere, eliberându-l pentru reutilizare; pașii "
528 "care pot returna o eroare, cum ar fi trimiterea datelor către sistemul de "
529 "fișiere sau dispozitiv, au loc doar mai târziu în operația de închidere."
530
531 #. FreeBSD documents this explicitly. From the look of the source code
532 #. SVR4, ancient SunOS, later Solaris, and AIX all do this.
533 #. type: Plain text
534 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
535 #: opensuse-tumbleweed
536 msgid ""
537 "Many other implementations similarly always close the file descriptor "
538 "(except in the case of B<EBADF>, meaning that the file descriptor was "
539 "invalid) even if they subsequently report an error on return from "
540 "B<close>(). POSIX.1-2008 was silent on this point."
541 msgstr ""
542 "În mod similar, multe alte implementări închid întotdeauna descriptorul de "
543 "fișier (cu excepția cazului B<EBADF>, ceea ce înseamnă că descriptorul de "
544 "fișier a fost nevalid) chiar dacă ulterior raportează o eroare la returnarea "
545 "de la operația B<close>(). POSIX.1-2008 nu a menționat nimic în legătură cu "
546 "acest aspect."
547
548 #. type: Plain text
549 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
550 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
551 msgid ""
552 "A careful programmer who wants to know about I/O errors may precede "
553 "B<close>() with a call to B<fsync>(2)."
554 msgstr ""
555 "Un programator atent care dorește să știe despre erorile I/O poate precede "
556 "B<close>() cu un apel la B<fsync>(2)."
557
558 #. type: Plain text
559 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
560 #: opensuse-tumbleweed
561 msgid ""
562 "The B<EINTR> error is a somewhat special case. Regarding the B<EINTR> "
563 "error, POSIX.1-2008 said:"
564 msgstr ""
565 "Eroarea B<EINTR> este un caz oarecum special. În ceea ce privește eroarea "
566 "B<EINTR>, POSIX.1-2008 spune:"
567
568 #. type: Plain text
569 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
570 #: opensuse-tumbleweed
571 msgid ""
572 "If B<close>() is interrupted by a signal that is to be caught, it shall "
573 "return -1 with I<errno> set to B<EINTR> and the state of I<fd> is "
574 "unspecified."
575 msgstr ""
576 "Dacă B<close>() este întrerupt de un semnal care trebuie captat, acesta "
577 "returnează -1 cu I<errno> configurată la B<EINTR> și starea lui I<fd> este "
578 "nespecificată."
579
580 #
581 #. type: Plain text
582 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
583 #: opensuse-tumbleweed
584 msgid ""
585 "This permits the behavior that occurs on Linux and many other "
586 "implementations, where, as with other errors that may be reported by "
587 "B<close>(), the file descriptor is guaranteed to be closed. However, it "
588 "also permits another possibility: that the implementation returns an "
589 "B<EINTR> error and keeps the file descriptor open. (According to its "
590 "documentation, HP-UX's B<close>() does this.) The caller must then once "
591 "more use B<close>() to close the file descriptor, to avoid file descriptor "
592 "leaks. This divergence in implementation behaviors provides a difficult "
593 "hurdle for portable applications, since on many implementations, B<close>() "
594 "must not be called again after an B<EINTR> error, and on at least one, "
595 "B<close>() must be called again."
596 msgstr ""
597 "Acest lucru permite comportamentul care apare pe Linux și în multe alte "
598 "implementări, unde, ca și în cazul altor erori care pot fi raportate de "
599 "B<close>(), descriptorul de fișier este garantat a fi închis. Cu toate "
600 "acestea, aceasta permite și o altă posibilitate: ca implementarea să "
601 "returneze o eroare B<EINTR> și să mențină descriptorul de fișier deschis. "
602 "Conform documentației sale, B<close>() de la HP-UX face acest lucru. "
603 "Apelantul trebuie apoi să utilizeze încă o dată B<close>() pentru a închide "
604 "descriptorul de fișier, pentru a evita scurgerile de informații din "
605 "descriptorul de fișier. Această divergență în comportamentele de "
606 "implementare reprezintă un obstacol dificil pentru aplicațiile portabile, "
607 "deoarece în multe implementări, B<close>() nu trebuie să fie apelat din nou "
608 "după o eroare B<EINTR>, iar în cel puțin una, B<close>() trebuie să fie "
609 "apelat din nou."
610
611 #. type: Plain text
612 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
613 #: opensuse-tumbleweed
614 msgid ""
615 "POSIX.1-2024 standardized the behavior of HP-UX, making Linux and many other "
616 "implementations non-conforming. There are no plans to change the behavior "
617 "on Linux."
618 msgstr ""
619 "POSIX.1-2024 a standardizat comportamentul HP-UX, făcând Linux și multe alte "
620 "implementări neconforme. Nu există planuri de modificare a comportamentului "
621 "în Linux."
622
623 #. type: SH
624 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
625 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
626 #, no-wrap
627 msgid "SEE ALSO"
628 msgstr "CONSULTAȚI ȘI"
629
630 #. type: Plain text
631 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
632 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
633 msgid ""
634 "B<close_range>(2), B<fcntl>(2), B<fsync>(2), B<open>(2), B<shutdown>(2), "
635 "B<unlink>(2), B<fclose>(3)"
636 msgstr ""
637 "B<close_range>(2), B<fcntl>(2), B<fsync>(2), B<open>(2), B<shutdown>(2), "
638 "B<unlink>(2), B<fclose>(3)"
639
640 #. type: TH
641 #: debian-trixie
642 #, no-wrap
643 msgid "2024-05-02"
644 msgstr "2 mai 2024"
645
646 #. type: TH
647 #: debian-trixie
648 #, no-wrap
649 msgid "Linux man-pages 6.9.1"
650 msgstr "Pagini de manual de Linux 6.9.1"
651
652 #. type: Plain text
653 #: debian-trixie
654 msgid "Standard C library (I<libc>, I<-lc>)"
655 msgstr "Biblioteca C standard (I<libc>, I<-lc>)"
656
657 #. type: Plain text
658 #: debian-trixie fedora-44 fedora-rawhide
659 msgid ""
660 "See NOTES for a discussion of why B<close>() should not be retried after an "
661 "error."
662 msgstr ""
663 "Consultați secțiunea NOTE pentru o discuție a motivului pentru care "
664 "B<close>() nu ar trebui să fie reapelat după o eroare."
665
666 #. SVr4 documents an additional ENOLINK error condition.
667 #. type: Plain text
668 #: debian-trixie fedora-44 fedora-rawhide
669 msgid "POSIX.1-2001, SVr4, 4.3BSD."
670 msgstr "POSIX.1-2001, SVr4, 4.3BSD."
671
672 #. FreeBSD documents this explicitly. From the look of the source code
673 #. SVR4, ancient SunOS, later Solaris, and AIX all do this.
674 #. Issue 8
675 #. type: Plain text
676 #: debian-trixie fedora-44 fedora-rawhide
677 msgid ""
678 "Many other implementations similarly always close the file descriptor "
679 "(except in the case of B<EBADF>, meaning that the file descriptor was "
680 "invalid) even if they subsequently report an error on return from "
681 "B<close>(). POSIX.1 is currently silent on this point, but there are plans "
682 "to mandate this behavior in the next major release of the standard."
683 msgstr ""
684 "În mod similar, multe alte implementări închid întotdeauna descriptorul de "
685 "fișier (cu excepția cazului B<EBADF>, ceea ce înseamnă că descriptorul de "
686 "fișier a fost nevalid) chiar dacă ulterior raportează o eroare la returnarea "
687 "de la operația B<close>(). În prezent, POSIX.1 nu se referă la acest aspect, "
688 "dar există planuri de a impune acest comportament în următoarea versiune "
689 "majoră a standardului."
690
691 #. type: Plain text
692 #: debian-trixie fedora-44 fedora-rawhide
693 msgid ""
694 "The B<EINTR> error is a somewhat special case. Regarding the B<EINTR> "
695 "error, POSIX.1-2008 says:"
696 msgstr ""
697 "Eroarea B<EINTR> este un caz oarecum special. În ceea ce privește eroarea "
698 "B<EINTR>, POSIX.1-2008 spune:"
699
700 #. type: Plain text
701 #: debian-trixie fedora-44 fedora-rawhide
702 msgid ""
703 "If B<close>() is interrupted by a signal that is to be caught, it shall "
704 "return -1 with I<errno> set to B<EINTR> and the state of I<fildes> is "
705 "unspecified."
706 msgstr ""
707 "Dacă B<close>() este întrerupt de un semnal care trebuie captat, acesta "
708 "returnează -1 cu I<errno> configurată la B<EINTR> și starea lui I<fildes> "
709 "este nespecificată."
710
711 #
712 #. FIXME . for later review when Issue 8 is one day released...
713 #. POSIX proposes further changes for EINTR
714 #. http://austingroupbugs.net/tag_view_page.php?tag_id=8
715 #. http://austingroupbugs.net/view.php?id=529
716 #. FIXME .
717 #. Review the following glibc bug later
718 #. https://sourceware.org/bugzilla/show_bug.cgi?id=14627
719 #. type: Plain text
720 #: debian-trixie fedora-44 fedora-rawhide
721 msgid ""
722 "This permits the behavior that occurs on Linux and many other "
723 "implementations, where, as with other errors that may be reported by "
724 "B<close>(), the file descriptor is guaranteed to be closed. However, it "
725 "also permits another possibility: that the implementation returns an "
726 "B<EINTR> error and keeps the file descriptor open. (According to its "
727 "documentation, HP-UX's B<close>() does this.) The caller must then once "
728 "more use B<close>() to close the file descriptor, to avoid file descriptor "
729 "leaks. This divergence in implementation behaviors provides a difficult "
730 "hurdle for portable applications, since on many implementations, B<close>() "
731 "must not be called again after an B<EINTR> error, and on at least one, "
732 "B<close>() must be called again. There are plans to address this conundrum "
733 "for the next major release of the POSIX.1 standard."
734 msgstr ""
735 "Acest lucru permite comportamentul care apare pe Linux și în multe alte "
736 "implementări, unde, ca și în cazul altor erori care pot fi raportate de "
737 "B<close>(), descriptorul de fișier este garantat a fi închis. Cu toate "
738 "acestea, aceasta permite și o altă posibilitate: ca implementarea să "
739 "returneze o eroare B<EINTR> și să mențină descriptorul de fișier deschis. "
740 "Conform documentației sale, B<close>() de la HP-UX face acest lucru. "
741 "Apelantul trebuie apoi să utilizeze încă o dată B<close>() pentru a închide "
742 "descriptorul de fișier, pentru a evita scurgerile de informații din "
743 "descriptorul de fișier. Această divergență în comportamentele de "
744 "implementare reprezintă un obstacol dificil pentru aplicațiile portabile, "
745 "deoarece în multe implementări, B<close>() nu trebuie să fie apelat din nou "
746 "după o eroare B<EINTR>, iar în cel puțin una, B<close>() trebuie să fie "
747 "apelat din nou. Există planuri de rezolvare a acestei enigme pentru "
748 "următoarea versiune majoră a standardului POSIX.1."
749
750 #. type: TH
751 #: fedora-44 fedora-rawhide
752 #, no-wrap
753 msgid "2024-07-23"
754 msgstr "23 iulie 2024"
755
756 #. type: TH
757 #: fedora-44 fedora-rawhide
758 #, no-wrap
759 msgid "Linux man-pages 6.13"
760 msgstr "Pagini de manual de Linux 6.13"
761
762 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
763 #. From: Fredrik Noring <[email protected]>
764 #. One such race involves signals and ERESTARTSYS. If a file descriptor
765 #. in use by a system call is closed and then reused by e.g. an
766 #. independent open() in some unrelated thread, before the original system
767 #. call has restarted after ERESTARTSYS, the original system call will
768 #. later restart with the reused file descriptor. This is most likely a
769 #. serious programming error.
770 #. type: Plain text
771 #: fedora-44 fedora-rawhide
772 msgid ""
773 "When dealing with sockets, you have to be sure that there is no B<recv>(2) "
774 "still blocking on it on another thread, otherwise it might block forever, "
775 "since no more messages will be send via the socket. Be sure to use "
776 "B<shutdown>(2) to shut down all parts the connection before closing the "
777 "socket."
778 msgstr ""
779 "Atunci când aveți de-a face cu socluri, trebuie să vă asigurați că nu există "
780 "niciun B<recv>(2) care să blocheze încă pe acesta pe un alt fir de execuție, "
781 "altfel s-ar putea bloca la nesfârșit, deoarece nu vor mai fi trimise mesaje "
782 "prin intermediul soclului. Asigurați-vă că utilizați B<shutdown>(2) pentru a "
783 "închide toate părțile conexiunii înainte de a închide soclul."
784
785 #. type: TH
786 #: mageia-cauldron
787 #, no-wrap
788 msgid "Linux man-pages 6.17"
789 msgstr "Pagini de manual de Linux 6.17"
790
791 #. type: TH
792 #: opensuse-leap-16-1 opensuse-tumbleweed
793 #, no-wrap
794 msgid "Linux man-pages (unreleased)"
795 msgstr "Pagini de manual Linux (nepublicate)"