Debian Codegraph @

po/ar/man2/dup.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\n"
8 "POT-Creation-Date: 2026-06-05 06:23+0200\n"
9 "PO-Revision-Date: 2026-06-03 04:49+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 ".MIME-Version: 1.0\n"
17 "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
18 "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
19 "X-Generator: Lokalize 23.08.5\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 "dup"
26 msgstr "dup"
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 فبراير 2026"
34
35 #. type: TH
36 #: archlinux debian-unstable
37 #, no-wrap
38 msgid "Linux man-pages 6.18"
39 msgstr "صفحات دليل لينكس 6.18"
40
41 #. type: SH
42 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
43 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
44 #, no-wrap
45 msgid "NAME"
46 msgstr "الاسم"
47
48 #. type: Plain text
49 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
50 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
51 msgid "dup, dup2, dup3 - duplicate a file descriptor"
52 msgstr "dup, dup2, dup3 - نسخ واصف ملف"
53
54 #. type: SH
55 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
56 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
57 #, no-wrap
58 msgid "LIBRARY"
59 msgstr "المكتبة"
60
61 #. type: Plain text
62 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
63 #: opensuse-leap-16-1 opensuse-tumbleweed
64 msgid "Standard C library (I<libc>,\\ I<-lc>)"
65 msgstr "مكتبة سي المعيارية (I<libc>،\\ I<-lc>)"
66
67 #. type: SH
68 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
69 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
70 #, no-wrap
71 msgid "SYNOPSIS"
72 msgstr "موجز"
73
74 #. type: Plain text
75 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
76 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
77 #, no-wrap
78 msgid "B<#include E<lt>unistd.hE<gt>>\n"
79 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
80
81 #. type: Plain text
82 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
83 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
84 #, no-wrap
85 msgid ""
86 "B<int dup(int >I<oldfd>B<);>\n"
87 "B<int dup2(int >I<oldfd>B<, int >I<newfd>B<);>\n"
88 msgstr ""
89 "B<int dup(int >I<oldfd>B<);>\n"
90 "B<int dup2(int >I<oldfd>B<, int >I<newfd>B<);>\n"
91
92 #. type: Plain text
93 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
94 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
95 #, no-wrap
96 msgid ""
97 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
98 "B<#include E<lt>fcntl.hE<gt>> /* Definition of B<O_*> constants */\n"
99 "B<#include E<lt>unistd.hE<gt>>\n"
100 msgstr ""
101 "B<#define _GNU_SOURCE> /* انظر feature_test_macros(7) */\n"
102 "B<#include E<lt>fcntl.hE<gt>> /* تعريف ثوابت B<O_*> */\n"
103 "B<#include E<lt>unistd.hE<gt>>\n"
104
105 #. type: Plain text
106 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
107 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
108 #, no-wrap
109 msgid "B<int dup3(int >I<oldfd>B<, int >I<newfd>B<, int >I<flags>B<);>\n"
110 msgstr "B<int dup3(int >I<oldfd>B<, int >I<newfd>B<, int >I<flags>B<);>\n"
111
112 #. type: SH
113 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
114 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
115 #, no-wrap
116 msgid "DESCRIPTION"
117 msgstr "الوصف"
118
119 #. type: Plain text
120 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
121 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
122 msgid ""
123 "The B<dup>() system call allocates a new file descriptor that refers to the "
124 "same open file description as the descriptor I<oldfd>. (For an explanation "
125 "of open file descriptions, see B<open>(2).) The new file descriptor number "
126 "is guaranteed to be the lowest-numbered file descriptor that was unused in "
127 "the calling process."
128 msgstr ""
129 "نداء النظام B<dup>() يخصص واصف ملف جديد يشير إلى نفس وصف الملف المفتوح مثل "
130 "الواصف I<oldfd>. (لشرح وصف الملف المفتوح، انظر B<open>(2).) رقم واصف الملف "
131 "الجديد مضمون ليكون أقل واصف ملف مرقم غير مستخدم في العملية المستدعية."
132
133 #. type: Plain text
134 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
135 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
136 msgid ""
137 "After a successful return, the old and new file descriptors may be used "
138 "interchangeably. Since the two file descriptors refer to the same open file "
139 "description, they share file offset and file status flags; for example, if "
140 "the file offset is modified by using B<lseek>(2) on one of the file "
141 "descriptors, the offset is also changed for the other file descriptor."
142 msgstr ""
143 "بعد العودة الناجحة، يمكن استخدام واصفات الملف القديمة والجديدة بالتبادل. "
144 "نظرًا لأن واصفي الملف يشيران إلى نفس وصف الملف المفتوح، فإنهما يشاركان إزاحة "
145 "الملف وأعلام حالة الملف؛ على سبيل المثال، إذا تم تعديل إزاحة الملف باستخدام "
146 "B<lseek>(2) على أحد واصفي الملف، فإن الإزاحة تتغير أيضًا لواصف الملف الآخر."
147
148 #. type: Plain text
149 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
150 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
151 msgid ""
152 "The two file descriptors do not share file descriptor flags (the close-on-"
153 "exec flag). The close-on-exec flag (B<FD_CLOEXEC>; see B<fcntl>(2)) for "
154 "the duplicate descriptor is off."
155 msgstr ""
156 "واصفا الملف لا يشاركان أعلام واصف الملف (علم الإغلاق عند التنفيذ). علم "
157 "الإغلاق عند التنفيذ (B<FD_CLOEXEC>؛ انظر B<fcntl>(2)) للواصف المكرر يكون "
158 "مغلقًا."
159
160 #. type: SS
161 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
162 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
163 #, no-wrap
164 msgid "dup2()"
165 msgstr "dup2()"
166
167 #. type: Plain text
168 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
169 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
170 msgid ""
171 "The B<dup2>() system call performs the same task as B<dup>(), but instead "
172 "of using the lowest-numbered unused file descriptor, it uses the file "
173 "descriptor number specified in I<newfd>. In other words, the file "
174 "descriptor I<newfd> is adjusted so that it now refers to the same open file "
175 "description as I<oldfd>."
176 msgstr ""
177 "نداء النظام B<dup2>() يؤدي نفس مهمة B<dup>()، ولكن بدلاً من استخدام أقل واصف "
178 "ملف غير مستخدم مرقم، فإنه يستخدم رقم واصف الملف المحدد في I<newfd>. بمعنى "
179 "آخر، يتم ضبط واصف الملف I<newfd> بحيث يشير الآن إلى نفس وصف الملف المفتوح "
180 "مثل I<oldfd>."
181
182 #. type: Plain text
183 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
184 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
185 msgid ""
186 "If the file descriptor I<newfd> was previously open, it is closed before "
187 "being reused; the close is performed silently (i.e., any errors during the "
188 "close are not reported by B<dup2>())."
189 msgstr ""
190 "إذا كان واصف الملف I<newfd> مفتوحًا سابقًا، فإنه يُغلق قبل إعادة استخدامه؛ يتم "
191 "الإغلاق بصمت (أي، أي أخطاء أثناء الإغلاق لا تُبلغ عنها B<dup2>())."
192
193 #. type: Plain text
194 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
195 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
196 msgid ""
197 "The steps of closing and reusing the file descriptor I<newfd> are performed "
198 "I<atomically>. This is important, because trying to implement equivalent "
199 "functionality using B<close>(2) and B<dup>() would be subject to race "
200 "conditions, whereby I<newfd> might be reused between the two steps. Such "
201 "reuse could happen because the main program is interrupted by a signal "
202 "handler that allocates a file descriptor, or because a parallel thread "
203 "allocates a file descriptor."
204 msgstr ""
205 "خطوات إغلاق وإعادة استخدام واصف الملف I<newfd> تُنفذ I<ذريًا>. هذا مهم، لأن "
206 "محاولة تنفيذ وظيفة مكافئة باستخدام B<close>(2) و B<dup>() ستكون عرضة "
207 "لحالات سباق، حيث قد يُعاد استخدام I<newfd> بين الخطوتين. يمكن أن يحدث هذا "
208 "إعادة الاستخدام لأن البرنامج الرئيسي يُقاطع بواسطة معالج إشارة يخصص واصف ملف، "
209 "أو لأن خيطًا متوازيًا يخصص واصف ملف."
210
211 #. type: Plain text
212 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
213 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
214 msgid "Note the following points:"
215 msgstr "لاحظ النقاط التالية:"
216
217 #. type: IP
218 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
219 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
220 #, no-wrap
221 msgid "\\[bu]"
222 msgstr "\\[bu]"
223
224 #. type: Plain text
225 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
226 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
227 msgid ""
228 "If I<oldfd> is not a valid file descriptor, then the call fails, and "
229 "I<newfd> is not closed."
230 msgstr ""
231 "إذا كان I<oldfd> ليس واصف ملف صالحًا، فإن النداء يفشل، ولا يُغلق I<newfd>."
232
233 #. type: Plain text
234 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
235 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
236 msgid ""
237 "If I<oldfd> is a valid file descriptor, and I<newfd> has the same value as "
238 "I<oldfd>, then B<dup2>() does nothing, and returns I<newfd>."
239 msgstr ""
240 "إذا كان I<oldfd> واصف ملف صالحًا، وكان I<newfd> له نفس قيمة I<oldfd>، فإن "
241 "B<dup2>() لا يفعل شيئًا، ويعيد I<newfd>."
242
243 #. type: SS
244 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
245 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
246 #, no-wrap
247 msgid "dup3()"
248 msgstr "dup3()"
249
250 #. type: Plain text
251 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
252 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
253 msgid "B<dup3>() is the same as B<dup2>(), except that:"
254 msgstr "B<dup3>() هو نفسه B<dup2>()، باستثناء أن:"
255
256 #. type: Plain text
257 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
258 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
259 msgid ""
260 "The caller can force the close-on-exec flag to be set for the new file "
261 "descriptor by specifying B<O_CLOEXEC> in I<flags>. See the description of "
262 "the same flag in B<open>(2) for reasons why this may be useful."
263 msgstr ""
264 "يمكن للمستدعي فرض تعيين علم الإغلاق عند التنفيذ لواصف الملف الجديد بتحديد "
265 "B<O_CLOEXEC> في I<flags>. انظر وصف نفس العلم في B<open>(2) لأسباب قد تكون "
266 "مفيدة."
267
268 #. Ulrich Drepper, LKML, 2008-10-09:
269 #. We deliberately decided on this change. Otherwise, what is the
270 #. result of dup3(fd, fd, O_CLOEXEC)?
271 #. type: Plain text
272 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
273 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
274 msgid ""
275 "If I<oldfd> equals I<newfd>, then B<dup3>() fails with the error B<EINVAL>."
276 msgstr ""
277 "إذا كان I<oldfd> يساوي I<newfd>، فإن B<dup3>() يفشل مع الخطأ B<EINVAL>."
278
279 #. type: SH
280 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
281 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
282 #, no-wrap
283 msgid "RETURN VALUE"
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 msgid ""
290 "On success, these system calls return the new file descriptor. On error, -1 "
291 "is returned, and I<errno> is set to indicate the error."
292 msgstr ""
293 "عند النجاح، تعيد نداءات النظام هذه واصف الملف الجديد. عند الخطأ، يُعاد -1، "
294 "ويُضبط I<errno> للإشارة إلى الخطأ."
295
296 #. type: SH
297 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
298 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
299 #, no-wrap
300 msgid "ERRORS"
301 msgstr "الأخطاء"
302
303 #. type: TP
304 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
305 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
306 #, no-wrap
307 msgid "B<EBADF>"
308 msgstr "B<EBADF>"
309
310 #. type: Plain text
311 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
312 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
313 msgid "I<oldfd> isn't an open file descriptor."
314 msgstr "I<oldfd> ليس واصف ملف مفتوح."
315
316 #. type: Plain text
317 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
318 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
319 msgid ""
320 "I<newfd> is out of the allowed range for file descriptors (see the "
321 "discussion of B<RLIMIT_NOFILE> in B<getrlimit>(2))."
322 msgstr ""
323 "I<newfd> خارج النطاق المسموح لواصفات الملف (انظر مناقشة B<RLIMIT_NOFILE> في "
324 "B<getrlimit>(2))."
325
326 #. type: TP
327 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
328 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
329 #, no-wrap
330 msgid "B<EBUSY>"
331 msgstr "B<EBUSY>"
332
333 #. type: Plain text
334 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
335 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
336 msgid ""
337 "(Linux only) This may be returned by B<dup2>() or B<dup3>() during a race "
338 "condition with B<open>(2) and B<dup>()."
339 msgstr ""
340 "(لينكس فقط) قد يُعاد هذا بواسطة B<dup2>() أو B<dup3>() أثناء حالة سباق مع "
341 "B<open>(2) و B<dup>()."
342
343 #. type: TP
344 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
345 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
346 #, no-wrap
347 msgid "B<EINTR>"
348 msgstr "B<EINTR>"
349
350 #. type: Plain text
351 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
352 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
353 msgid ""
354 "The B<dup2>() or B<dup3>() call was interrupted by a signal; see "
355 "B<signal>(7)."
356 msgstr "نداء B<dup2>() أو B<dup3>() قُطع بواسطة إشارة؛ انظر B<signal>(7)."
357
358 #. type: TP
359 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
360 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
361 #, no-wrap
362 msgid "B<EINVAL>"
363 msgstr "B<EINVAL>"
364
365 #. type: Plain text
366 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
367 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
368 msgid "(B<dup3>()) I<flags> contain an invalid value."
369 msgstr "(B<dup3>()) I<flags> يحتوي على قيمة غير صالحة."
370
371 #. type: Plain text
372 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
373 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
374 msgid "(B<dup3>()) I<oldfd> was equal to I<newfd>."
375 msgstr "(B<dup3>()) I<oldfd> كان مساويًا لـ I<newfd>."
376
377 #. type: TP
378 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
379 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
380 #, no-wrap
381 msgid "B<EMFILE>"
382 msgstr "B<EMFILE>"
383
384 #. type: Plain text
385 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
386 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
387 msgid ""
388 "The per-process limit on the number of open file descriptors has been "
389 "reached (see the discussion of B<RLIMIT_NOFILE> in B<getrlimit>(2))."
390 msgstr ""
391 "تم الوصول إلى الحد لكل عملية لعدد واصفات الملف المفتوحة (انظر مناقشة "
392 "B<RLIMIT_NOFILE> في B<getrlimit>(2))."
393
394 #. type: TP
395 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
396 #: opensuse-leap-16-1 opensuse-tumbleweed
397 #, no-wrap
398 msgid "B<ENOMEM>"
399 msgstr "B<ENOMEM>"
400
401 #. type: Plain text
402 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
403 #: opensuse-leap-16-1 opensuse-tumbleweed
404 msgid "Insufficient kernel memory was available."
405 msgstr "ذاكرة النواة المتوفرة غير كافية."
406
407 #. type: SH
408 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
409 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
410 #, no-wrap
411 msgid "STANDARDS"
412 msgstr "المعايير"
413
414 #. type: Plain text
415 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
416 #: opensuse-tumbleweed
417 msgid "POSIX.1-2024."
418 msgstr "POSIX.1-2024."
419
420 #. type: SH
421 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
422 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
423 #, no-wrap
424 msgid "HISTORY"
425 msgstr "التاريخ"
426
427 #. type: TP
428 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
429 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
430 #, no-wrap
431 msgid "B<dup>()"
432 msgstr "B<dup>()"
433
434 #. type: TQ
435 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
436 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
437 #, no-wrap
438 msgid "B<dup2>()"
439 msgstr "B<dup2>()"
440
441 #. SVr4 documents additional
442 #. EINTR and ENOLINK error conditions. POSIX.1 adds EINTR.
443 #. The EBUSY return is Linux-specific.
444 #. type: Plain text
445 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
446 #: opensuse-tumbleweed
447 msgid "4.3BSD, SVr4, POSIX.1-1988."
448 msgstr "4.3BSD، SVr4، POSIX.1-1988."
449
450 #. type: TP
451 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
452 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
453 #, no-wrap
454 msgid "B<dup3>()"
455 msgstr "B<dup3>()"
456
457 #. type: Plain text
458 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
459 #: opensuse-tumbleweed
460 msgid "POSIX.1-2024. Linux 2.6.27, glibc 2.9."
461 msgstr "POSIX.1-2024. Linux 2.6.27, glibc 2.9."
462
463 #. type: SH
464 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
465 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
466 #, no-wrap
467 msgid "NOTES"
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 "The error returned by B<dup2>() is different from that returned by "
475 "B<fcntl(>..., B<F_DUPFD>, ...B<)> when I<newfd> is out of range. On some "
476 "systems, B<dup2>() also sometimes returns B<EINVAL> like B<F_DUPFD>."
477 msgstr ""
478 "الخطأ الذي تعيده B<dup2>() يختلف عن ذلك الذي تعيده B<fcntl(>..., "
479 "B<F_DUPFD>, ...B<)> عندما يكون I<newfd> خارج النطاق. على بعض الأنظمة، "
480 "B<dup2>() أيضًا يعيد أحيانًا B<EINVAL> مثل B<F_DUPFD>."
481
482 #. type: Plain text
483 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
484 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
485 msgid ""
486 "If I<newfd> was open, any errors that would have been reported at "
487 "B<close>(2) time are lost. If this is of concern, then\\[em]unless the "
488 "program is single-threaded and does not allocate file descriptors in signal "
489 "handlers\\[em]the correct approach is I<not> to close I<newfd> before "
490 "calling B<dup2>(), because of the race condition described above. Instead, "
491 "code something like the following could be used:"
492 msgstr ""
493 "إذا كان I<newfd> مفتوحًا، فإن أي أخطاء كان سيُبلغ عنها في وقت B<close>(2) "
494 "تُفقد. إذا كان هذا مقلقًا، فإن\\[em]ما لم يكن البرنامج أحادي الخيط ولا يخصص "
495 "واصفات ملف في معالجات الإشارات\\[em]النهج الصحيح هو I<عدم> إغلاق I<newfd> "
496 "قبل استدعاء B<dup2>()، بسبب حالة السباق الموصوفة أعلاه. بدلاً من ذلك، يمكن "
497 "استخدام كود مثل التالي:"
498
499 #. type: Plain text
500 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
501 #: opensuse-tumbleweed
502 #, no-wrap
503 msgid ""
504 "/* Obtain a duplicate of \\[aq]newfd\\[aq] that can subsequently\n"
505 " be used to check for close() errors; an EBADF error\n"
506 " means that \\[aq]newfd\\[aq] was not open. */\n"
507 "\\&\n"
508 "tmpfd = dup(newfd);\n"
509 "if (tmpfd == -1 && errno != EBADF) {\n"
510 " /* Handle unexpected dup() error. */\n"
511 "}\n"
512 "\\&\n"
513 "/* Atomically duplicate \\[aq]oldfd\\[aq] on \\[aq]newfd\\[aq]. */\n"
514 "\\&\n"
515 "if (dup2(oldfd, newfd) == -1) {\n"
516 " /* Handle dup2() error. */\n"
517 "}\n"
518 "\\&\n"
519 "/* Now check for close() errors on the file originally\n"
520 " referred to by \\[aq]newfd\\[aq]. */\n"
521 "\\&\n"
522 "if (tmpfd != -1) {\n"
523 " if (close(tmpfd) == -1) {\n"
524 " /* Handle errors from close. */\n"
525 " }\n"
526 "}\n"
527 msgstr ""
528 "/* Obtain a duplicate of \\[aq]newfd\\[aq] that can subsequently\n"
529 " be used to check for close() errors; an EBADF error\n"
530 " means that \\[aq]newfd\\[aq] was not open. */\n"
531 "\\&\n"
532 "tmpfd = dup(newfd);\n"
533 "if (tmpfd == -1 && errno != EBADF) {\n"
534 " /* Handle unexpected dup() error. */\n"
535 "}\n"
536 "\\&\n"
537 "/* Atomically duplicate \\[aq]oldfd\\[aq] on \\[aq]newfd\\[aq]. */\n"
538 "\\&\n"
539 "if (dup2(oldfd, newfd) == -1) {\n"
540 " /* Handle dup2() error. */\n"
541 "}\n"
542 "\\&\n"
543 "/* Now check for close() errors on the file originally\n"
544 " referred to by \\[aq]newfd\\[aq]. */\n"
545 "\\&\n"
546 "if (tmpfd != -1) {\n"
547 " if (close(tmpfd) == -1) {\n"
548 " /* Handle errors from close. */\n"
549 " }\n"
550 "}\n"
551
552 #. type: SH
553 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
554 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
555 #, no-wrap
556 msgid "SEE ALSO"
557 msgstr "انظر أيضًا"
558
559 #. type: Plain text
560 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
561 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
562 msgid "B<close>(2), B<fcntl>(2), B<open>(2), B<pidfd_getfd>(2)"
563 msgstr "B<close>(2), B<fcntl>(2), B<open>(2), B<pidfd_getfd>(2)"
564
565 #. type: TH
566 #: debian-trixie
567 #, no-wrap
568 msgid "2024-05-02"
569 msgstr "2 مايو 2024"
570
571 #. type: TH
572 #: debian-trixie
573 #, no-wrap
574 msgid "Linux man-pages 6.9.1"
575 msgstr "صفحات دليل لينكس 6.9.1"
576
577 #. type: Plain text
578 #: debian-trixie
579 msgid "Standard C library (I<libc>, I<-lc>)"
580 msgstr "مكتبة سي المعيارية (I<libc>، I<-lc>)"
581
582 #. type: Plain text
583 #: debian-trixie fedora-44 fedora-rawhide
584 msgid "POSIX.1-2008."
585 msgstr "POSIX.1-2008."
586
587 #. type: Plain text
588 #: debian-trixie fedora-44 fedora-rawhide
589 msgid "Linux."
590 msgstr "لينكس."
591
592 #. SVr4 documents additional
593 #. EINTR and ENOLINK error conditions. POSIX.1 adds EINTR.
594 #. The EBUSY return is Linux-specific.
595 #. type: Plain text
596 #: debian-trixie fedora-44 fedora-rawhide
597 msgid "POSIX.1-2001, SVr4, 4.3BSD."
598 msgstr "POSIX.1-2001، SVr4، 4.3BSD."
599
600 #. type: Plain text
601 #: debian-trixie fedora-44 fedora-rawhide
602 msgid "Linux 2.6.27, glibc 2.9."
603 msgstr "لينكس 2.6.27، glibc 2.9."
604
605 #. type: Plain text
606 #: debian-trixie fedora-44 fedora-rawhide
607 #, no-wrap
608 msgid ""
609 "/* Obtain a duplicate of \\[aq]newfd\\[aq] that can subsequently\n"
610 " be used to check for close() errors; an EBADF error\n"
611 " means that \\[aq]newfd\\[aq] was not open. */\n"
612 "\\&\n"
613 "tmpfd = dup(newfd);\n"
614 "if (tmpfd == -1 && errno != EBADF) {\n"
615 " /* Handle unexpected dup() error. */\n"
616 "}\n"
617 "\\&\n"
618 "/* Atomically duplicate \\[aq]oldfd\\[aq] on \\[aq]newfd\\[aq]. */\n"
619 "\\&\n"
620 "if (dup2(oldfd, newfd) == -1) {\n"
621 " /* Handle dup2() error. */\n"
622 "}\n"
623 "\\&\n"
624 "/* Now check for close() errors on the file originally\n"
625 " referred to by \\[aq]newfd\\[aq]. */\n"
626 "\\&\n"
627 "if (tmpfd != -1) {\n"
628 " if (close(tmpfd) == -1) {\n"
629 " /* Handle errors from close. */\n"
630 " }\n"
631 "}\n"
632 msgstr ""
633 "/* Obtain a duplicate of \\[aq]newfd\\[aq] that can subsequently\n"
634 " be used to check for close() errors; an EBADF error\n"
635 " means that \\[aq]newfd\\[aq] was not open. */\n"
636 "\\&\n"
637 "tmpfd = dup(newfd);\n"
638 "if (tmpfd == -1 && errno != EBADF) {\n"
639 " /* Handle unexpected dup() error. */\n"
640 "}\n"
641 "\\&\n"
642 "/* Atomically duplicate \\[aq]oldfd\\[aq] on \\[aq]newfd\\[aq]. */\n"
643 "\\&\n"
644 "if (dup2(oldfd, newfd) == -1) {\n"
645 " /* Handle dup2() error. */\n"
646 "}\n"
647 "\\&\n"
648 "/* Now check for close() errors on the file originally\n"
649 " referred to by \\[aq]newfd\\[aq]. */\n"
650 "\\&\n"
651 "if (tmpfd != -1) {\n"
652 " if (close(tmpfd) == -1) {\n"
653 " /* Handle errors from close. */\n"
654 " }\n"
655 "}\n"
656
657 #. type: TH
658 #: fedora-44 fedora-rawhide
659 #, no-wrap
660 msgid "2024-11-01"
661 msgstr "1 نوفمبر 2024"
662
663 #. type: TH
664 #: fedora-44 fedora-rawhide
665 #, no-wrap
666 msgid "Linux man-pages 6.13"
667 msgstr "صفحات دليل لينكس 6.13"
668
669 #. type: TH
670 #: mageia-cauldron
671 #, no-wrap
672 msgid "Linux man-pages 6.17"
673 msgstr "صفحات دليل لينكس 6.17"
674
675 #. type: TH
676 #: opensuse-leap-16-1 opensuse-tumbleweed
677 #, no-wrap
678 msgid "Linux man-pages (unreleased)"
679 msgstr "صفحات دليل لينكس (لم تصدر بعد)"