Debian Codegraph @

po/ar/man2/close_range.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_range"
25 msgstr "close_range"
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_range - close all file descriptors in a given range"
51 msgstr "close_range - إغلاق كل واصفات الملفات في نطاق معين"
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 ""
78 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
79 "B<#include E<lt>unistd.hE<gt>>\n"
80 msgstr ""
81 "B<#define _GNU_SOURCE> /* انظر feature_test_macros(7) */\n"
82 "B<#include E<lt>unistd.hE<gt>>\n"
83
84 #. type: Plain text
85 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
86 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
87 #, no-wrap
88 msgid ""
89 "B<#include E<lt>linux/close_range.hE<gt>> /* Definition of B<CLOSE_RANGE_*>\n"
90 " constants */\n"
91 msgstr ""
92 "B<#include E<lt>linux/close_range.hE<gt>> /* Definition of B<CLOSE_RANGE_*>\n"
93 " constants */\n"
94
95 #. type: Plain text
96 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
97 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
98 #, no-wrap
99 msgid "B<int close_range(unsigned int >I<first>B<, unsigned int >I<last>B<, int >I<flags>B<);>\n"
100 msgstr "B<int close_range(unsigned int >I<first>B<, unsigned int >I<last>B<, int >I<flags>B<);>\n"
101
102 #. type: SH
103 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
104 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
105 #, no-wrap
106 msgid "DESCRIPTION"
107 msgstr "الوصف"
108
109 #. type: Plain text
110 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
111 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
112 msgid ""
113 "The B<close_range>() system call closes all open file descriptors from "
114 "I<first> to I<last> (included)."
115 msgstr ""
116 "استدعاء النظام B<close_range>() يغلق كل واصفات الملفات المفتوحة من I<first> "
117 "إلى I<last> (شاملًا)."
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 "Errors closing a given file descriptor are currently ignored."
123 msgstr "الأخطاء عند إغلاق واصف ملف معين تُتجاهل حاليًا."
124
125 #. type: Plain text
126 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
127 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
128 msgid "I<flags> is a bit mask containing 0 or more of the following:"
129 msgstr "I<flags> هو قناع بت يحتوي على 0 أو أكثر مما يلي:"
130
131 #. type: TP
132 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
133 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
134 #, no-wrap
135 msgid "B<CLOSE_RANGE_CLOEXEC> (since Linux 5.11)"
136 msgstr "B<CLOSE_RANGE_CLOEXEC> (منذ لينكس 5.11)"
137
138 #. type: Plain text
139 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
140 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
141 msgid ""
142 "Set the close-on-exec flag on the specified file descriptors, rather than "
143 "immediately closing them."
144 msgstr ""
145 "يضبط علم الإغلاق عند التنفيذ على واصفات الملفات المحددة، بدلًا من إغلاقها "
146 "فورًا."
147
148 #. type: TP
149 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
150 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
151 #, no-wrap
152 msgid "B<CLOSE_RANGE_UNSHARE>"
153 msgstr "B<CLOSE_RANGE_UNSHARE>"
154
155 #. type: Plain text
156 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
157 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
158 msgid ""
159 "Unshare the specified file descriptors from any other processes before "
160 "closing them, avoiding races with other threads sharing the file descriptor "
161 "table."
162 msgstr ""
163 "يفصل واصفات الملفات المحددة عن أي عمليات أخرى قبل إغلاقها، متجنبًا حالات "
164 "السباق مع خيوط أخرى تشارك جدول واصفات الملفات."
165
166 #. type: SH
167 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
168 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
169 #, no-wrap
170 msgid "RETURN VALUE"
171 msgstr "قيمة الإرجاع"
172
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 ""
177 "On success, B<close_range>() returns 0. On error, -1 is returned and "
178 "I<errno> is set to indicate the error."
179 msgstr ""
180 "عند النجاح، تُرجع B<close_range>() 0. عند الخطأ، تُرجع -1 ويُضبط I<errno> "
181 "للإشارة إلى الخطأ."
182
183 #. type: SH
184 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
185 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
186 #, no-wrap
187 msgid "ERRORS"
188 msgstr "الأخطاء"
189
190 #. type: TP
191 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
192 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
193 #, no-wrap
194 msgid "B<EINVAL>"
195 msgstr "B<EINVAL>"
196
197 #. type: Plain text
198 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
199 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
200 msgid "I<flags> is not valid, or I<first> is greater than I<last>."
201 msgstr "I<flags> غير صالح، أو I<first> أكبر من I<last>."
202
203 #. type: Plain text
204 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
205 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
206 msgid ""
207 "The following can occur with B<CLOSE_RANGE_UNSHARE> (when constructing the "
208 "new descriptor table):"
209 msgstr ""
210 "ما يلي يمكن أن يحدث مع B<CLOSE_RANGE_UNSHARE> (عند بناء جدول الواصفات "
211 "الجديد):"
212
213 #. type: TP
214 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
215 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
216 #, no-wrap
217 msgid "B<EMFILE>"
218 msgstr "B<EMFILE>"
219
220 #. type: Plain text
221 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
222 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
223 msgid ""
224 "The number of open file descriptors exceeds the limit specified in I</proc/"
225 "sys/fs/nr_open> (see B<proc>(5)). This error can occur in situations where "
226 "that limit was lowered before a call to B<close_range>() where the "
227 "B<CLOSE_RANGE_UNSHARE> flag is specified."
228 msgstr ""
229 "عدد واصفات الملفات المفتوحة يتجاوز الحد المحدد في I</proc/sys/fs/nr_open> "
230 "(انظر B<proc>(5)). هذا الخطأ يمكن أن يحدث في حالات حيث خُفض ذلك الحد قبل "
231 "استدعاء B<close_range>() حيث يُحدد علم B<CLOSE_RANGE_UNSHARE>."
232
233 #. type: TP
234 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
235 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
236 #, no-wrap
237 msgid "B<ENOMEM>"
238 msgstr "B<ENOMEM>"
239
240 #. type: Plain text
241 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
242 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
243 msgid "Insufficient kernel memory was available."
244 msgstr "ذاكرة النواة المتوفرة غير كافية."
245
246 #. type: SH
247 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
248 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
249 #, no-wrap
250 msgid "STANDARDS"
251 msgstr "المعايير"
252
253 #. type: Plain text
254 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
255 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
256 msgid "None."
257 msgstr "لا شيء."
258
259 #. type: SH
260 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
261 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
262 #, no-wrap
263 msgid "HISTORY"
264 msgstr "التاريخ"
265
266 #. type: Plain text
267 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
268 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
269 msgid "FreeBSD. Linux 5.9, glibc 2.34."
270 msgstr "فري بي إس دي. لينكس 5.9، جليبتك 2.34."
271
272 #. type: SH
273 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
274 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
275 #, no-wrap
276 msgid "NOTES"
277 msgstr "ملاحظات"
278
279 #. type: SS
280 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
281 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
282 #, no-wrap
283 msgid "Closing all open file descriptors"
284 msgstr "إغلاق كل واصفات الملفات المفتوحة"
285
286 #. 278a5fbaed89dacd04e9d052f4594ffd0e0585de
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 "To avoid blindly closing file descriptors in the range of possible file "
292 "descriptors, this is sometimes implemented (on Linux) by listing open file "
293 "descriptors in I</proc/self/fd/> and calling B<close>(2) on each one. "
294 "B<close_range>() can take care of this without requiring I</proc> and "
295 "within a single system call, which provides significant performance benefits."
296 msgstr ""
297 "لتجنب إغلاق واصفات الملفات بشكل أعمى في نطاق واصفات الملفات الممكنة، يُنفذ "
298 "هذا أحيانًا (على لينكس) بسرد واصفات الملفات المفتوحة في I</proc/self/fd/> "
299 "واستدعاء B<close>(2) على كل واحد. B<close_range>() يمكنه التعامل مع هذا "
300 "دون الحاجة إلى I</proc> وداخل استدعاء نظام واحد، مما يوفر فوائد أداء كبيرة."
301
302 #. type: SS
303 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
304 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
305 #, no-wrap
306 msgid "Closing file descriptors before exec"
307 msgstr "إغلاق واصفات الملفات قبل التنفيذ"
308
309 #. 60997c3d45d9a67daf01c56d805ae4fec37e0bd8
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 "File descriptors can be closed safely using"
314 msgstr "يمكن إغلاق واصفات الملفات بأمان باستخدام"
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 #, no-wrap
320 msgid ""
321 "/* we don't want anything past stderr here */\n"
322 "close_range(3, \\[ti]0U, CLOSE_RANGE_UNSHARE);\n"
323 "execve(....);\n"
324 msgstr ""
325 "/* we don't want anything past stderr here */\n"
326 "close_range(3, \\[ti]0U, CLOSE_RANGE_UNSHARE);\n"
327 "execve(....);\n"
328
329 #. type: Plain text
330 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
331 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
332 msgid "B<CLOSE_RANGE_UNSHARE> is conceptually equivalent to"
333 msgstr "B<CLOSE_RANGE_UNSHARE> مكافئ من الناحية المفاهيمية لـ"
334
335 #. type: Plain text
336 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
337 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
338 #, no-wrap
339 msgid ""
340 "unshare(CLONE_FILES);\n"
341 "close_range(first, last, 0);\n"
342 msgstr ""
343 "unshare(CLONE_FILES);\n"
344 "close_range(first, last, 0);\n"
345
346 #. type: Plain text
347 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
348 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
349 msgid ""
350 "but can be more efficient: if the unshared range extends past the current "
351 "maximum number of file descriptors allocated in the caller's file descriptor "
352 "table (the common case when I<last> is \\[ti]0U), the kernel will unshare a "
353 "new file descriptor table for the caller up to I<first>, copying as few file "
354 "descriptors as possible. This avoids subsequent B<close>(2) calls "
355 "entirely; the whole operation is complete once the table is unshared."
356 msgstr ""
357 "لكنه يمكن أن يكون أكثر كفاءة: إذا امتد النطاق المفصول إلى ما بعد الحد الأقصى "
358 "الحالي لعدد واصفات الملفات المخصصة في جدول واصفات ملفات المستدعي (الحالة "
359 "الشائعة عندما يكون I<last> هو \\[ti]0U)، سيفصل النواة جدول واصفات ملفات جديد "
360 "للمستدعي حتى I<first>، ناسخًا أقل عدد ممكن من واصفات الملفات. هذا يتجنب "
361 "استدعاءات B<close>(2) اللاحقة تمامًا؛ تكتمل العملية بأكملها بمجرد فصل الجدول."
362
363 #. type: SS
364 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
365 #: opensuse-tumbleweed
366 #, no-wrap
367 msgid "Closing files on \\f[I]exec\\fB"
368 msgstr "إغلاق الملفات عند \\f[I]التنفيذ\\fB"
369
370 #. 582f1fb6b721facf04848d2ca57f34468da1813e
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 ""
375 "This is particularly useful in cases where multiple pre-B<exec> setup steps "
376 "risk conflicting with each other. For example, setting up a B<seccomp>(2) "
377 "profile can conflict with a B<close_range>() call: if the file descriptors "
378 "are closed before the B<seccomp>(2) profile is set up, the profile setup "
379 "can't use them itself, or control their closure; if the file descriptors are "
380 "closed afterwards, the seccomp profile can't block the B<close_range>() "
381 "call or any fallbacks. Using B<CLOSE_RANGE_CLOEXEC> avoids this: the "
382 "descriptors can be marked before the B<seccomp>(2) profile is set up, and "
383 "the profile can control access to B<close_range>() without affecting the "
384 "calling process."
385 msgstr ""
386 "هذا مفيد بشكل خاص في الحالات حيث خطوات الإعداد المتعددة قبل B<exec> تخاطر "
387 "بالتعارض مع بعضها البعض. على سبيل المثال، إعداد تشكيلة B<seccomp>(2) يمكن "
388 "أن يتعارض مع استدعاء B<close_range>(): إذا أغلقت واصفات الملفات قبل إعداد "
389 "تشكيلة B<seccomp>(2)، لا يمكن لإعداد التشكيلة استخدامها بنفسها، أو التحكم في "
390 "إغلاقها؛ إذا أغلقت واصفات الملفات بعد ذلك، لا يمكن لتشكيلة seccomp حظر "
391 "استدعاء B<close_range>() أو أي بدائل. استخدام B<CLOSE_RANGE_CLOEXEC> يتجنب "
392 "هذا: يمكن وضع علامة على الواصفات قبل إعداد تشكيلة B<seccomp>(2)، ويمكن "
393 "للتشكيلة التحكم في الوصول إلى B<close_range>() دون التأثير على عملية "
394 "الاستدعاء."
395
396 #. type: SH
397 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
398 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
399 #, no-wrap
400 msgid "EXAMPLES"
401 msgstr "أمثلة"
402
403 #. type: Plain text
404 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
405 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
406 msgid ""
407 "The program shown below opens the files named in its command-line arguments, "
408 "displays the list of files that it has opened (by iterating through the "
409 "entries in I</proc/PID/fd>), uses B<close_range>() to close all file "
410 "descriptors greater than or equal to 3, and then once more displays the "
411 "process's list of open files. The following example demonstrates the use of "
412 "the program:"
413 msgstr ""
414 "البرنامج الموضح أدناه يفتح الملفات المسماة في وسائط سطر الأوامر الخاصة به، "
415 "يعرض قائمة الملفات التي فتحها (بالتكرار عبر الإدخالات في I</proc/PID/fd>)، "
416 "يستخدم B<close_range>() لإغلاق كل واصفات الملفات الأكبر من أو تساوي 3، ثم "
417 "يعرض مرة أخرى قائمة الملفات المفتوحة للعملية. المثال التالي يوضح استخدام "
418 "البرنامج:"
419
420 #. type: Plain text
421 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
422 #: opensuse-tumbleweed
423 #, no-wrap
424 msgid ""
425 "$B< touch /tmp/a /tmp/b /tmp/c>;\n"
426 "$B< ./a.out /tmp/a /tmp/b /tmp/c>;\n"
427 "/tmp/a opened as FD 3\n"
428 "/tmp/b opened as FD 4\n"
429 "/tmp/c opened as FD 5\n"
430 "/proc/self/fd/0 ==E<gt> /dev/pts/1\n"
431 "/proc/self/fd/1 ==E<gt> /dev/pts/1\n"
432 "/proc/self/fd/2 ==E<gt> /dev/pts/1\n"
433 "/proc/self/fd/3 ==E<gt> /tmp/a\n"
434 "/proc/self/fd/4 ==E<gt> /tmp/b\n"
435 "/proc/self/fd/5 ==E<gt> /tmp/c\n"
436 "/proc/self/fd/6 ==E<gt> /proc/9005/fd\n"
437 "========= About to call close_range() =======\n"
438 "/proc/self/fd/0 ==E<gt> /dev/pts/1\n"
439 "/proc/self/fd/1 ==E<gt> /dev/pts/1\n"
440 "/proc/self/fd/2 ==E<gt> /dev/pts/1\n"
441 "/proc/self/fd/3 ==E<gt> /proc/9005/fd\n"
442 msgstr ""
443 "$B< touch /tmp/a /tmp/b /tmp/c>;\n"
444 "$B< ./a.out /tmp/a /tmp/b /tmp/c>;\n"
445 "/tmp/a opened as FD 3\n"
446 "/tmp/b opened as FD 4\n"
447 "/tmp/c opened as FD 5\n"
448 "/proc/self/fd/0 ==E<gt> /dev/pts/1\n"
449 "/proc/self/fd/1 ==E<gt> /dev/pts/1\n"
450 "/proc/self/fd/2 ==E<gt> /dev/pts/1\n"
451 "/proc/self/fd/3 ==E<gt> /tmp/a\n"
452 "/proc/self/fd/4 ==E<gt> /tmp/b\n"
453 "/proc/self/fd/5 ==E<gt> /tmp/c\n"
454 "/proc/self/fd/6 ==E<gt> /proc/9005/fd\n"
455 "========= About to call close_range() =======\n"
456 "/proc/self/fd/0 ==E<gt> /dev/pts/1\n"
457 "/proc/self/fd/1 ==E<gt> /dev/pts/1\n"
458 "/proc/self/fd/2 ==E<gt> /dev/pts/1\n"
459 "/proc/self/fd/3 ==E<gt> /proc/9005/fd\n"
460
461 #. type: Plain text
462 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
463 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
464 msgid ""
465 "Note that the lines showing the pathname I</proc/9005/fd> result from the "
466 "calls to B<opendir>(3)."
467 msgstr ""
468 "لاحظ أن الأسطر التي تظهر اسم المسار I</proc/9005/fd> تنتج عن استدعاءات "
469 "B<opendir>(3)."
470
471 #. type: SS
472 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
473 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
474 #, no-wrap
475 msgid "Program source"
476 msgstr "مصدر البرنامج"
477
478 #. type: Plain text
479 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
480 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
481 #, no-wrap
482 msgid ""
483 "#define _GNU_SOURCE\n"
484 "#include E<lt>dirent.hE<gt>\n"
485 "#include E<lt>fcntl.hE<gt>\n"
486 "#include E<lt>limits.hE<gt>\n"
487 "#include E<lt>stdio.hE<gt>\n"
488 "#include E<lt>stdlib.hE<gt>\n"
489 "#include E<lt>sys/types.hE<gt>\n"
490 "#include E<lt>unistd.hE<gt>\n"
491 "\\&\n"
492 "/* Show the contents of the symbolic links in /proc/self/fd */\n"
493 "\\&\n"
494 "static void\n"
495 "show_fds(void)\n"
496 "{\n"
497 " DIR *dirp;\n"
498 " char path[PATH_MAX], target[PATH_MAX];\n"
499 " ssize_t len;\n"
500 " struct dirent *dp;\n"
501 "\\&\n"
502 " dirp = opendir(\"/proc/self/fd\");\n"
503 " if (dirp == NULL) {\n"
504 " perror(\"opendir\");\n"
505 " exit(EXIT_FAILURE);\n"
506 " }\n"
507 "\\&\n"
508 " for (;;) {\n"
509 " dp = readdir(dirp);\n"
510 " if (dp == NULL)\n"
511 " break;\n"
512 "\\&\n"
513 " if (dp-E<gt>d_type == DT_LNK) {\n"
514 " snprintf(path, sizeof(path), \"/proc/self/fd/%s\",\n"
515 " dp-E<gt>d_name);\n"
516 "\\&\n"
517 " len = readlink(path, target, sizeof(target));\n"
518 " printf(\"%s ==E<gt> %.*s\\[rs]n\", path, (int) len, target);\n"
519 " }\n"
520 " }\n"
521 "\\&\n"
522 " closedir(dirp);\n"
523 "}\n"
524 "\\&\n"
525 "int\n"
526 "main(int argc, char *argv[])\n"
527 "{\n"
528 " int fd;\n"
529 "\\&\n"
530 " for (size_t j = 1; j E<lt> argc; j++) {\n"
531 " fd = open(argv[j], O_RDONLY);\n"
532 " if (fd == -1) {\n"
533 " perror(argv[j]);\n"
534 " exit(EXIT_FAILURE);\n"
535 " }\n"
536 " printf(\"%s opened as FD %d\\[rs]n\", argv[j], fd);\n"
537 " }\n"
538 "\\&\n"
539 " show_fds();\n"
540 "\\&\n"
541 " printf(\"========= About to call close_range() =======\\[rs]n\");\n"
542 "\\&\n"
543 " if (close_range(3, \\[ti]0U, 0) == -1) {\n"
544 " perror(\"close_range\");\n"
545 " exit(EXIT_FAILURE);\n"
546 " }\n"
547 "\\&\n"
548 " show_fds();\n"
549 " exit(EXIT_FAILURE);\n"
550 "}\n"
551 msgstr ""
552 "#define _GNU_SOURCE\n"
553 "#include E<lt>dirent.hE<gt>\n"
554 "#include E<lt>fcntl.hE<gt>\n"
555 "#include E<lt>limits.hE<gt>\n"
556 "#include E<lt>stdio.hE<gt>\n"
557 "#include E<lt>stdlib.hE<gt>\n"
558 "#include E<lt>sys/types.hE<gt>\n"
559 "#include E<lt>unistd.hE<gt>\n"
560 "\\&\n"
561 "/* إظهار محتويات الروابط الرمزية في /proc/self/fd */\n"
562 "\\&\n"
563 "static void\n"
564 "show_fds(void)\n"
565 "{\n"
566 " DIR *dirp;\n"
567 " char path[PATH_MAX], target[PATH_MAX];\n"
568 " ssize_t len;\n"
569 " struct dirent *dp;\n"
570 "\\&\n"
571 " dirp = opendir(\"/proc/self/fd\");\n"
572 " if (dirp == NULL) {\n"
573 " perror(\"opendir\");\n"
574 " exit(EXIT_FAILURE);\n"
575 " }\n"
576 "\\&\n"
577 " for (;;) {\n"
578 " dp = readdir(dirp);\n"
579 " if (dp == NULL)\n"
580 " break;\n"
581 "\\&\n"
582 " if (dp-E<gt>d_type == DT_LNK) {\n"
583 " snprintf(path, sizeof(path), \"/proc/self/fd/%s\",\n"
584 " dp-E<gt>d_name);\n"
585 "\\&\n"
586 " len = readlink(path, target, sizeof(target));\n"
587 " printf(\"%s ==E<gt> %.*s\\[rs]n\", path, (int) len, target);\n"
588 " }\n"
589 " }\n"
590 "\\&\n"
591 " closedir(dirp);\n"
592 "}\n"
593 "\\&\n"
594 "int\n"
595 "main(int argc, char *argv[])\n"
596 "{\n"
597 " int fd;\n"
598 "\\&\n"
599 " for (size_t j = 1; j E<lt> argc; j++) {\n"
600 " fd = open(argv[j], O_RDONLY);\n"
601 " if (fd == -1) {\n"
602 " perror(argv[j]);\n"
603 " exit(EXIT_FAILURE);\n"
604 " }\n"
605 " printf(\"%s opened as FD %d\\[rs]n\", argv[j], fd);\n"
606 " }\n"
607 "\\&\n"
608 " show_fds();\n"
609 "\\&\n"
610 " printf(\"========= About to call close_range() =======\\[rs]n\");\n"
611 "\\&\n"
612 " if (close_range(3, \\[ti]0U, 0) == -1) {\n"
613 " perror(\"close_range\");\n"
614 " exit(EXIT_FAILURE);\n"
615 " }\n"
616 "\\&\n"
617 " show_fds();\n"
618 " exit(EXIT_FAILURE);\n"
619 "}\n"
620
621 #. SRC END
622 #. type: SH
623 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
624 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
625 #, no-wrap
626 msgid "SEE ALSO"
627 msgstr "انظر أيضًا"
628
629 #. type: Plain text
630 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
631 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
632 msgid "B<close>(2)"
633 msgstr "B<close>(2)"
634
635 #. type: TH
636 #: debian-trixie
637 #, no-wrap
638 msgid "2024-06-15"
639 msgstr "15 يونيو 2024"
640
641 #. type: TH
642 #: debian-trixie
643 #, no-wrap
644 msgid "Linux man-pages 6.9.1"
645 msgstr "صفحات دليل لينكس 6.9.1"
646
647 #. type: Plain text
648 #: debian-trixie
649 msgid "Standard C library (I<libc>, I<-lc>)"
650 msgstr "مكتبة سي المعيارية (I<libc>، I<-lc>)"
651
652 #. type: SS
653 #: debian-trixie fedora-44 fedora-rawhide
654 #, no-wrap
655 msgid "Closing files on exec"
656 msgstr "إغلاق الملفات عند exec"
657
658 #. type: Plain text
659 #: debian-trixie fedora-44 fedora-rawhide
660 #, no-wrap
661 msgid ""
662 "$ B<touch /tmp/a /tmp/b /tmp/c>\n"
663 "$ B<./a.out /tmp/a /tmp/b /tmp/c>\n"
664 "/tmp/a opened as FD 3\n"
665 "/tmp/b opened as FD 4\n"
666 "/tmp/c opened as FD 5\n"
667 "/proc/self/fd/0 ==E<gt> /dev/pts/1\n"
668 "/proc/self/fd/1 ==E<gt> /dev/pts/1\n"
669 "/proc/self/fd/2 ==E<gt> /dev/pts/1\n"
670 "/proc/self/fd/3 ==E<gt> /tmp/a\n"
671 "/proc/self/fd/4 ==E<gt> /tmp/b\n"
672 "/proc/self/fd/5 ==E<gt> /tmp/b\n"
673 "/proc/self/fd/6 ==E<gt> /proc/9005/fd\n"
674 "========= About to call close_range() =======\n"
675 "/proc/self/fd/0 ==E<gt> /dev/pts/1\n"
676 "/proc/self/fd/1 ==E<gt> /dev/pts/1\n"
677 "/proc/self/fd/2 ==E<gt> /dev/pts/1\n"
678 "/proc/self/fd/3 ==E<gt> /proc/9005/fd\n"
679 msgstr ""
680 "$ B<touch /tmp/a /tmp/b /tmp/c>\n"
681 "$ B<./a.out /tmp/a /tmp/b /tmp/c>\n"
682 "/tmp/a opened as FD 3\n"
683 "/tmp/b opened as FD 4\n"
684 "/tmp/c opened as FD 5\n"
685 "/proc/self/fd/0 ==E<gt> /dev/pts/1\n"
686 "/proc/self/fd/1 ==E<gt> /dev/pts/1\n"
687 "/proc/self/fd/2 ==E<gt> /dev/pts/1\n"
688 "/proc/self/fd/3 ==E<gt> /tmp/a\n"
689 "/proc/self/fd/4 ==E<gt> /tmp/b\n"
690 "/proc/self/fd/5 ==E<gt> /tmp/b\n"
691 "/proc/self/fd/6 ==E<gt> /proc/9005/fd\n"
692 "========= About to call close_range() =======\n"
693 "/proc/self/fd/0 ==E<gt> /dev/pts/1\n"
694 "/proc/self/fd/1 ==E<gt> /dev/pts/1\n"
695 "/proc/self/fd/2 ==E<gt> /dev/pts/1\n"
696 "/proc/self/fd/3 ==E<gt> /proc/9005/fd\n"
697
698 #. type: TH
699 #: fedora-44 fedora-rawhide
700 #, no-wrap
701 msgid "2024-07-23"
702 msgstr "23 يوليو 2024"
703
704 #. type: TH
705 #: fedora-44 fedora-rawhide
706 #, no-wrap
707 msgid "Linux man-pages 6.13"
708 msgstr "صفحات دليل لينكس 6.13"
709
710 #. type: TH
711 #: mageia-cauldron
712 #, no-wrap
713 msgid "Linux man-pages 6.17"
714 msgstr "صفحات دليل لينكس 6.17"
715
716 #. type: TH
717 #: opensuse-leap-16-1 opensuse-tumbleweed
718 #, no-wrap
719 msgid "Linux man-pages (unreleased)"
720 msgstr "صفحات دليل لينكس (لم تصدر بعد)"