Debian Codegraph @

po/ar/man2/close.2.po

raw
1 # Arabic translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # زايد السعيدي <[email protected]>, 2026.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.30.2\n"
8 "POT-Creation-Date: 2026-06-05 06:20+0200\n"
9 "PO-Revision-Date: 2026-05-17 19:32+0400\n"
10 "Last-Translator: Zayed Al-Saidi <[email protected]>\n"
11 "Language-Team: Arabic <[email protected]>\n"
12 "Language: ar\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=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
17 "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
18 "X-Generator: Lokalize 23.08.5\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 فبراير 2026"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, no-wrap
37 msgid "Linux man-pages 6.18"
38 msgstr "صفحات دليل لينكس 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 "الاسم"
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 - إغلاق واصف ملف"
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 "المكتبة"
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 "مكتبة سي المعيارية (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 "موجز"
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 "الوصف"
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>() واصف ملف، بحيث لا يعود يشير إلى أي ملف ويمكن إعادة استخدامه. "
108 "تُزال أي أقفال سجلات (انظر B<fcntl>(2)) محتفظ بها على الملف المرتبط به، "
109 "والمملوكة للعملية، بغض النظر عن واصف الملف المستخدم للحصول على القفل. لهذا "
110 "بعض العواقب غير المرغوب فيها ويجب توخي الحذر الشديد عند استخدام أقفال "
111 "السجلات الاستشارية. انظر B<fcntl>(2) لمناقشة المخاطر والعواقب وكذلك لأقفال "
112 "وصف الملف المفتوح (المفضلة على الأرجح)."
113
114 #. type: Plain text
115 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
116 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
117 msgid ""
118 "If I<fd> is the last file descriptor referring to the underlying open file "
119 "description (see B<open>(2)), the resources associated with the open file "
120 "description are freed; if the file descriptor was the last reference to a "
121 "file which has been removed using B<unlink>(2), the file is deleted."
122 msgstr ""
123 "إذا كان I<fd> هو آخر واصف ملف يشير إلى وصف الملف المفتوح الأساسي (انظر "
124 "B<open>(2))، فتُحرر الموارد المرتبطة بوصف الملف المفتوح؛ إذا كان واصف الملف "
125 "هو المرجع الأخير لملف أُزيل باستخدام B<unlink>(2)، فسيُحذف الملف."
126
127 #. type: SH
128 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
129 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
130 #, no-wrap
131 msgid "RETURN VALUE"
132 msgstr "قيمة الإرجاع"
133
134 #. type: Plain text
135 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
136 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
137 msgid ""
138 "B<close>() returns zero on success. On error, -1 is returned, and I<errno> "
139 "is set to indicate the error."
140 msgstr ""
141 "تُرجع B<close>() صفرًا عند النجاح. عند الخطأ، تُرجع -1، ويُضبط I<errno> للإشارة "
142 "إلى الخطأ."
143
144 #. type: SH
145 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
146 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
147 #, no-wrap
148 msgid "ERRORS"
149 msgstr "الأخطاء"
150
151 #. type: TP
152 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
153 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
154 #, no-wrap
155 msgid "B<EBADF>"
156 msgstr "B<EBADF>"
157
158 #. type: Plain text
159 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
160 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
161 msgid "I<fd> isn't a valid open file descriptor."
162 msgstr "I<fd> ليس واصف ملف مفتوحًا صالحًا."
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<EINTR>"
169 msgstr "B<EINTR>"
170
171 #. Though, it's in doubt whether this error can ever occur; see
172 #. https://lwn.net/Articles/576478/ "Returning EINTR from close()"
173 #. type: Plain text
174 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
175 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
176 msgid "The B<close>() call was interrupted by a signal; see B<signal>(7)."
177 msgstr "قوطعت استدعاء B<close>() بإشارة؛ انظر B<signal>(7)."
178
179 #. type: TP
180 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
181 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
182 #, no-wrap
183 msgid "B<EIO>"
184 msgstr "B<EIO>"
185
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 "An I/O error occurred."
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<ENOSPC>"
197 msgstr "B<ENOSPC>"
198
199 #. type: TQ
200 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
201 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
202 #, no-wrap
203 msgid "B<EDQUOT>"
204 msgstr "B<EDQUOT>"
205
206 #. type: Plain text
207 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
208 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
209 msgid ""
210 "On NFS, these errors are not normally reported against the first write which "
211 "exceeds the available storage space, but instead against a subsequent "
212 "B<write>(2), B<fsync>(2), or B<close>()."
213 msgstr ""
214 "في NFS، لا تُبلغ هذه الأخطاء عادةً ضد أول كتابة تتجاوز مساحة التخزين المتاحة، "
215 "بل ضد B<write>(2) أو B<fsync>(2) أو B<close>() لاحقة."
216
217 #. type: Plain text
218 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
219 #: opensuse-tumbleweed
220 msgid ""
221 "See CAVEATS for a discussion of why B<close>() should not be retried after "
222 "an error."
223 msgstr "انظر الملاحظات لمناقشة لماذا لا ينبغي إعادة محاولة B<close>() بعد خطأ."
224
225 #. type: SH
226 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
227 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
228 #, no-wrap
229 msgid "STANDARDS"
230 msgstr "المعايير"
231
232 #. type: Plain text
233 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
234 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
235 msgid "POSIX.1-2008."
236 msgstr "POSIX.1-2008."
237
238 #. type: SH
239 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
240 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
241 #, no-wrap
242 msgid "HISTORY"
243 msgstr "التاريخ"
244
245 #. SVr4 documents an additional ENOLINK error condition.
246 #. type: Plain text
247 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
248 #: opensuse-tumbleweed
249 msgid "4.3BSD, SVr4, POSIX.1-1988."
250 msgstr "4.3BSD، SVr4، POSIX.1-1988."
251
252 #. type: SH
253 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
254 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
255 #, no-wrap
256 msgid "NOTES"
257 msgstr "ملاحظات"
258
259 #. type: Plain text
260 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
261 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
262 msgid ""
263 "The close-on-exec file descriptor flag can be used to ensure that a file "
264 "descriptor is automatically closed upon a successful B<execve>(2); see "
265 "B<fcntl>(2) for details."
266 msgstr ""
267 "يمكن استخدام علم واصف الملف close-on-exec لضمان إغلاق واصف الملف آليًا عند "
268 "نجاح B<execve>(2)؛ انظر B<fcntl>(2) للتفاصيل."
269
270 #. type: SH
271 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
272 #: opensuse-tumbleweed
273 #, no-wrap
274 msgid "CAVEATS"
275 msgstr "ملاحظات"
276
277 #. type: Plain text
278 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
279 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
280 msgid ""
281 "A successful close does not guarantee that the data has been successfully "
282 "saved to disk, as the kernel uses the buffer cache to defer writes. "
283 "Typically, filesystems do not flush buffers when a file is closed. If you "
284 "need to be sure that the data is physically stored on the underlying disk, "
285 "use B<fsync>(2). (It will depend on the disk hardware at this point.)"
286 msgstr ""
287 "لا يضمن الإغلاق الناجح حفظ البيانات بنجاح على القرص، لأن النواة تستخدم خبيئة "
288 "المخزن المؤقت لتأجيل الكتابات. عادةً، لا تمسح أنظمة الملفات المخازن المؤقتة "
289 "عند إغلاق ملف. إذا كنت بحاجة للتأكد من تخزين البيانات فعليًا على القرص "
290 "الأساسي، استخدم B<fsync>(2). (سيعتمد هذا على عتاد القرص في هذه المرحلة.)"
291
292 #. type: SS
293 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
294 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
295 #, no-wrap
296 msgid "Multithreaded processes and close()"
297 msgstr "العمليات متعددة الخيوط و close()"
298
299 #. #-#-#-#-# archlinux: close.2.pot (PACKAGE VERSION) #-#-#-#-#
300 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
301 #. From: Fredrik Noring <[email protected]>
302 #. One such race involves signals and ERESTARTSYS. If a file descriptor
303 #. in use by a system call is closed and then reused by, e.g., an
304 #. independent open() in some unrelated thread, before the original system
305 #. call has restarted after ERESTARTSYS, the original system call will
306 #. later restart with the reused file descriptor. This is most likely a
307 #. serious programming error.
308 #. type: Plain text
309 #. #-#-#-#-# debian-trixie: close.2.pot (PACKAGE VERSION) #-#-#-#-#
310 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
311 #. From: Fredrik Noring <[email protected]>
312 #. One such race involves signals and ERESTARTSYS. If a file descriptor
313 #. in use by a system call is closed and then reused by e.g. an
314 #. independent open() in some unrelated thread, before the original system
315 #. call has restarted after ERESTARTSYS, the original system call will
316 #. later restart with the reused file descriptor. This is most likely a
317 #. serious programming error.
318 #. type: Plain text
319 #. #-#-#-#-# debian-unstable: close.2.pot (PACKAGE VERSION) #-#-#-#-#
320 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
321 #. From: Fredrik Noring <[email protected]>
322 #. One such race involves signals and ERESTARTSYS. If a file descriptor
323 #. in use by a system call is closed and then reused by, e.g., an
324 #. independent open() in some unrelated thread, before the original system
325 #. call has restarted after ERESTARTSYS, the original system call will
326 #. later restart with the reused file descriptor. This is most likely a
327 #. serious programming error.
328 #. type: Plain text
329 #. #-#-#-#-# fedora-44: close.2.pot (PACKAGE VERSION) #-#-#-#-#
330 #. type: Plain text
331 #. #-#-#-#-# fedora-rawhide: close.2.pot (PACKAGE VERSION) #-#-#-#-#
332 #. type: Plain text
333 #. #-#-#-#-# mageia-cauldron: close.2.pot (PACKAGE VERSION) #-#-#-#-#
334 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
335 #. From: Fredrik Noring <[email protected]>
336 #. One such race involves signals and ERESTARTSYS. If a file descriptor
337 #. in use by a system call is closed and then reused by, e.g., an
338 #. independent open() in some unrelated thread, before the original system
339 #. call has restarted after ERESTARTSYS, the original system call will
340 #. later restart with the reused file descriptor. This is most likely a
341 #. serious programming error.
342 #. type: Plain text
343 #. #-#-#-#-# opensuse-leap-16-1: close.2.pot (PACKAGE VERSION) #-#-#-#-#
344 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
345 #. From: Fredrik Noring <[email protected]>
346 #. One such race involves signals and ERESTARTSYS. If a file descriptor
347 #. in use by a system call is closed and then reused by, e.g., an
348 #. independent open() in some unrelated thread, before the original system
349 #. call has restarted after ERESTARTSYS, the original system call will
350 #. later restart with the reused file descriptor. This is most likely a
351 #. serious programming error.
352 #. type: Plain text
353 #. #-#-#-#-# opensuse-tumbleweed: close.2.pot (PACKAGE VERSION) #-#-#-#-#
354 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
355 #. From: Fredrik Noring <[email protected]>
356 #. One such race involves signals and ERESTARTSYS. If a file descriptor
357 #. in use by a system call is closed and then reused by, e.g., an
358 #. independent open() in some unrelated thread, before the original system
359 #. call has restarted after ERESTARTSYS, the original system call will
360 #. later restart with the reused file descriptor. This is most likely a
361 #. serious programming error.
362 #. type: Plain text
363 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
364 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
365 msgid ""
366 "It is probably unwise to close file descriptors while they may be in use by "
367 "system calls in other threads in the same process. Since a file descriptor "
368 "may be reused, there are some obscure race conditions that may cause "
369 "unintended side effects."
370 msgstr ""
371 "من غير الحكيم على الأرجح إغلاق واصفات الملفات بينما قد تكون قيد الاستخدام "
372 "بواسطة استدعاءات نظام في خيوط أخرى في نفس العملية. نظرًا لأن واصف الملف قد "
373 "يُعاد استخدامه، فهناك بعض حالات السباق المبهمة التي قد تسبب آثارًا جانبية غير "
374 "مقصودة."
375
376 #. type: Plain text
377 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
378 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
379 msgid ""
380 "Furthermore, consider the following scenario where two threads are "
381 "performing operations on the same file descriptor:"
382 msgstr ""
383 "علاوة على ذلك، اعتبر السيناريو التالي حيث يؤدي خيطان عمليات على نفس واصف "
384 "الملف:"
385
386 #. type: IP
387 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
388 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
389 #, no-wrap
390 msgid "(1)"
391 msgstr "(1)"
392
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 "One thread is blocked in an I/O system call on the file descriptor. For "
398 "example, it is trying to B<write>(2) to a pipe that is already full, or "
399 "trying to B<read>(2) from a stream socket which currently has no available "
400 "data."
401 msgstr ""
402 "خيط واحد محظور في استدعاء نظام إدخال/إخراج على واصف الملف. على سبيل المثال، "
403 "يحاول B<write>(2) إلى أنبوب ممتلئ بالفعل، أو يحاول B<read>(2) من مقبس دفق لا "
404 "يحتوي حاليًا على بيانات متاحة."
405
406 #. type: IP
407 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
408 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
409 #, no-wrap
410 msgid "(2)"
411 msgstr "(2)"
412
413 #. type: Plain text
414 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
415 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
416 msgid "Another thread closes the file descriptor."
417 msgstr "يغلق خيط آخر واصف الملف."
418
419 #. type: Plain text
420 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
421 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
422 msgid ""
423 "The behavior in this situation varies across systems. On some systems, when "
424 "the file descriptor is closed, the blocking system call returns immediately "
425 "with an error."
426 msgstr ""
427 "يختلف السلوك في هذه الحالة عبر الأنظمة. في بعض الأنظمة، عند إغلاق واصف "
428 "الملف، يعود استدعاء النظام المحظور فورًا بخطأ."
429
430 #. 'struct file' in kernel-speak
431 #. type: Plain text
432 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
433 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
434 msgid ""
435 "On Linux (and possibly some other systems), the behavior is different: the "
436 "blocking I/O system call holds a reference to the underlying open file "
437 "description, and this reference keeps the description open until the I/O "
438 "system call completes. (See B<open>(2) for a discussion of open file "
439 "descriptions.) Thus, the blocking system call in the first thread may "
440 "successfully complete after the B<close>() in the second thread."
441 msgstr ""
442 "في لينكس (وربما بعض الأنظمة الأخرى)، يختلف السلوك: يحتفظ استدعاء نظام "
443 "الإدخال/الإخراج المحظور بمرجع لوصف الملف المفتوح الأساسي، ويبقي هذا المرجع "
444 "الوصف مفتوحًا حتى يكتمل استدعاء نظام الإدخال/الإخراج. (انظر B<open>(2) "
445 "لمناقشة أوصاف الملفات المفتوحة.) وبالتالي، قد يكتمل استدعاء النظام المحظور "
446 "في الخيط الأول بنجاح بعد B<close>() في الخيط الثاني."
447
448 #. type: SS
449 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
450 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
451 #, no-wrap
452 msgid "Dealing with error returns from close()"
453 msgstr "التعامل مع إرجاعات الخطأ من close()"
454
455 #. type: Plain text
456 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
457 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
458 msgid ""
459 "A careful programmer will check the return value of B<close>(), since it is "
460 "quite possible that errors on a previous B<write>(2) operation are reported "
461 "only on the final B<close>() that releases the open file description. "
462 "Failing to check the return value when closing a file may lead to I<silent> "
463 "loss of data. This can especially be observed with NFS and with disk quota."
464 msgstr ""
465 "سيتحقق المبرمج الحذر من القيمة المُرجعة لـ B<close>()، لأنه من المحتمل جدًا أن "
466 "تُبلغ الأخطاء في عملية B<write>(2) سابقة فقط عند B<close>() النهائي الذي يحرر "
467 "وصف الملف المفتوح. قد يؤدي الفشل في التحقق من القيمة المُرجعة عند إغلاق ملف "
468 "إلى فقدان I<صامت> للبيانات. يمكن ملاحظة هذا بشكل خاص مع NFS وحصة القرص."
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 "فاشل) أو أغراض علاجية (مثل كتابة الملف مرة أخرى أو إنشاء نسخة احتياطية)."
482
483 #
484 #. The file descriptor is released early in close();
485 #. close() ==> __close_fd():
486 #. __put_unused_fd() ==> __clear_open_fd()
487 #. return filp_close(file, files);
488 #. The errors are returned by filp_close() after the FD has been
489 #. cleared for re-use.
490 #. filp_close()
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 "Retrying the B<close>() after a failure return is the wrong thing to do, "
496 "since this may cause a reused file descriptor from another thread to be "
497 "closed. This can occur because the Linux kernel I<always> releases the file "
498 "descriptor early in the close operation, freeing it for reuse; the steps "
499 "that may return an error, such as flushing data to the filesystem or device, "
500 "occur only later in the close operation."
501 msgstr ""
502 "إعادة محاولة B<close>() بعد إرجاع فاشل هو الشيء الخطأ فعله، لأن هذا قد يتسبب "
503 "في إغلاق واصف ملف مُعاد استخدامه من خيط آخر. يمكن أن يحدث هذا لأن نواة لينكس "
504 "I<دائمًا> تطلق واصف الملف مبكرًا في عملية الإغلاق، وتحرره لإعادة الاستخدام؛ "
505 "الخطوات التي قد تُرجع خطأ، مثل مسح البيانات إلى نظام الملفات أو الجهاز، تحدث "
506 "فقط لاحقًا في عملية الإغلاق."
507
508 #. FreeBSD documents this explicitly. From the look of the source code
509 #. SVR4, ancient SunOS, later Solaris, and AIX all do this.
510 #. type: Plain text
511 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
512 #: opensuse-tumbleweed
513 msgid ""
514 "Many other implementations similarly always close the file descriptor "
515 "(except in the case of B<EBADF>, meaning that the file descriptor was "
516 "invalid) even if they subsequently report an error on return from "
517 "B<close>(). POSIX.1-2008 was silent on this point."
518 msgstr ""
519 "تغلق العديد من التطبيقات الأخرى بالمثل واصف الملف دائمًا (باستثناء حالة "
520 "B<EBADF>، مما يعني أن واصف الملف كان غير صالح) حتى لو أبلغت لاحقًا عن خطأ عند "
521 "العودة من B<close>(). كان POSIX.1-2008 صامتًا بشأن هذه النقطة."
522
523 #. type: Plain text
524 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
525 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
526 msgid ""
527 "A careful programmer who wants to know about I/O errors may precede "
528 "B<close>() with a call to B<fsync>(2)."
529 msgstr ""
530 "يمكن للمبرمج الحذر الذي يريد معرفة أخطاء الإدخال/الإخراج أن يسبق B<close>() "
531 "باستدعاء B<fsync>(2)."
532
533 #. type: Plain text
534 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
535 #: opensuse-tumbleweed
536 msgid ""
537 "The B<EINTR> error is a somewhat special case. Regarding the B<EINTR> "
538 "error, POSIX.1-2008 said:"
539 msgstr ""
540 "خطأ B<EINTR> هو حالة خاصة إلى حد ما. بخصوص خطأ B<EINTR>، قال POSIX.1-2008:"
541
542 #. type: Plain text
543 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
544 #: opensuse-tumbleweed
545 msgid ""
546 "If B<close>() is interrupted by a signal that is to be caught, it shall "
547 "return -1 with I<errno> set to B<EINTR> and the state of I<fd> is "
548 "unspecified."
549 msgstr ""
550 "إذا قوطعت B<close>() بإشارة سيتم التقاطها، فيجب أن تُرجع -1 مع ضبط I<errno> "
551 "على B<EINTR> وحالة I<fd> غير محددة."
552
553 #. type: Plain text
554 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
555 #: opensuse-tumbleweed
556 msgid ""
557 "This permits the behavior that occurs on Linux and many other "
558 "implementations, where, as with other errors that may be reported by "
559 "B<close>(), the file descriptor is guaranteed to be closed. However, it "
560 "also permits another possibility: that the implementation returns an "
561 "B<EINTR> error and keeps the file descriptor open. (According to its "
562 "documentation, HP-UX's B<close>() does this.) The caller must then once "
563 "more use B<close>() to close the file descriptor, to avoid file descriptor "
564 "leaks. This divergence in implementation behaviors provides a difficult "
565 "hurdle for portable applications, since on many implementations, B<close>() "
566 "must not be called again after an B<EINTR> error, and on at least one, "
567 "B<close>() must be called again."
568 msgstr ""
569 "يسمح هذا بالسلوك الذي يحدث في لينكس والعديد من التطبيقات الأخرى، حيث، كما هو "
570 "الحال مع الأخطاء الأخرى التي قد تُبلغ عنها B<close>()، يُضمن إغلاق واصف الملف. "
571 "ومع ذلك، يسمح أيضًا بإمكانية أخرى: أن يُرجع التطبيق خطأ B<EINTR> ويبقي واصف "
572 "الملف مفتوحًا. (وفقًا لوثائقه، يفعل B<close>() في HP-UX هذا.) يجب على المستدعي "
573 "بعد ذلك استخدام B<close>() مرة أخرى لإغلاق واصف الملف، لتجنب تسرب واصفات "
574 "الملفات. يوفر هذا الاختلاف في سلوكيات التطبيق عقبة صعبة للتطبيقات المحمولة، "
575 "لأنه في العديد من التطبيقات، لا يجب استدعاء B<close>() مرة أخرى بعد خطأ "
576 "B<EINTR>، وفي تطبيق واحد على الأقل، يجب استدعاء B<close>() مرة أخرى."
577
578 #. type: Plain text
579 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
580 #: opensuse-tumbleweed
581 msgid ""
582 "POSIX.1-2024 standardized the behavior of HP-UX, making Linux and many other "
583 "implementations non-conforming. There are no plans to change the behavior "
584 "on Linux."
585 msgstr ""
586 "وحد POSIX.1-2024 سلوك HP-UX، مما جعل لينكس والعديد من التطبيقات الأخرى غير "
587 "متوافقة. لا توجد خطط لتغيير السلوك في لينكس."
588
589 #. type: SH
590 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
591 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
592 #, no-wrap
593 msgid "SEE ALSO"
594 msgstr "انظر أيضًا"
595
596 #. type: Plain text
597 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
598 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
599 msgid ""
600 "B<close_range>(2), B<fcntl>(2), B<fsync>(2), B<open>(2), B<shutdown>(2), "
601 "B<unlink>(2), B<fclose>(3)"
602 msgstr ""
603 "B<close_range>(2), B<fcntl>(2), B<fsync>(2), B<open>(2), B<shutdown>(2), "
604 "B<unlink>(2), B<fclose>(3)"
605
606 #. type: TH
607 #: debian-trixie
608 #, no-wrap
609 msgid "2024-05-02"
610 msgstr "2 مايو 2024"
611
612 #. type: TH
613 #: debian-trixie
614 #, no-wrap
615 msgid "Linux man-pages 6.9.1"
616 msgstr "صفحات دليل لينكس 6.9.1"
617
618 #. type: Plain text
619 #: debian-trixie
620 msgid "Standard C library (I<libc>, I<-lc>)"
621 msgstr "مكتبة سي المعيارية (I<libc>، I<-lc>)"
622
623 #. type: Plain text
624 #: debian-trixie fedora-44 fedora-rawhide
625 msgid ""
626 "See NOTES for a discussion of why B<close>() should not be retried after an "
627 "error."
628 msgstr "انظر الملاحظات لمناقشة لماذا لا ينبغي إعادة محاولة B<close>() بعد خطأ."
629
630 #. SVr4 documents an additional ENOLINK error condition.
631 #. type: Plain text
632 #: debian-trixie fedora-44 fedora-rawhide
633 msgid "POSIX.1-2001, SVr4, 4.3BSD."
634 msgstr "POSIX.1-2001، SVr4، 4.3BSD."
635
636 #. FreeBSD documents this explicitly. From the look of the source code
637 #. SVR4, ancient SunOS, later Solaris, and AIX all do this.
638 #. Issue 8
639 #. type: Plain text
640 #: debian-trixie fedora-44 fedora-rawhide
641 msgid ""
642 "Many other implementations similarly always close the file descriptor "
643 "(except in the case of B<EBADF>, meaning that the file descriptor was "
644 "invalid) even if they subsequently report an error on return from "
645 "B<close>(). POSIX.1 is currently silent on this point, but there are plans "
646 "to mandate this behavior in the next major release of the standard."
647 msgstr ""
648 "تغلق العديد من التطبيقات الأخرى واصف الملف آليًا (باستثناء حالة B<EBADF>، مما "
649 "يعني أن واصف الملف كان غير صالح) حتى لو أبلغت لاحقًا عن خطأ عند العودة من "
650 "B<close>(). لا يتطرق POSIX.1 حاليًا لهذه النقطة، لكن هناك خطط لإلزام هذا "
651 "السلوك في الإصدار الرئيسي التالي من المعيار."
652
653 #. type: Plain text
654 #: debian-trixie fedora-44 fedora-rawhide
655 msgid ""
656 "The B<EINTR> error is a somewhat special case. Regarding the B<EINTR> "
657 "error, POSIX.1-2008 says:"
658 msgstr ""
659 "خطأ B<EINTR> هو حالة خاصة إلى حد ما. بخصوص خطأ B<EINTR>، ينص POSIX.1-2008 "
660 "على:"
661
662 #. type: Plain text
663 #: debian-trixie fedora-44 fedora-rawhide
664 msgid ""
665 "If B<close>() is interrupted by a signal that is to be caught, it shall "
666 "return -1 with I<errno> set to B<EINTR> and the state of I<fildes> is "
667 "unspecified."
668 msgstr ""
669 "إذا تم مقاطعة B<close>() بواسطة إشارة سيتم التقاطها، فإنها سترجع -1 مع تعيين "
670 "I<errno> إلى B<EINTR> وتكون حالة I<fildes> غير محددة."
671
672 #
673 #. FIXME . for later review when Issue 8 is one day released...
674 #. POSIX proposes further changes for EINTR
675 #. http://austingroupbugs.net/tag_view_page.php?tag_id=8
676 #. http://austingroupbugs.net/view.php?id=529
677 #. FIXME .
678 #. Review the following glibc bug later
679 #. https://sourceware.org/bugzilla/show_bug.cgi?id=14627
680 #. type: Plain text
681 #: debian-trixie fedora-44 fedora-rawhide
682 msgid ""
683 "This permits the behavior that occurs on Linux and many other "
684 "implementations, where, as with other errors that may be reported by "
685 "B<close>(), the file descriptor is guaranteed to be closed. However, it "
686 "also permits another possibility: that the implementation returns an "
687 "B<EINTR> error and keeps the file descriptor open. (According to its "
688 "documentation, HP-UX's B<close>() does this.) The caller must then once "
689 "more use B<close>() to close the file descriptor, to avoid file descriptor "
690 "leaks. This divergence in implementation behaviors provides a difficult "
691 "hurdle for portable applications, since on many implementations, B<close>() "
692 "must not be called again after an B<EINTR> error, and on at least one, "
693 "B<close>() must be called again. There are plans to address this conundrum "
694 "for the next major release of the POSIX.1 standard."
695 msgstr ""
696 "يسمح هذا بالسلوك الذي يحدث على لينكس والعديد من التطبيقات الأخرى، حيث، كما "
697 "هو الحال مع الأخطاء الأخرى التي قد يبلغ عنها B<close>()، يكون واصف الملف "
698 "مضمون الإغلاق. ومع ذلك، يسمح أيضًا بإمكانية أخرى: أن يرجع التطبيق خطأ "
699 "B<EINTR> ويبقي واصف الملف مفتوحًا. (وفقًا لوثائقها، يفعل B<close>() من HP-UX "
700 "هذا.) يجب على المستدعي بعد ذلك استخدام B<close>() مرة أخرى لإغلاق واصف "
701 "الملف، لتجنب تسرب واصفات الملف. يشكل هذا الاختلاف في سلوكيات التطبيق عقبة "
702 "صعبة للتطبيقات المحمولة، حيث في العديد من التطبيقات، لا يجب استدعاء "
703 "B<close>() مرة أخرى بعد خطأ B<EINTR>، وفي تطبيق واحد على الأقل، يجب استدعاء "
704 "B<close>() مرة أخرى. هناك خطط لمعالجة هذه المعضلة في الإصدار الرئيسي التالي "
705 "من معيار POSIX.1."
706
707 #. type: TH
708 #: fedora-44 fedora-rawhide
709 #, no-wrap
710 msgid "2024-07-23"
711 msgstr "23 يوليو 2024"
712
713 #. type: TH
714 #: fedora-44 fedora-rawhide
715 #, no-wrap
716 msgid "Linux man-pages 6.13"
717 msgstr "صفحات دليل لينكس 6.13"
718
719 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
720 #. From: Fredrik Noring <[email protected]>
721 #. One such race involves signals and ERESTARTSYS. If a file descriptor
722 #. in use by a system call is closed and then reused by e.g. an
723 #. independent open() in some unrelated thread, before the original system
724 #. call has restarted after ERESTARTSYS, the original system call will
725 #. later restart with the reused file descriptor. This is most likely a
726 #. serious programming error.
727 #. type: Plain text
728 #: fedora-44 fedora-rawhide
729 msgid ""
730 "When dealing with sockets, you have to be sure that there is no B<recv>(2) "
731 "still blocking on it on another thread, otherwise it might block forever, "
732 "since no more messages will be send via the socket. Be sure to use "
733 "B<shutdown>(2) to shut down all parts the connection before closing the "
734 "socket."
735 msgstr ""
736 "عند التعامل مع المقابس، يجب التأكد من عدم وجود B<recv>(2) لا يزال محظورًا "
737 "عليه في خيط آخر، وإلا فقد يحظر إلى الأبد، حيث لن يتم إرسال المزيد من الرسائل "
738 "عبر المقبس. تأكد من استخدام B<shutdown>(2) لإغلاق جميع أجزاء الاتصال قبل "
739 "إغلاق المقبس."
740
741 #. type: TH
742 #: mageia-cauldron
743 #, no-wrap
744 msgid "Linux man-pages 6.17"
745 msgstr "صفحات دليل لينكس 6.17"
746
747 #. type: TH
748 #: opensuse-leap-16-1 opensuse-tumbleweed
749 #, no-wrap
750 msgid "Linux man-pages (unreleased)"
751 msgstr "صفحات دليل لينكس (لم تصدر بعد)"