| 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 |
#, fuzzy |
| 6 |
msgid "" |
| 7 |
msgstr "" |
| 8 |
"Project-Id-Version: manpages-l10n\n" |
| 9 |
"POT-Creation-Date: 2026-06-05 06:23+0200\n" |
| 10 |
"PO-Revision-Date: 2026-06-27 17:58+0200\n" |
| 11 |
"Last-Translator: Zayed Al-Saidi <[email protected]>\n" |
| 12 |
"Language-Team: Arabic <[email protected]>\n" |
| 13 |
"Language: ar\n" |
| 14 |
"MIME-Version: 1.0\n" |
| 15 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 16 |
"Content-Transfer-Encoding: 8bit\n" |
| 17 |
".MIME-Version: 1.0\n" |
| 18 |
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " |
| 19 |
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" |
| 20 |
"X-Generator: Lokalize 23.08.5\n" |
| 21 |
|
| 22 |
#. type: TH |
| 23 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 24 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 25 |
#, no-wrap |
| 26 |
msgid "epoll" |
| 27 |
msgstr "epoll" |
| 28 |
|
| 29 |
#. type: TH |
| 30 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 31 |
#: opensuse-tumbleweed |
| 32 |
#, no-wrap |
| 33 |
msgid "2026-02-08" |
| 34 |
msgstr "8 فبراير 2026" |
| 35 |
|
| 36 |
#. type: TH |
| 37 |
#: archlinux debian-unstable |
| 38 |
#, no-wrap |
| 39 |
msgid "Linux man-pages 6.18" |
| 40 |
msgstr "صفحات دليل لينكس 6.18" |
| 41 |
|
| 42 |
#. type: SH |
| 43 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 44 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 45 |
#, no-wrap |
| 46 |
msgid "NAME" |
| 47 |
msgstr "الاسم" |
| 48 |
|
| 49 |
#. type: Plain text |
| 50 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 51 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 52 |
msgid "epoll - I/O event notification facility" |
| 53 |
msgstr "epoll - مرفق إعلام أحداث الإدخال/الإخراج" |
| 54 |
|
| 55 |
#. type: SH |
| 56 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 57 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 58 |
#, no-wrap |
| 59 |
msgid "SYNOPSIS" |
| 60 |
msgstr "موجز" |
| 61 |
|
| 62 |
#. type: Plain text |
| 63 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 64 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 65 |
#, no-wrap |
| 66 |
msgid "B<#include E<lt>sys/epoll.hE<gt>>\n" |
| 67 |
msgstr "B<#include E<lt>sys/epoll.hE<gt>>\n" |
| 68 |
|
| 69 |
#. type: SH |
| 70 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 71 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 72 |
#, no-wrap |
| 73 |
msgid "DESCRIPTION" |
| 74 |
msgstr "الوصف" |
| 75 |
|
| 76 |
#. type: Plain text |
| 77 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 78 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 79 |
msgid "" |
| 80 |
"The B<epoll> API performs a similar task to B<poll>(2): monitoring multiple " |
| 81 |
"file descriptors to see if I/O is possible on any of them. The B<epoll> API " |
| 82 |
"can be used either as an edge-triggered or a level-triggered interface and " |
| 83 |
"scales well to large numbers of watched file descriptors." |
| 84 |
msgstr "" |
| 85 |
"تقوم واجهة برمجة التطبيقات B<epoll> بمهمة مشابهة لـ B<poll>(2): مراقبة " |
| 86 |
"واصفات ملفات متعددة لمعرفة ما إذا كان الإدخال/الإخراج ممكنًا على أي منها. " |
| 87 |
"يمكن استخدام واجهة برمجة التطبيقات B<epoll> إما كواجهة محفزة بالحافة أو " |
| 88 |
"محفزة بالمستوى وتتوسع جيدًا لأعداد كبيرة من واصفات الملفات المراقبة." |
| 89 |
|
| 90 |
#. type: Plain text |
| 91 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 92 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 93 |
msgid "" |
| 94 |
"The central concept of the B<epoll> API is the B<epoll> I<instance>, an in-" |
| 95 |
"kernel data structure which, from a user-space perspective, can be " |
| 96 |
"considered as a container for two lists:" |
| 97 |
msgstr "" |
| 98 |
"المفهوم المركزي لواجهة برمجة التطبيقات B<epoll> هو I<مثيل> B<epoll>، وهو " |
| 99 |
"بنية بيانات داخل النواة يمكن، من منظور مساحة المستخدم، اعتبارها حاوية " |
| 100 |
"لقائمتين:" |
| 101 |
|
| 102 |
#. type: IP |
| 103 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 104 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 105 |
#, no-wrap |
| 106 |
msgid "\\[bu]" |
| 107 |
msgstr "\\[bu]" |
| 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 I<interest> list (sometimes also called the B<epoll> set): the set of " |
| 114 |
"file descriptors that the process has registered an interest in monitoring." |
| 115 |
msgstr "" |
| 116 |
"قائمة I<الاهتمام> (تسمى أحيانًا مجموعة B<epoll>): مجموعة واصفات الملفات التي " |
| 117 |
"سجلت العملية اهتمامًا بمراقبتها." |
| 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 I<ready> list: the set of file descriptors that are \"ready\" for I/O. " |
| 124 |
"The ready list is a subset of (or, more precisely, a set of references to) " |
| 125 |
"the file descriptors in the interest list. The ready list is dynamically " |
| 126 |
"populated by the kernel as a result of I/O activity on those file " |
| 127 |
"descriptors." |
| 128 |
msgstr "" |
| 129 |
"قائمة I<الجاهزية>: مجموعة واصفات الملفات \"الجاهزة\" للإدخال/الإخراج. قائمة " |
| 130 |
"الجاهزية هي مجموعة فرعية من (أو، بشكل أكثر دقة، مجموعة مراجع لـ) واصفات " |
| 131 |
"الملفات في قائمة الاهتمام. تُملئ قائمة الجاهزية ديناميكيًا بواسطة النواة نتيجة " |
| 132 |
"لنشاط الإدخال/الإخراج على واصفات الملفات تلك." |
| 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 |
"The following system calls are provided to create and manage an B<epoll> " |
| 139 |
"instance:" |
| 140 |
msgstr "تُوفر استدعاءات النظام التالية لإنشاء وإدارة مثيل B<epoll>:" |
| 141 |
|
| 142 |
#. type: Plain text |
| 143 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 144 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 145 |
msgid "" |
| 146 |
"B<epoll_create>(2) creates a new B<epoll> instance and returns a file " |
| 147 |
"descriptor referring to that instance. (The more recent " |
| 148 |
"B<epoll_create1>(2) extends the functionality of B<epoll_create>(2).)" |
| 149 |
msgstr "" |
| 150 |
"يقوم B<epoll_create>(2) بإنشاء مثيل B<epoll> جديد ويعيد واصف ملف يشير إلى " |
| 151 |
"ذلك المثيل. (يقوم B<epoll_create1>(2) الأحدث بتوسيع وظائف " |
| 152 |
"B<epoll_create>(2).)" |
| 153 |
|
| 154 |
#. type: Plain text |
| 155 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 156 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 157 |
msgid "" |
| 158 |
"Interest in particular file descriptors is then registered via " |
| 159 |
"B<epoll_ctl>(2), which adds items to the interest list of the B<epoll> " |
| 160 |
"instance." |
| 161 |
msgstr "" |
| 162 |
"ثم يُسجل الاهتمام بواصفات ملفات معينة عبر B<epoll_ctl>(2)، الذي يضيف عناصر " |
| 163 |
"إلى قائمة الاهتمام لمثيل B<epoll>." |
| 164 |
|
| 165 |
#. type: Plain text |
| 166 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 167 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 168 |
msgid "" |
| 169 |
"B<epoll_wait>(2) waits for I/O events, blocking the calling thread if no " |
| 170 |
"events are currently available. (This system call can be thought of as " |
| 171 |
"fetching items from the ready list of the B<epoll> instance.)" |
| 172 |
msgstr "" |
| 173 |
"ينتظر B<epoll_wait>(2) أحداث الإدخال/الإخراج، مما يحجب الخيط المستدعي إذا لم " |
| 174 |
"تكن أي أحداث متاحة حاليًا. (يمكن اعتبار استدعاء النظام هذا كجلب عناصر من " |
| 175 |
"قائمة الجاهزية لمثيل B<epoll>.)" |
| 176 |
|
| 177 |
#. type: SS |
| 178 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 179 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 180 |
#, no-wrap |
| 181 |
msgid "Level-triggered and edge-triggered" |
| 182 |
msgstr "محفز بالمستوى ومحفز بالحافة" |
| 183 |
|
| 184 |
#. type: Plain text |
| 185 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 186 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 187 |
msgid "" |
| 188 |
"The B<epoll> event distribution interface is able to behave both as edge-" |
| 189 |
"triggered (ET) and as level-triggered (LT). The difference between the two " |
| 190 |
"mechanisms can be described as follows. Suppose that this scenario happens:" |
| 191 |
msgstr "" |
| 192 |
"واجهة توزيع الأحداث B<epoll> قادرة على التصرف كمحفز بالحافة (ET) ومحفز " |
| 193 |
"بالمستوى (LT). يمكن وصف الفرق بين الآليتين على النحو التالي. افترض أن هذا " |
| 194 |
"السيناريو يحدث:" |
| 195 |
|
| 196 |
#. type: IP |
| 197 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 198 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 199 |
#, no-wrap |
| 200 |
msgid "(1)" |
| 201 |
msgstr "(1)" |
| 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 file descriptor that represents the read side of a pipe (I<rfd>) is " |
| 208 |
"registered on the B<epoll> instance." |
| 209 |
msgstr "" |
| 210 |
"يُسجل واصف الملف الذي يمثل جانب القراءة من أنبوب (I<rfd>) على مثيل B<epoll>." |
| 211 |
|
| 212 |
#. type: IP |
| 213 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 214 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 215 |
#, no-wrap |
| 216 |
msgid "(2)" |
| 217 |
msgstr "(2)" |
| 218 |
|
| 219 |
#. type: Plain text |
| 220 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 221 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 222 |
msgid "A pipe writer writes 2\\ kB of data on the write side of the pipe." |
| 223 |
msgstr "" |
| 224 |
"يكتب كاتب الأنبوب 2\\ كيلوبايت من البيانات على جانب الكتابة من الأنبوب." |
| 225 |
|
| 226 |
#. type: IP |
| 227 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 228 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 229 |
#, no-wrap |
| 230 |
msgid "(3)" |
| 231 |
msgstr "(3)" |
| 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 |
"A call to B<epoll_wait>(2) is done that will return I<rfd> as a ready file " |
| 238 |
"descriptor." |
| 239 |
msgstr "يُستدعى B<epoll_wait>(2) الذي سيعيد I<rfd> كواصف ملف جاهز." |
| 240 |
|
| 241 |
#. type: IP |
| 242 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 243 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 244 |
#, no-wrap |
| 245 |
msgid "(4)" |
| 246 |
msgstr "(4)" |
| 247 |
|
| 248 |
#. type: Plain text |
| 249 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 250 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 251 |
msgid "The pipe reader reads 1\\ kB of data from I<rfd>." |
| 252 |
msgstr "يقرأ قارئ الأنبوب 1\\ كيلوبايت من البيانات من I<rfd>." |
| 253 |
|
| 254 |
#. type: IP |
| 255 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 256 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 257 |
#, no-wrap |
| 258 |
msgid "(5)" |
| 259 |
msgstr "(5)" |
| 260 |
|
| 261 |
#. type: Plain text |
| 262 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 263 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 264 |
msgid "A call to B<epoll_wait>(2) is done." |
| 265 |
msgstr "يُستدعى B<epoll_wait>(2)." |
| 266 |
|
| 267 |
#. type: Plain text |
| 268 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 269 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 270 |
msgid "" |
| 271 |
"If the I<rfd> file descriptor has been added to the B<epoll> interface using " |
| 272 |
"the B<EPOLLET> (edge-triggered) flag, the call to B<epoll_wait>(2) done in " |
| 273 |
"step B<5> will probably hang despite the available data still present in the " |
| 274 |
"file input buffer; meanwhile the remote peer might be expecting a response " |
| 275 |
"based on the data it already sent. The reason for this is that edge-" |
| 276 |
"triggered mode delivers events only when changes occur on the monitored file " |
| 277 |
"descriptor, that is, an event will be generated upon each receipt of a chunk " |
| 278 |
"of data. So, in step B<5> the caller might end up waiting for some data " |
| 279 |
"that is already present inside the input buffer. In the above example, an " |
| 280 |
"event on I<rfd> will be generated because of the write done in B<2> and the " |
| 281 |
"event is consumed in B<3>. Since the read operation done in B<4> does not " |
| 282 |
"consume the whole buffer data, the call to B<epoll_wait>(2) done in step " |
| 283 |
"B<5> might block indefinitely." |
| 284 |
msgstr "" |
| 285 |
"إذا أُضيف واصف الملف I<rfd> إلى واجهة B<epoll> باستخدام العلم B<EPOLLET> " |
| 286 |
"(محفز بالحافة)، فإن استدعاء B<epoll_wait>(2) الذي تم في الخطوة B<5> سيعلق " |
| 287 |
"على الأرجح على الرغم من البيانات المتاحة الموجودة في مخزن الإدخال المؤقت " |
| 288 |
"للملف؛ وفي الوقت نفسه، قد يتوقع النظير البعيد استجابة بناءً على البيانات التي " |
| 289 |
"أرسلها بالفعل. السبب في ذلك هو أن الوضع المحفز بالحافة يسلم الأحداث فقط عند " |
| 290 |
"حدوث تغييرات على واصف الملف المراقب، أي أنه يُولّد حدث عند كل استلام لكتلة من " |
| 291 |
"البيانات. لذا، في الخطوة B<5> قد ينتهي الأمر بالمستدعي بانتظار بعض البيانات " |
| 292 |
"الموجودة بالفعل داخل مخزن الإدخال المؤقت. في المثال أعلاه، سيُولّد حدث على " |
| 293 |
"I<rfd> بسبب الكتابة التي تمت في B<2> ويُستهلك الحدث في B<3>. نظرًا لأن عملية " |
| 294 |
"القراءة التي تمت في B<4> لا تستهلك بيانات المخزن المؤقت بالكامل، فإن استدعاء " |
| 295 |
"B<epoll_wait>(2) الذي تم في الخطوة B<5> قد يحظر إلى أجل غير مسمى." |
| 296 |
|
| 297 |
#. type: Plain text |
| 298 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 299 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 300 |
msgid "" |
| 301 |
"An application that employs the B<EPOLLET> flag should use nonblocking file " |
| 302 |
"descriptors to avoid having a blocking read or write starve a task that is " |
| 303 |
"handling multiple file descriptors. The suggested way to use B<epoll> as an " |
| 304 |
"edge-triggered (B<EPOLLET>) interface is as follows:" |
| 305 |
msgstr "" |
| 306 |
"يجب على تطبيق يستخدم العلم B<EPOLLET> استخدام واصفات ملفات غير محظورة لتجنب " |
| 307 |
"تجويع مهمة تتعامل مع واصفات ملفات متعددة بسبب قراءة أو كتابة محظورة. الطريقة " |
| 308 |
"المقترحة لاستخدام B<epoll> كواجهة محفزة بالحافة (B<EPOLLET>) هي كما يلي:" |
| 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 "with nonblocking file descriptors; and" |
| 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 |
msgid "" |
| 320 |
"by waiting for an event only after B<read>(2) or B<write>(2) return " |
| 321 |
"B<EAGAIN>." |
| 322 |
msgstr "بانتظار حدث فقط بعد أن يعيد B<read>(2) أو B<write>(2) B<EAGAIN>." |
| 323 |
|
| 324 |
#. type: Plain text |
| 325 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 326 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 327 |
msgid "" |
| 328 |
"By contrast, when used as a level-triggered interface (the default, when " |
| 329 |
"B<EPOLLET> is not specified), B<epoll> is simply a faster B<poll>(2), and " |
| 330 |
"can be used wherever the latter is used since it shares the same semantics." |
| 331 |
msgstr "" |
| 332 |
"على النقيض، عند استخدامه كواجهة محفزة بالمستوى (المبدئي، عندما لا يُحدد " |
| 333 |
"B<EPOLLET>)، فإن B<epoll> هو ببساطة B<poll>(2) أسرع، ويمكن استخدامه أينما " |
| 334 |
"اُستخدم الأخير لأنه يشارك نفس الدلالات." |
| 335 |
|
| 336 |
#. type: Plain text |
| 337 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 338 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 339 |
msgid "" |
| 340 |
"Since even with edge-triggered B<epoll>, multiple events can be generated " |
| 341 |
"upon receipt of multiple chunks of data, the caller has the option to " |
| 342 |
"specify the B<EPOLLONESHOT> flag, to tell B<epoll> to disable the associated " |
| 343 |
"file descriptor after the receipt of an event with B<epoll_wait>(2). When " |
| 344 |
"the B<EPOLLONESHOT> flag is specified, it is the caller's responsibility to " |
| 345 |
"rearm the file descriptor using B<epoll_ctl>(2) with B<EPOLL_CTL_MOD>." |
| 346 |
msgstr "" |
| 347 |
"نظرًا لأنه حتى مع B<epoll> المحفز بالحافة، يمكن توليد أحداث متعددة عند استلام " |
| 348 |
"كتل متعددة من البيانات، فإن لدى المستدعي خيار تحديد العلم B<EPOLLONESHOT>، " |
| 349 |
"لإخبار B<epoll> بتعطيل واصف الملف المرتبط بعد استلام حدث مع " |
| 350 |
"B<epoll_wait>(2). عند تحديد العلم B<EPOLLONESHOT>، تقع على عاتق المستدعي " |
| 351 |
"مسؤولية إعادة تسليح واصف الملف باستخدام B<epoll_ctl>(2) مع B<EPOLL_CTL_MOD>." |
| 352 |
|
| 353 |
#. type: Plain text |
| 354 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 355 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 356 |
msgid "" |
| 357 |
"If multiple threads (or processes, if child processes have inherited the " |
| 358 |
"B<epoll> file descriptor across B<fork>(2)) are blocked in " |
| 359 |
"B<epoll_wait>(2) waiting on the same epoll file descriptor and a file " |
| 360 |
"descriptor in the interest list that is marked for edge-triggered " |
| 361 |
"(B<EPOLLET>) notification becomes ready, just one of the threads (or " |
| 362 |
"processes) is awoken from B<epoll_wait>(2). This provides a useful " |
| 363 |
"optimization for avoiding \"thundering herd\" wake-ups in some scenarios." |
| 364 |
msgstr "" |
| 365 |
"إذا حُظر تعدد الخيوط (أو عمليات، إذا ورثت العمليات الفرعية واصف ملف B<epoll> " |
| 366 |
"عبر B<fork>(2)) في B<epoll_wait>(2) منتظرة نفس واصف ملف epoll وأصبح واصف ملف " |
| 367 |
"في قائمة الاهتمام محدد للإعلام المحفز بالحافة (B<EPOLLET>) جاهزًا، يُوقظ خيط " |
| 368 |
"واحد فقط (أو عملية) من B<epoll_wait>(2). يوفر هذا تحسينًا مفيدًا لتجنب إيقاظ " |
| 369 |
"\"القطيع المتدافع\" في بعض السيناريوهات." |
| 370 |
|
| 371 |
#. type: SS |
| 372 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 373 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 374 |
#, no-wrap |
| 375 |
msgid "Interaction with autosleep" |
| 376 |
msgstr "التفاعل مع التعليق الآلي" |
| 377 |
|
| 378 |
#. type: Plain text |
| 379 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 380 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 381 |
msgid "" |
| 382 |
"If the system is in B<autosleep> mode via I</sys/power/autosleep> and an " |
| 383 |
"event happens which wakes the device from sleep, the device driver will keep " |
| 384 |
"the device awake only until that event is queued. To keep the device awake " |
| 385 |
"until the event has been processed, it is necessary to use the " |
| 386 |
"B<epoll_ctl>(2) B<EPOLLWAKEUP> flag." |
| 387 |
msgstr "" |
| 388 |
"إذا كان النظام في وضع B<autosleep> عبر I</sys/power/autosleep> وحدث حدث يوقظ " |
| 389 |
"الجهاز من التعليق؛ فسيُبقي برنامج تشغيل الجهاز الجهاز مستيقظًا فقط حتى يُوضع " |
| 390 |
"ذلك الحدث في قائمة الانتظار. لإبقاء الجهاز مستيقظًا حتى يُعالج الحدث، من " |
| 391 |
"الضروري استخدام علامة B<epoll_ctl>(2) B<EPOLLWAKEUP>." |
| 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 |
"When the B<EPOLLWAKEUP> flag is set in the B<events> field for a I<struct " |
| 398 |
"epoll_event>, the system will be kept awake from the moment the event is " |
| 399 |
"queued, through the B<epoll_wait>(2) call which returns the event until the " |
| 400 |
"subsequent B<epoll_wait>(2) call. If the event should keep the system " |
| 401 |
"awake beyond that time, then a separate I<wake_lock> should be taken before " |
| 402 |
"the second B<epoll_wait>(2) call." |
| 403 |
msgstr "" |
| 404 |
"عند تعيين علامة B<EPOLLWAKEUP> في حقل B<events> لـ I<struct epoll_event>، " |
| 405 |
"سيُبقي النظام مستيقظًا من لحظة وضع الحدث في قائمة الانتظار، عبر استدعاء " |
| 406 |
"B<epoll_wait>(2) الذي يُرجع الحدث حتى استدعاء B<epoll_wait>(2) التالي. إذا " |
| 407 |
"كان يجب أن يُبقي الحدث النظام مستيقظًا بعد ذلك الوقت، فيجب أخذ I<wake_lock> " |
| 408 |
"منفصل قبل استدعاء B<epoll_wait>(2) الثاني." |
| 409 |
|
| 410 |
#. type: SS |
| 411 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 412 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 413 |
#, no-wrap |
| 414 |
msgid "/proc interfaces" |
| 415 |
msgstr "واجهات /proc" |
| 416 |
|
| 417 |
#. Following was added in Linux 2.6.28, but them removed in Linux 2.6.29 |
| 418 |
#. .TP |
| 419 |
#. .IR /proc/sys/fs/epoll/max_user_instances " (since Linux 2.6.28)" |
| 420 |
#. This specifies an upper limit on the number of epoll instances |
| 421 |
#. that can be created per real user ID. |
| 422 |
#. type: Plain text |
| 423 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 424 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 425 |
msgid "" |
| 426 |
"The following interfaces can be used to limit the amount of kernel memory " |
| 427 |
"consumed by epoll:" |
| 428 |
msgstr "" |
| 429 |
"يمكن استخدام الواجهات التالية للحد من مقدار ذاكرة النواة التي يستهلكها epoll:" |
| 430 |
|
| 431 |
#. type: TP |
| 432 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 433 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 434 |
#, no-wrap |
| 435 |
msgid "I</proc/sys/fs/epoll/max_user_watches> (since Linux 2.6.28)" |
| 436 |
msgstr "I</proc/sys/fs/epoll/max_user_watches> (منذ Linux 2.6.28)" |
| 437 |
|
| 438 |
#. Linux 2.6.29 (in Linux 2.6.28, the default was 1/32 of lowmem) |
| 439 |
#. type: Plain text |
| 440 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 441 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 442 |
msgid "" |
| 443 |
"This specifies a limit on the total number of file descriptors that a user " |
| 444 |
"can register across all epoll instances on the system. The limit is per " |
| 445 |
"real user ID. Each registered file descriptor costs roughly 90 bytes on a " |
| 446 |
"32-bit kernel, and roughly 160 bytes on a 64-bit kernel. Currently, the " |
| 447 |
"default value for I<max_user_watches> is 1/25 (4%) of the available low " |
| 448 |
"memory, divided by the registration cost in bytes." |
| 449 |
msgstr "" |
| 450 |
"يحدد هذا حدًا للعدد الإجمالي لوصفات الملفات التي يمكن لمستخدم تسجيلها عبر " |
| 451 |
"جميع مثيلات epoll على النظام. الحد هو لكل معرف مستخدم حقيقي. تكلف كل واصف " |
| 452 |
"ملف مسجل حوالي 90 بايت على نواة 32 بت، وحوالي 160 بايت على نواة 64 بت. " |
| 453 |
"حاليًا، القيمة المبدئية لـ I<max_user_watches> هي 1/25 (4%) من الذاكرة " |
| 454 |
"المنخفضة المتاحة، مقسومة على تكلفة التسجيل بالبايت." |
| 455 |
|
| 456 |
#. type: SS |
| 457 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 458 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 459 |
#, no-wrap |
| 460 |
msgid "Example for suggested usage" |
| 461 |
msgstr "مثال للاستخدام المقترح" |
| 462 |
|
| 463 |
#. type: Plain text |
| 464 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 465 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 466 |
msgid "" |
| 467 |
"While the usage of B<epoll> when employed as a level-triggered interface " |
| 468 |
"does have the same semantics as B<poll>(2), the edge-triggered usage " |
| 469 |
"requires more clarification to avoid stalls in the application event loop. " |
| 470 |
"In this example, listener is a nonblocking socket on which B<listen>(2) has " |
| 471 |
"been called. The function I<do_use_fd()> uses the new ready file descriptor " |
| 472 |
"until B<EAGAIN> is returned by either B<read>(2) or B<write>(2). An event-" |
| 473 |
"driven state machine application should, after having received B<EAGAIN>, " |
| 474 |
"record its current state so that at the next call to I<do_use_fd()> it will " |
| 475 |
"continue to B<read>(2) or B<write>(2) from where it stopped before." |
| 476 |
msgstr "" |
| 477 |
"بينما استخدام B<epoll> عند توظيفه كواجهة محفزة بالمستوى له نفس دلالات " |
| 478 |
"B<poll>(2)، فإن الاستخدام المحفز بالحافة يتطلب مزيدًا من التوضيح لتجنب التوقف " |
| 479 |
"في حلقة أحداث التطبيق. في هذا المثال، المستمع هو مقبس غير محظور اُستدعيت " |
| 480 |
"B<listen>(2) عليه. تستخدم الدالة I<do_use_fd()> واصف الملف الجديد الجاهز " |
| 481 |
"حتى يُرجع B<EAGAIN> بواسطة إما B<read>(2) أو B<write>(2). يجب على تطبيق آلة " |
| 482 |
"الحالة الموجه بالأحداث، بعد استلام B<EAGAIN>، تسجيل حالته الحالية بحيث في " |
| 483 |
"الاستدعاء التالي لـ I<do_use_fd()> سيستمر في B<read>(2) أو B<write>(2) من " |
| 484 |
"حيث توقف سابقًا." |
| 485 |
|
| 486 |
#. type: Plain text |
| 487 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 488 |
#: opensuse-tumbleweed |
| 489 |
#, no-wrap |
| 490 |
msgid "" |
| 491 |
"#define MAX_EVENTS 10\n" |
| 492 |
"struct epoll_event ev, events[MAX_EVENTS];\n" |
| 493 |
"int listen_sock, conn_sock, nfds, epollfd;\n" |
| 494 |
"\\&\n" |
| 495 |
"/* Code to set up listening socket, \\[aq]listen_sock\\[aq],\n" |
| 496 |
" (socket(), bind(), listen()) omitted. */\n" |
| 497 |
"\\&\n" |
| 498 |
"epollfd = epoll_create1(0);\n" |
| 499 |
"if (epollfd == -1) {\n" |
| 500 |
" perror(\"epoll_create1\");\n" |
| 501 |
" exit(EXIT_FAILURE);\n" |
| 502 |
"}\n" |
| 503 |
"\\&\n" |
| 504 |
"ev.events = EPOLLIN;\n" |
| 505 |
"ev.data.fd = listen_sock;\n" |
| 506 |
"if (epoll_ctl(epollfd, EPOLL_CTL_ADD, listen_sock, &ev) == -1) {\n" |
| 507 |
" perror(\"epoll_ctl: listen_sock\");\n" |
| 508 |
" exit(EXIT_FAILURE);\n" |
| 509 |
"}\n" |
| 510 |
"\\&\n" |
| 511 |
"for (;;) {\n" |
| 512 |
" nfds = epoll_wait(epollfd, events, MAX_EVENTS, -1);\n" |
| 513 |
" if (nfds == -1) {\n" |
| 514 |
" perror(\"epoll_wait\");\n" |
| 515 |
" exit(EXIT_FAILURE);\n" |
| 516 |
" }\n" |
| 517 |
"\\&\n" |
| 518 |
" for (n = 0; n E<lt> nfds; ++n) {\n" |
| 519 |
" if (events[n].data.fd == listen_sock) {\n" |
| 520 |
" conn_sock = accept(listen_sock,\n" |
| 521 |
" (struct sockaddr *) &addr, &addrlen);\n" |
| 522 |
" if (conn_sock == -1) {\n" |
| 523 |
" perror(\"accept\");\n" |
| 524 |
" exit(EXIT_FAILURE);\n" |
| 525 |
" }\n" |
| 526 |
" setnonblocking(conn_sock);\n" |
| 527 |
" ev.events = EPOLLIN | EPOLLET;\n" |
| 528 |
" ev.data.fd = conn_sock;\n" |
| 529 |
" if (epoll_ctl(epollfd, EPOLL_CTL_ADD, conn_sock,\n" |
| 530 |
" &ev) == -1) {\n" |
| 531 |
" perror(\"epoll_ctl: conn_sock\");\n" |
| 532 |
" exit(EXIT_FAILURE);\n" |
| 533 |
" }\n" |
| 534 |
" } else {\n" |
| 535 |
" do_use_fd(events[n].data.fd);\n" |
| 536 |
" }\n" |
| 537 |
" }\n" |
| 538 |
"}\n" |
| 539 |
msgstr "" |
| 540 |
"#define MAX_EVENTS 10\n" |
| 541 |
"struct epoll_event ev, events[MAX_EVENTS];\n" |
| 542 |
"int listen_sock, conn_sock, nfds, epollfd;\n" |
| 543 |
"\\&\n" |
| 544 |
"/* Code to set up listening socket, \\[aq]listen_sock\\[aq],\n" |
| 545 |
" (socket(), bind(), listen()) omitted. */\n" |
| 546 |
"\\&\n" |
| 547 |
"epollfd = epoll_create1(0);\n" |
| 548 |
"if (epollfd == -1) {\n" |
| 549 |
" perror(\"epoll_create1\");\n" |
| 550 |
" exit(EXIT_FAILURE);\n" |
| 551 |
"}\n" |
| 552 |
"\\&\n" |
| 553 |
"ev.events = EPOLLIN;\n" |
| 554 |
"ev.data.fd = listen_sock;\n" |
| 555 |
"if (epoll_ctl(epollfd, EPOLL_CTL_ADD, listen_sock, &ev) == -1) {\n" |
| 556 |
" perror(\"epoll_ctl: listen_sock\");\n" |
| 557 |
" exit(EXIT_FAILURE);\n" |
| 558 |
"}\n" |
| 559 |
"\\&\n" |
| 560 |
"for (;;) {\n" |
| 561 |
" nfds = epoll_wait(epollfd, events, MAX_EVENTS, -1);\n" |
| 562 |
" if (nfds == -1) {\n" |
| 563 |
" perror(\"epoll_wait\");\n" |
| 564 |
" exit(EXIT_FAILURE);\n" |
| 565 |
" }\n" |
| 566 |
"\\&\n" |
| 567 |
" for (n = 0; n E<lt> nfds; ++n) {\n" |
| 568 |
" if (events[n].data.fd == listen_sock) {\n" |
| 569 |
" conn_sock = accept(listen_sock,\n" |
| 570 |
" (struct sockaddr *) &addr, &addrlen);\n" |
| 571 |
" if (conn_sock == -1) {\n" |
| 572 |
" perror(\"accept\");\n" |
| 573 |
" exit(EXIT_FAILURE);\n" |
| 574 |
" }\n" |
| 575 |
" setnonblocking(conn_sock);\n" |
| 576 |
" ev.events = EPOLLIN | EPOLLET;\n" |
| 577 |
" ev.data.fd = conn_sock;\n" |
| 578 |
" if (epoll_ctl(epollfd, EPOLL_CTL_ADD, conn_sock,\n" |
| 579 |
" &ev) == -1) {\n" |
| 580 |
" perror(\"epoll_ctl: conn_sock\");\n" |
| 581 |
" exit(EXIT_FAILURE);\n" |
| 582 |
" }\n" |
| 583 |
" } else {\n" |
| 584 |
" do_use_fd(events[n].data.fd);\n" |
| 585 |
" }\n" |
| 586 |
" }\n" |
| 587 |
"}\n" |
| 588 |
|
| 589 |
#. type: Plain text |
| 590 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 591 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 592 |
msgid "" |
| 593 |
"When used as an edge-triggered interface, for performance reasons, it is " |
| 594 |
"possible to add the file descriptor inside the B<epoll> interface " |
| 595 |
"(B<EPOLL_CTL_ADD>) once by specifying (B<EPOLLIN>|B<EPOLLOUT>). This " |
| 596 |
"allows you to avoid continuously switching between B<EPOLLIN> and " |
| 597 |
"B<EPOLLOUT> calling B<epoll_ctl>(2) with B<EPOLL_CTL_MOD>." |
| 598 |
msgstr "" |
| 599 |
"عند استخدامه كواجهة محفزة بالحافة، لأسباب تتعلق بالأداء، من الممكن إضافة " |
| 600 |
"واصف الملف داخل واجهة B<epoll> (B<EPOLL_CTL_ADD>) مرة واحدة عن طريق تحديد " |
| 601 |
"(B<EPOLLIN>|B<EPOLLOUT>). يتيح لك هذا تجنب التبديل المستمر بين B<EPOLLIN> و " |
| 602 |
"B<EPOLLOUT> باستدعاء B<epoll_ctl>(2) مع B<EPOLL_CTL_MOD>." |
| 603 |
|
| 604 |
#. type: SS |
| 605 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 606 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 607 |
#, no-wrap |
| 608 |
msgid "Questions and answers" |
| 609 |
msgstr "أسئلة وأجوبة" |
| 610 |
|
| 611 |
#. type: Plain text |
| 612 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 613 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 614 |
msgid "" |
| 615 |
"What is the key used to distinguish the file descriptors registered in an " |
| 616 |
"interest list?" |
| 617 |
msgstr "" |
| 618 |
"ما هو المفتاح المستخدم للتمييز بين واصفات الملفات المسجلة في قائمة الاهتمام؟" |
| 619 |
|
| 620 |
#. type: Plain text |
| 621 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 622 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 623 |
msgid "" |
| 624 |
"The key is the combination of the file descriptor number and the open file " |
| 625 |
"description (also known as an \"open file handle\", the kernel's internal " |
| 626 |
"representation of an open file)." |
| 627 |
msgstr "" |
| 628 |
"المفتاح هو مزيج من رقم واصف الملف ووصف الملف المفتوح (المعروف أيضًا باسم " |
| 629 |
"\"مقبض الملف المفتوح\"، التمثيل الداخلي للنواة لملف مفتوح)." |
| 630 |
|
| 631 |
#. type: Plain text |
| 632 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 633 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 634 |
msgid "" |
| 635 |
"What happens if you register the same file descriptor on an B<epoll> " |
| 636 |
"instance twice?" |
| 637 |
msgstr "ماذا يحدث إذا سجلت نفس واصف الملف على مثيل B<epoll> مرتين؟" |
| 638 |
|
| 639 |
# |
| 640 |
# |
| 641 |
#. But a file descriptor duplicated by fork(2) can't be added to the |
| 642 |
#. set, because the [file *, fd] pair is already in the epoll set. |
| 643 |
#. That is a somewhat ugly inconsistency. On the one hand, a child process |
| 644 |
#. cannot add the duplicate file descriptor to the epoll set. (In every |
| 645 |
#. other case that I can think of, file descriptors duplicated by fork have |
| 646 |
#. similar semantics to file descriptors duplicated by dup() and friends.) On |
| 647 |
#. the other hand, the very fact that the child has a duplicate of the |
| 648 |
#. file descriptor means that even if the parent closes its file descriptor, |
| 649 |
#. then epoll_wait() in the parent will continue to receive notifications for |
| 650 |
#. that file descriptor because of the duplicated file descriptor in the child. |
| 651 |
#. See http://thread.gmane.org/gmane.linux.kernel/596462/ |
| 652 |
#. "epoll design problems with common fork/exec patterns" |
| 653 |
#. mtk, Feb 2008 |
| 654 |
#. type: Plain text |
| 655 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 656 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 657 |
msgid "" |
| 658 |
"You will probably get B<EEXIST>. However, it is possible to add a duplicate " |
| 659 |
"(B<dup>(2), B<dup2>(2), B<fcntl>(2) B<F_DUPFD>) file descriptor to the " |
| 660 |
"same B<epoll> instance. This can be a useful technique for filtering " |
| 661 |
"events, if the duplicate file descriptors are registered with different " |
| 662 |
"I<events> masks." |
| 663 |
msgstr "" |
| 664 |
"ستحصل على الأرجح على B<EEXIST>. ومع ذلك، من الممكن إضافة واصف ملف مكرر " |
| 665 |
"(B<dup>(2), B<dup2>(2), B<fcntl>(2) B<F_DUPFD>) إلى نفس مثيل B<epoll>. " |
| 666 |
"يمكن أن تكون هذه تقنية مفيدة لتصفية الأحداث، إذا سُجلت واصفات الملفات المكررة " |
| 667 |
"بأقنعة I<events> مختلفة." |
| 668 |
|
| 669 |
#. type: Plain text |
| 670 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 671 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 672 |
msgid "" |
| 673 |
"Can two B<epoll> instances wait for the same file descriptor? If so, are " |
| 674 |
"events reported to both B<epoll> file descriptors?" |
| 675 |
msgstr "" |
| 676 |
"هل يمكن لمثيلين من B<epoll> الانتظار لنفس واصف الملف؟ إذا كان الأمر كذلك، هل " |
| 677 |
"يُبلغ عن الأحداث لكلا واصفي ملف B<epoll>؟" |
| 678 |
|
| 679 |
#. type: Plain text |
| 680 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 681 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 682 |
msgid "" |
| 683 |
"Yes, and events would be reported to both. However, careful programming may " |
| 684 |
"be needed to do this correctly." |
| 685 |
msgstr "" |
| 686 |
"نعم، وسيُبلغ عن الأحداث لكليهما. ومع ذلك، قد تكون هناك حاجة إلى برمجة دقيقة " |
| 687 |
"للقيام بذلك بشكل صحيح." |
| 688 |
|
| 689 |
#. type: Plain text |
| 690 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 691 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 692 |
msgid "Is the B<epoll> file descriptor itself poll/epoll/selectable?" |
| 693 |
msgstr "هل واصف ملف B<epoll> نفسه قابل للاستقصاء/epoll/الاختيار؟" |
| 694 |
|
| 695 |
#. type: Plain text |
| 696 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 697 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 698 |
msgid "" |
| 699 |
"Yes. If an B<epoll> file descriptor has events waiting, then it will " |
| 700 |
"indicate as being readable." |
| 701 |
msgstr "" |
| 702 |
"نعم. إذا كان واصف ملف B<epoll> يحتوي على أحداث في انتظار، فسيشير إلى أنه " |
| 703 |
"قابل للقراءة." |
| 704 |
|
| 705 |
#. type: Plain text |
| 706 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 707 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 708 |
msgid "" |
| 709 |
"What happens if one attempts to put an B<epoll> file descriptor into its own " |
| 710 |
"file descriptor set?" |
| 711 |
msgstr "" |
| 712 |
"ماذا يحدث إذا حاول المرء وضع واصف ملف B<epoll> في مجموعة واصفات الملفات " |
| 713 |
"الخاصة به؟" |
| 714 |
|
| 715 |
#. type: Plain text |
| 716 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 717 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 718 |
msgid "" |
| 719 |
"The B<epoll_ctl>(2) call fails (B<EINVAL>). However, you can add an " |
| 720 |
"B<epoll> file descriptor inside another B<epoll> file descriptor set." |
| 721 |
msgstr "" |
| 722 |
"يفشل استدعاء B<epoll_ctl>(2) (B<EINVAL>). ومع ذلك، يمكنك إضافة واصف ملف " |
| 723 |
"B<epoll> داخل مجموعة واصفات ملف B<epoll> أخرى." |
| 724 |
|
| 725 |
#. type: Plain text |
| 726 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 727 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 728 |
msgid "" |
| 729 |
"Can I send an B<epoll> file descriptor over a UNIX domain socket to another " |
| 730 |
"process?" |
| 731 |
msgstr "هل يمكنني إرسال واصف ملف B<epoll> عبر مقبس نطاق UNIX إلى عملية أخرى؟" |
| 732 |
|
| 733 |
#. type: Plain text |
| 734 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 735 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 736 |
msgid "" |
| 737 |
"Yes, but it does not make sense to do this, since the receiving process " |
| 738 |
"would not have copies of the file descriptors in the interest list." |
| 739 |
msgstr "" |
| 740 |
"نعم، ولكن ليس من المنطقي القيام بذلك، لأن العملية المستقبلة لن يكون لديها " |
| 741 |
"نسخ من واصفات الملفات في قائمة الاهتمام." |
| 742 |
|
| 743 |
#. type: Plain text |
| 744 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 745 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 746 |
msgid "" |
| 747 |
"Will closing a file descriptor cause it to be removed from all B<epoll> " |
| 748 |
"interest lists?" |
| 749 |
msgstr "هل سيؤدي إغلاق واصف ملف إلى إزالته من جميع قوائم اهتمام B<epoll>؟" |
| 750 |
|
| 751 |
#. type: Plain text |
| 752 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 753 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 754 |
msgid "" |
| 755 |
"Yes, but be aware of the following point. A file descriptor is a reference " |
| 756 |
"to an open file description (see B<open>(2)). Whenever a file descriptor is " |
| 757 |
"duplicated via B<dup>(2), B<dup2>(2), B<fcntl>(2) B<F_DUPFD>, or " |
| 758 |
"B<fork>(2), a new file descriptor referring to the same open file " |
| 759 |
"description is created. An open file description continues to exist until " |
| 760 |
"all file descriptors referring to it have been closed." |
| 761 |
msgstr "" |
| 762 |
"نعم، ولكن كن على دراية بالنقطة التالية. واصف الملف هو مرجع لوصف ملف مفتوح " |
| 763 |
"(انظر B<open>(2)). كلما كُرر واصف ملف عبر B<dup>(2), B<dup2>(2), " |
| 764 |
"B<fcntl>(2) B<F_DUPFD>, أو B<fork>(2)، يُنشئ واصف ملف جديد يشير إلى نفس وصف " |
| 765 |
"الملف المفتوح. يستمر وصف الملف المفتوح في الوجود حتى تُغلق جميع واصفات " |
| 766 |
"الملفات التي تشير إليه." |
| 767 |
|
| 768 |
#. type: Plain text |
| 769 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 770 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 771 |
msgid "" |
| 772 |
"A file descriptor is removed from an interest list only after all the file " |
| 773 |
"descriptors referring to the underlying open file description have been " |
| 774 |
"closed. This means that even after a file descriptor that is part of an " |
| 775 |
"interest list has been closed, events may be reported for that file " |
| 776 |
"descriptor if other file descriptors referring to the same underlying file " |
| 777 |
"description remain open. To prevent this happening, the file descriptor " |
| 778 |
"must be explicitly removed from the interest list (using B<epoll_ctl>(2) " |
| 779 |
"B<EPOLL_CTL_DEL>) before it is duplicated. Alternatively, the application " |
| 780 |
"must ensure that all file descriptors are closed (which may be difficult if " |
| 781 |
"file descriptors were duplicated behind the scenes by library functions that " |
| 782 |
"used B<dup>(2) or B<fork>(2))." |
| 783 |
msgstr "" |
| 784 |
"يُزال واصف الملف من قائمة الاهتمام فقط بعد إغلاق جميع واصفات الملفات التي " |
| 785 |
"تشير إلى وصف الملف المفتوح الأساسي. هذا يعني أنه حتى بعد إغلاق واصف ملف " |
| 786 |
"يمثل جزءًا من قائمة الاهتمام، قد يُبلغ عن أحداث لذلك واصف الملف إذا بقيت " |
| 787 |
"واصفات ملفات أخرى تشير إلى نفس وصف الملف الأساسي مفتوحة. لمنع حدوث ذلك، يجب " |
| 788 |
"إزالة واصف الملف صراحةً من قائمة الاهتمام (باستخدام B<epoll_ctl>(2) " |
| 789 |
"B<EPOLL_CTL_DEL>) قبل تكراره. بدلاً من ذلك، يجب على التطبيق التأكد من إغلاق " |
| 790 |
"جميع واصفات الملفات (والذي قد يكون صعبًا إذا كُررت واصفات الملفات خلف الكواليس " |
| 791 |
"بواسطة دوال مكتبة استخدمت B<dup>(2) أو B<fork>(2))." |
| 792 |
|
| 793 |
#. type: Plain text |
| 794 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 795 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 796 |
msgid "" |
| 797 |
"If more than one event occurs between B<epoll_wait>(2) calls, are they " |
| 798 |
"combined or reported separately?" |
| 799 |
msgstr "" |
| 800 |
"إذا حدث أكثر من حدث واحد بين استدعاءات B<epoll_wait>(2)، هل تُجمع أم يُبلغ " |
| 801 |
"عنها بشكل منفصل؟" |
| 802 |
|
| 803 |
#. type: Plain text |
| 804 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 805 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 806 |
msgid "They will be combined." |
| 807 |
msgstr "ستُجمع." |
| 808 |
|
| 809 |
#. type: Plain text |
| 810 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 811 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 812 |
msgid "" |
| 813 |
"Does an operation on a file descriptor affect the already collected but not " |
| 814 |
"yet reported events?" |
| 815 |
msgstr "" |
| 816 |
"هل تؤثر عملية على واصف ملف على الأحداث المجموعة فعلًا ولكن لم يُبلغ عنها بعد؟" |
| 817 |
|
| 818 |
#. type: Plain text |
| 819 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 820 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 821 |
msgid "" |
| 822 |
"You can do two operations on an existing file descriptor. Remove would be " |
| 823 |
"meaningless for this case. Modify will reread available I/O." |
| 824 |
msgstr "" |
| 825 |
"يمكنك إجراء عمليتين على واصف ملف موجود. الإزالة ستكون غير ذات معنى لهذه " |
| 826 |
"الحالة. التعديل سيعيد قراءة الإدخال/الإخراج المتاح." |
| 827 |
|
| 828 |
#. type: Plain text |
| 829 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 830 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 831 |
msgid "" |
| 832 |
"Do I need to continuously read/write a file descriptor until B<EAGAIN> when " |
| 833 |
"using the B<EPOLLET> flag (edge-triggered behavior)?" |
| 834 |
msgstr "" |
| 835 |
"هل أحتاج إلى القراءة/الكتابة باستمرار من واصف ملف حتى B<EAGAIN> عند استخدام " |
| 836 |
"علامة B<EPOLLET> (السلوك المحفز بالحافة)؟" |
| 837 |
|
| 838 |
#. type: Plain text |
| 839 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 840 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 841 |
msgid "" |
| 842 |
"Receiving an event from B<epoll_wait>(2) should suggest to you that such " |
| 843 |
"file descriptor is ready for the requested I/O operation. You must consider " |
| 844 |
"it ready until the next (nonblocking) read/write yields B<EAGAIN>. When " |
| 845 |
"and how you will use the file descriptor is entirely up to you." |
| 846 |
msgstr "" |
| 847 |
"استلام حدث من B<epoll_wait>(2) يجب أن يشير لك أن واصف الملف هذا جاهز لعملية " |
| 848 |
"الإدخال/الإخراج المطلوبة. يجب أن تعتبره جاهزًا حتى تؤدي القراءة/الكتابة " |
| 849 |
"التالية (غير المحظورة) إلى B<EAGAIN>. متى وكيف ستستخدم واصف الملف يعود إليك " |
| 850 |
"بالكامل." |
| 851 |
|
| 852 |
#. type: Plain text |
| 853 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 854 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 855 |
msgid "" |
| 856 |
"For packet/token-oriented files (e.g., datagram socket, terminal in " |
| 857 |
"canonical mode), the only way to detect the end of the read/write I/O space " |
| 858 |
"is to continue to read/write until B<EAGAIN>." |
| 859 |
msgstr "" |
| 860 |
"بالنسبة للملفات الموجهة للحزم/الرموز (مثل مقبس البيانات، الطرفية في الوضع " |
| 861 |
"القانوني)، الطريقة الوحيدة لاكتشاف نهاية مساحة الإدخال/الإخراج للقراءة/" |
| 862 |
"الكتابة هي الاستمرار في القراءة/الكتابة حتى B<EAGAIN>." |
| 863 |
|
| 864 |
#. type: Plain text |
| 865 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 866 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 867 |
msgid "" |
| 868 |
"For stream-oriented files (e.g., pipe, FIFO, stream socket), the condition " |
| 869 |
"that the read/write I/O space is exhausted can also be detected by checking " |
| 870 |
"the amount of data read from / written to the target file descriptor. For " |
| 871 |
"example, if you call B<read>(2) by asking to read a certain amount of data " |
| 872 |
"and B<read>(2) returns a lower number of bytes, you can be sure of having " |
| 873 |
"exhausted the read I/O space for the file descriptor. The same is true when " |
| 874 |
"writing using B<write>(2). (Avoid this latter technique if you cannot " |
| 875 |
"guarantee that the monitored file descriptor always refers to a stream-" |
| 876 |
"oriented file.)" |
| 877 |
msgstr "" |
| 878 |
"بالنسبة للملفات الموجهة للتيار (مثل الأنبوب، FIFO، مقبس التيار)، يمكن أيضًا " |
| 879 |
"اكتشاف حالة استنفاد مساحة الإدخال/الإخراج للقراءة/الكتابة عن طريق التحقق من " |
| 880 |
"كمية البيانات المقروءة من / المكتوبة إلى واصف الملف الهدف. على سبيل المثال، " |
| 881 |
"إذا استدعيت B<read>(2) لطلب قراءة كمية معينة من البيانات وأرجعت B<read>(2) " |
| 882 |
"عددًا أقل من البايتات، يمكنك التأكد من استنفاد مساحة الإدخال/الإخراج للقراءة " |
| 883 |
"لواصف الملف. نفس الشيء صحيح عند الكتابة باستخدام B<write>(2). (تجنب هذه " |
| 884 |
"التقنية الأخيرة إذا لم تستطع ضمان أن واصف الملف المراقب يشير دائمًا إلى ملف " |
| 885 |
"موجه للتيار.)" |
| 886 |
|
| 887 |
#. type: SS |
| 888 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 889 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 890 |
#, no-wrap |
| 891 |
msgid "Possible pitfalls and ways to avoid them" |
| 892 |
msgstr "المزالق المحتملة وطرق تجنبها" |
| 893 |
|
| 894 |
#. type: Plain text |
| 895 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 896 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 897 |
msgid "B<Starvation (edge-triggered)>" |
| 898 |
msgstr "B<التجويع (محفز بالحافة)>" |
| 899 |
|
| 900 |
#. type: Plain text |
| 901 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 902 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 903 |
msgid "" |
| 904 |
"If there is a large amount of I/O space, it is possible that by trying to " |
| 905 |
"drain it the other files will not get processed causing starvation. (This " |
| 906 |
"problem is not specific to B<epoll>.)" |
| 907 |
msgstr "" |
| 908 |
"إذا كانت هناك كمية كبيرة من مساحة الإدخال/الإخراج، فمن الممكن أن يؤدي محاولة " |
| 909 |
"تفريغها إلى عدم معالجة الملفات الأخرى مما يسبب التجويع. (هذه المشكلة ليست " |
| 910 |
"خاصة بـ B<epoll>.)" |
| 911 |
|
| 912 |
#. type: Plain text |
| 913 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 914 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 915 |
msgid "" |
| 916 |
"The solution is to maintain a ready list and mark the file descriptor as " |
| 917 |
"ready in its associated data structure, thereby allowing the application to " |
| 918 |
"remember which files need to be processed but still round robin amongst all " |
| 919 |
"the ready files. This also supports ignoring subsequent events you receive " |
| 920 |
"for file descriptors that are already ready." |
| 921 |
msgstr "" |
| 922 |
"الحل هو الاحتفاظ بقائمة جاهزة ووضع علامة على واصف الملف كجاهز في بنية " |
| 923 |
"البيانات المرتبطة به، مما يسمح للتطبيق بتذكر الملفات التي تحتاج إلى معالجة " |
| 924 |
"ولكن مع الاستمرار في التناوب الدائري بين جميع الملفات الجاهزة. هذا يدعم أيضًا " |
| 925 |
"تجاهل الأحداث اللاحقة التي تستلمها لواصفات الملفات الجاهزة بالفعل." |
| 926 |
|
| 927 |
#. type: Plain text |
| 928 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 929 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 930 |
msgid "B<If using an event cache...>" |
| 931 |
msgstr "B<إذا كنت تستخدم خبيئة أحداث...>" |
| 932 |
|
| 933 |
#. type: Plain text |
| 934 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 935 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 936 |
msgid "" |
| 937 |
"If you use an event cache or store all the file descriptors returned from " |
| 938 |
"B<epoll_wait>(2), then make sure to provide a way to mark its closure " |
| 939 |
"dynamically (i.e., caused by a previous event's processing). Suppose you " |
| 940 |
"receive 100 events from B<epoll_wait>(2), and in event #47 a condition " |
| 941 |
"causes event #13 to be closed. If you remove the structure and B<close>(2) " |
| 942 |
"the file descriptor for event #13, then your event cache might still say " |
| 943 |
"there are events waiting for that file descriptor causing confusion." |
| 944 |
msgstr "" |
| 945 |
"إذا كنت تستخدم خبيئة أحداث أو تخزن جميع واصفات الملفات المعادة من " |
| 946 |
"B<epoll_wait>(2)، فتأكد من توفير طريقة لوضع علامة على إغلاقها ديناميكيًا (أي " |
| 947 |
"ناتج عن معالجة حدث سابق). افترض أنك تستلم 100 حدث من B<epoll_wait>(2)، وفي " |
| 948 |
"الحدث #47 تسبب حالة في إغلاق الحدث #13. إذا أزلت البنية واستدعيت B<close>(2) " |
| 949 |
"لواصف الملف للحدث #13، فقد تظل خبيئة الأحداث تقول أن هناك أحداثًا تنتظر واصف " |
| 950 |
"الملف هذا مما يسبب ارتباكًا." |
| 951 |
|
| 952 |
#. type: Plain text |
| 953 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 954 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 955 |
msgid "" |
| 956 |
"One solution for this is to call, during the processing of event 47, " |
| 957 |
"B<epoll_ctl>(B<EPOLL_CTL_DEL>) to delete file descriptor 13 and " |
| 958 |
"B<close>(2), then mark its associated data structure as removed and link it " |
| 959 |
"to a cleanup list. If you find another event for file descriptor 13 in your " |
| 960 |
"batch processing, you will discover the file descriptor had been previously " |
| 961 |
"removed and there will be no confusion." |
| 962 |
msgstr "" |
| 963 |
"أحد الحلول لذلك هو استدعاء، أثناء معالجة الحدث 47، " |
| 964 |
"B<epoll_ctl>(B<EPOLL_CTL_DEL>) لحذف واصف الملف 13 و B<close>(2)، ثم وضع " |
| 965 |
"علامة على بنية البيانات المرتبطة به كمزالة وربطها بقائمة تنظيف. إذا وجدت " |
| 966 |
"حدثًا آخر لواصف الملف 13 في معالجتك الدفعية، ستكتشف أن واصف الملف قد أزيل " |
| 967 |
"سابقًا ولن يكون هناك ارتباك." |
| 968 |
|
| 969 |
#. type: SH |
| 970 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 971 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 972 |
#, no-wrap |
| 973 |
msgid "VERSIONS" |
| 974 |
msgstr "الإصدارات" |
| 975 |
|
| 976 |
#. type: Plain text |
| 977 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 978 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 979 |
msgid "" |
| 980 |
"Some other systems provide similar mechanisms; for example, FreeBSD has " |
| 981 |
"I<kqueue>, and Solaris has I</dev/poll>." |
| 982 |
msgstr "" |
| 983 |
"بعض الأنظمة الأخرى توفر آليات مماثلة؛ على سبيل المثال، FreeBSD لديها " |
| 984 |
"I<kqueue>، وSolaris لديها I</dev/poll>." |
| 985 |
|
| 986 |
#. type: SH |
| 987 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 988 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 989 |
#, no-wrap |
| 990 |
msgid "STANDARDS" |
| 991 |
msgstr "المعايير" |
| 992 |
|
| 993 |
#. type: Plain text |
| 994 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 995 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 996 |
msgid "Linux." |
| 997 |
msgstr "لينكس." |
| 998 |
|
| 999 |
#. type: SH |
| 1000 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1001 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1002 |
#, no-wrap |
| 1003 |
msgid "HISTORY" |
| 1004 |
msgstr "التاريخ" |
| 1005 |
|
| 1006 |
#. Its interface should be finalized in Linux 2.5.66. |
| 1007 |
#. type: Plain text |
| 1008 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1009 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1010 |
msgid "Linux 2.5.44. glibc 2.3.2." |
| 1011 |
msgstr "لينكس 2.5.44. glibc 2.3.2." |
| 1012 |
|
| 1013 |
#. type: SH |
| 1014 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1015 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1016 |
#, no-wrap |
| 1017 |
msgid "NOTES" |
| 1018 |
msgstr "ملاحظات" |
| 1019 |
|
| 1020 |
#. type: Plain text |
| 1021 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1022 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1023 |
msgid "" |
| 1024 |
"The set of file descriptors that is being monitored via an epoll file " |
| 1025 |
"descriptor can be viewed via the entry for the epoll file descriptor in the " |
| 1026 |
"process's I</proc/>pidI</fdinfo> directory. See B<proc>(5) for further " |
| 1027 |
"details." |
| 1028 |
msgstr "" |
| 1029 |
"يمكن عرض مجموعة واصفات الملفات المُراقبة عبر واصف ملف epoll من خلال الإدخال " |
| 1030 |
"الخاص بواصف ملف epoll في دليل I</proc/>pidI</fdinfo> للعملية. انظر " |
| 1031 |
"B<proc>(5) لمزيد من التفاصيل." |
| 1032 |
|
| 1033 |
#. type: Plain text |
| 1034 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1035 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1036 |
msgid "" |
| 1037 |
"The B<kcmp>(2) B<KCMP_EPOLL_TFD> operation can be used to test whether a " |
| 1038 |
"file descriptor is present in an epoll instance." |
| 1039 |
msgstr "" |
| 1040 |
"يمكن استخدام عملية B<kcmp>(2) B<KCMP_EPOLL_TFD> لاختبار ما إذا كان واصف ملف " |
| 1041 |
"موجودًا في مثيل epoll." |
| 1042 |
|
| 1043 |
#. type: SH |
| 1044 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1045 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1046 |
#, no-wrap |
| 1047 |
msgid "SEE ALSO" |
| 1048 |
msgstr "انظر أيضًا" |
| 1049 |
|
| 1050 |
#. type: Plain text |
| 1051 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1052 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1053 |
msgid "" |
| 1054 |
"B<epoll_create>(2), B<epoll_create1>(2), B<epoll_ctl>(2), B<epoll_wait>(2), " |
| 1055 |
"B<ioctl_eventpoll>(2), B<poll>(2), B<select>(2)" |
| 1056 |
msgstr "" |
| 1057 |
"B<epoll_create>(2)، B<epoll_create1>(2)، B<epoll_ctl>(2)، B<epoll_wait>(2)، " |
| 1058 |
"B<ioctl_eventpoll>(2)، B<poll>(2)، B<select>(2)" |
| 1059 |
|
| 1060 |
#. type: TH |
| 1061 |
#: debian-trixie |
| 1062 |
#, no-wrap |
| 1063 |
msgid "2024-06-12" |
| 1064 |
msgstr "12 يونيو 2024" |
| 1065 |
|
| 1066 |
#. type: TH |
| 1067 |
#: debian-trixie |
| 1068 |
#, no-wrap |
| 1069 |
msgid "Linux man-pages 6.9.1" |
| 1070 |
msgstr "صفحات دليل لينكس 6.9.1" |
| 1071 |
|
| 1072 |
#. type: Plain text |
| 1073 |
#: debian-trixie |
| 1074 |
msgid "" |
| 1075 |
"If the I<rfd> file descriptor has been added to the B<epoll> interface using " |
| 1076 |
"the B<EPOLLET> (edge-triggered) flag, the call to B<epoll_wait>(2) done in " |
| 1077 |
"step B<5> will probably hang despite the available data still present in the " |
| 1078 |
"file input buffer; meanwhile the remote peer might be expecting a response " |
| 1079 |
"based on the data it already sent. The reason for this is that edge-" |
| 1080 |
"triggered mode delivers events only when changes occur on the monitored file " |
| 1081 |
"descriptor. So, in step B<5> the caller might end up waiting for some data " |
| 1082 |
"that is already present inside the input buffer. In the above example, an " |
| 1083 |
"event on I<rfd> will be generated because of the write done in B<2> and the " |
| 1084 |
"event is consumed in B<3>. Since the read operation done in B<4> does not " |
| 1085 |
"consume the whole buffer data, the call to B<epoll_wait>(2) done in step " |
| 1086 |
"B<5> might block indefinitely." |
| 1087 |
msgstr "" |
| 1088 |
"إذا أُضيف واصف الملف I<rfd> إلى واجهة B<epoll> باستخدام علامة B<EPOLLET> " |
| 1089 |
"(محفز بالحافة)، فمن المحتمل أن يتعطل استدعاء B<epoll_wait>(2) الذي تم في " |
| 1090 |
"الخطوة B<5> على الرغم من وجود البيانات المتاحة في مخزن الإدخال المؤقت للملف؛ " |
| 1091 |
"في هذه الأثناء قد يتوقع النظير البعيد استجابة بناءً على البيانات التي أرسلها " |
| 1092 |
"بالفعل. السبب في ذلك هو أن الوضع المحفز بالحافة يسلم الأحداث فقط عند حدوث " |
| 1093 |
"تغييرات على واصف الملف المراقب. لذا، في الخطوة B<5> قد ينتهي الأمر بالمتصل " |
| 1094 |
"بانتظار بعض البيانات الموجودة بالفعل داخل مخزن الإدخال المؤقت. في المثال " |
| 1095 |
"أعلاه، سيُنشئ حدث على I<rfd> بسبب الكتابة التي تمت في B<2> ويُستهلك الحدث في " |
| 1096 |
"B<3>. نظرًا لأن عملية القراءة التي تمت في B<4> لا تستهلك بيانات المخزن المؤقت " |
| 1097 |
"بالكامل، فقد يُحظر استدعاء B<epoll_wait>(2) الذي تم في الخطوة B<5> إلى أجل " |
| 1098 |
"غير مسمى." |
| 1099 |
|
| 1100 |
#. type: Plain text |
| 1101 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1102 |
#, no-wrap |
| 1103 |
msgid "" |
| 1104 |
"#define MAX_EVENTS 10\n" |
| 1105 |
"struct epoll_event ev, events[MAX_EVENTS];\n" |
| 1106 |
"int listen_sock, conn_sock, nfds, epollfd;\n" |
| 1107 |
"\\&\n" |
| 1108 |
"/* Code to set up listening socket, \\[aq]listen_sock\\[aq],\n" |
| 1109 |
" (socket(), bind(), listen()) omitted. */\n" |
| 1110 |
"\\&\n" |
| 1111 |
"epollfd = epoll_create1(0);\n" |
| 1112 |
"if (epollfd == -1) {\n" |
| 1113 |
" perror(\"epoll_create1\");\n" |
| 1114 |
" exit(EXIT_FAILURE);\n" |
| 1115 |
"}\n" |
| 1116 |
"\\&\n" |
| 1117 |
"ev.events = EPOLLIN;\n" |
| 1118 |
"ev.data.fd = listen_sock;\n" |
| 1119 |
"if (epoll_ctl(epollfd, EPOLL_CTL_ADD, listen_sock, &ev) == -1) {\n" |
| 1120 |
" perror(\"epoll_ctl: listen_sock\");\n" |
| 1121 |
" exit(EXIT_FAILURE);\n" |
| 1122 |
"}\n" |
| 1123 |
"\\&\n" |
| 1124 |
"for (;;) {\n" |
| 1125 |
" nfds = epoll_wait(epollfd, events, MAX_EVENTS, -1);\n" |
| 1126 |
" if (nfds == -1) {\n" |
| 1127 |
" perror(\"epoll_wait\");\n" |
| 1128 |
" exit(EXIT_FAILURE);\n" |
| 1129 |
" }\n" |
| 1130 |
"\\&\n" |
| 1131 |
" for (n = 0; n E<lt> nfds; ++n) {\n" |
| 1132 |
" if (events[n].data.fd == listen_sock) {\n" |
| 1133 |
" conn_sock = accept(listen_sock,\n" |
| 1134 |
" (struct sockaddr *) &addr, &addrlen);\n" |
| 1135 |
" if (conn_sock == -1) {\n" |
| 1136 |
" perror(\"accept\");\n" |
| 1137 |
" exit(EXIT_FAILURE);\n" |
| 1138 |
" }\n" |
| 1139 |
" setnonblocking(conn_sock);\n" |
| 1140 |
" ev.events = EPOLLIN | EPOLLET;\n" |
| 1141 |
" ev.data.fd = conn_sock;\n" |
| 1142 |
" if (epoll_ctl(epollfd, EPOLL_CTL_ADD, conn_sock,\n" |
| 1143 |
" &ev) == -1) {\n" |
| 1144 |
" perror(\"epoll_ctl: conn_sock\");\n" |
| 1145 |
" exit(EXIT_FAILURE);\n" |
| 1146 |
" }\n" |
| 1147 |
" } else {\n" |
| 1148 |
" do_use_fd(events[n].data.fd);\n" |
| 1149 |
" }\n" |
| 1150 |
" }\n" |
| 1151 |
"}\n" |
| 1152 |
msgstr "" |
| 1153 |
"#define MAX_EVENTS 10\n" |
| 1154 |
"struct epoll_event ev, events[MAX_EVENTS];\n" |
| 1155 |
"int listen_sock, conn_sock, nfds, epollfd;\n" |
| 1156 |
"\\&\n" |
| 1157 |
"/* Code to set up listening socket, \\[aq]listen_sock\\[aq],\n" |
| 1158 |
" (socket(), bind(), listen()) omitted. */\n" |
| 1159 |
"\\&\n" |
| 1160 |
"epollfd = epoll_create1(0);\n" |
| 1161 |
"if (epollfd == -1) {\n" |
| 1162 |
" perror(\"epoll_create1\");\n" |
| 1163 |
" exit(EXIT_FAILURE);\n" |
| 1164 |
"}\n" |
| 1165 |
"\\&\n" |
| 1166 |
"ev.events = EPOLLIN;\n" |
| 1167 |
"ev.data.fd = listen_sock;\n" |
| 1168 |
"if (epoll_ctl(epollfd, EPOLL_CTL_ADD, listen_sock, &ev) == -1) {\n" |
| 1169 |
" perror(\"epoll_ctl: listen_sock\");\n" |
| 1170 |
" exit(EXIT_FAILURE);\n" |
| 1171 |
"}\n" |
| 1172 |
"\\&\n" |
| 1173 |
"for (;;) {\n" |
| 1174 |
" nfds = epoll_wait(epollfd, events, MAX_EVENTS, -1);\n" |
| 1175 |
" if (nfds == -1) {\n" |
| 1176 |
" perror(\"epoll_wait\");\n" |
| 1177 |
" exit(EXIT_FAILURE);\n" |
| 1178 |
" }\n" |
| 1179 |
"\\&\n" |
| 1180 |
" for (n = 0; n E<lt> nfds; ++n) {\n" |
| 1181 |
" if (events[n].data.fd == listen_sock) {\n" |
| 1182 |
" conn_sock = accept(listen_sock,\n" |
| 1183 |
" (struct sockaddr *) &addr, &addrlen);\n" |
| 1184 |
" if (conn_sock == -1) {\n" |
| 1185 |
" perror(\"accept\");\n" |
| 1186 |
" exit(EXIT_FAILURE);\n" |
| 1187 |
" }\n" |
| 1188 |
" setnonblocking(conn_sock);\n" |
| 1189 |
" ev.events = EPOLLIN | EPOLLET;\n" |
| 1190 |
" ev.data.fd = conn_sock;\n" |
| 1191 |
" if (epoll_ctl(epollfd, EPOLL_CTL_ADD, conn_sock,\n" |
| 1192 |
" &ev) == -1) {\n" |
| 1193 |
" perror(\"epoll_ctl: conn_sock\");\n" |
| 1194 |
" exit(EXIT_FAILURE);\n" |
| 1195 |
" }\n" |
| 1196 |
" } else {\n" |
| 1197 |
" do_use_fd(events[n].data.fd);\n" |
| 1198 |
" }\n" |
| 1199 |
" }\n" |
| 1200 |
"}\n" |
| 1201 |
|
| 1202 |
#. type: TH |
| 1203 |
#: fedora-44 fedora-rawhide |
| 1204 |
#, no-wrap |
| 1205 |
msgid "2024-08-21" |
| 1206 |
msgstr "21 أغسطس 2024" |
| 1207 |
|
| 1208 |
#. type: TH |
| 1209 |
#: fedora-44 fedora-rawhide |
| 1210 |
#, no-wrap |
| 1211 |
msgid "Linux man-pages 6.13" |
| 1212 |
msgstr "صفحات دليل لينكس 6.13" |
| 1213 |
|
| 1214 |
#. type: TH |
| 1215 |
#: mageia-cauldron |
| 1216 |
#, no-wrap |
| 1217 |
msgid "Linux man-pages 6.17" |
| 1218 |
msgstr "صفحات دليل لينكس 6.17" |
| 1219 |
|
| 1220 |
#. type: TH |
| 1221 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1222 |
#, no-wrap |
| 1223 |
msgid "Linux man-pages (unreleased)" |
| 1224 |
msgstr "صفحات دليل لينكس (لم تصدر بعد)" |