# Arabic translation of manpages # This file is distributed under the same license as the manpages-l10n package. # Copyright © of this file: # زايد السعيدي , 2026. msgid "" msgstr "" "Project-Id-Version: manpages-l10n 4.30.2\n" "POT-Creation-Date: 2026-06-05 06:43+0200\n" "PO-Revision-Date: 2026-05-18 18:08+0400\n" "Last-Translator: Zayed Al-Saidi \n" "Language-Team: Arabic \n" "Language: ar\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" "X-Generator: Lokalize 23.08.5\n" #. type: TH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "signalfd" msgstr "signalfd" #. type: TH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "2026-02-08" msgstr "8 فبراير 2026" #. type: TH #: archlinux debian-unstable #, no-wrap msgid "Linux man-pages 6.18" msgstr "صفحات دليل لينكس 6.18" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "الاسم" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "signalfd - create a file descriptor for accepting signals" msgstr "signalfd - إنشاء واصف ملف لقبول الإشارات" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "المكتبة" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "Standard C library (I,\\ I<-lc>)" msgstr "مكتبة سي المعيارية (I،\\ I<-lc>)" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "موجز" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B<#include Esys/signalfd.hE>\n" msgstr "B<#include Esys/signalfd.hE>\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "BIB<, const sigset_t *>IB<, int >IB<);>\n" msgstr "BIB<, const sigset_t *>IB<, int >IB<);>\n" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "الوصف" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B() creates a file descriptor that can be used to accept signals " "targeted at the caller. This provides an alternative to the use of a signal " "handler or B(2), and has the advantage that the file descriptor " "may be monitored by B(2) وB(2) وB(7)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The I argument specifies the set of signals that the caller wishes to " "accept via the file descriptor. This argument is a signal set whose " "contents can be initialized using the macros described in B(3). " "Normally, the set of signals to be received via the file descriptor should " "be blocked using B(2), to prevent the signals being handled " "according to their default dispositions. It is not possible to receive " "B or B signals via a signalfd file descriptor; these " "signals are silently ignored if specified in I." msgstr "" "تحدد الوسيطة I مجموعة الإشارات التي يرغب المستدعي في قبولها عبر واصف " "الملف. هذه الوسيطة هي مجموعة إشارات يمكن تهيئة محتوياتها باستخدام الكليّات " "الموصوفة في B(3). عادةً، يجب حظر مجموعة الإشارات المراد استقبالها " "عبر واصف الملف باستخدام B(2)، لمنع معالجة الإشارات وفقًا " "لترتيباتها المبدئية. لا يمكن استقبال إشارات B أو B عبر " "واصف ملف signalfd؛ يتم تجاهل هذه الإشارات بصمت إذا تم تحديدها في I." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If the I argument is -1, then the call creates a new file descriptor and " "associates the signal set specified in I with that file descriptor. " "If I is not -1, then it must specify a valid existing signalfd file " "descriptor, and I is used to replace the signal set associated with " "that file descriptor." msgstr "" "إذا كانت الوسيطة I هي -1، فإن الاستدعاء ينشئ واصف ملف جديدًا ويربط مجموعة " "الإشارات المحددة في I بذلك الواصف. إذا لم تكن I هي -1، فيجب أن " "تحدد واصف ملف signalfd موجودًا صالحًا، ويتم استخدام I لاستبدال مجموعة " "الإشارات المرتبطة بذلك الواصف." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Starting with Linux 2.6.27, the following values may be bitwise ORed in " "I to change the behavior of B():" msgstr "" "بدءًا من لينكس 2.6.27، يمكن إجراء عملية OR بتية للقيم التالية في I " "لتغيير سلوك B():" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Set the B file status flag on the open file description (see " "B(2)) referred to by the new file descriptor. Using this flag saves " "extra calls to B(2) to achieve the same result." msgstr "" "اضبط علامة حالة الملف B على وصف الملف المفتوح (انظر B(2)) " "المشار إليه بواسطة واصف الملف الجديد. استخدام هذه العلامة يوفر استدعاءات " "إضافية لـ B(2) لتحقيق النتيجة نفسها." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Set the close-on-exec (B) flag on the new file descriptor. See " "the description of the B flag in B(2) for reasons why this " "may be useful." msgstr "" "اضبط علامة الإغلاق عند التنفيذ (B) على واصف الملف الجديد. انظر " "وصف العلامة B في B(2) للأسباب التي تجعل هذا مفيدًا." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Up to Linux 2.6.26, the I argument is unused, and must be specified " "as zero." msgstr "حتى لينكس 2.6.26، معطى I غير مستخدم، ويجب تحديده كصفر." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B() returns a file descriptor that supports the following " "operations:" msgstr "ترجع B() واصف ملف يدعم العمليات التالية:" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B(2)" msgstr "B(2)" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If one or more of the signals specified in I is pending for the " "process, then the buffer supplied to B(2) is used to return one or " "more I structures (see below) that describe the signals. " "The B(2) returns information for as many signals as are pending and " "will fit in the supplied buffer. The buffer must be at least " "I bytes. The return value of the " "B(2) is the total number of bytes read." msgstr "" "إذا كانت إشارة واحدة أو أكثر من الإشارات المحددة في I معلقة للعملية، " "يتم استخدام المخزن المؤقت المقدم إلى B(2) لإرجاع بنية أو أكثر من بنى " "I (انظر أدناه) التي تصف الإشارات. يرجع B(2) معلومات " "لعدد الإشارات المعلقة والتي تناسب المخزن المؤقت المقدم. يجب أن يكون المخزن " "المؤقت على الأقل I بايت. قيمة إرجاع " "B(2) هي إجمالي عدد البايتات المقروءة." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "As a consequence of the B(2), the signals are consumed, so that they " "are no longer pending for the process (i.e., will not be caught by signal " "handlers, and cannot be accepted using B(2))." msgstr "" "نتيجة لـ B(2)، يتم استهلاك الإشارات، بحيث لا تبقى معلقة للعملية (أي لن " "يتم التقاطها بواسطة معالجات الإشارات، ولا يمكن قبولها باستخدام " "B(2))." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If none of the signals in I is pending for the process, then the " "B(2) either blocks until one of the signals in I is generated " "for the process, or fails with the error B if the file descriptor " "has been made nonblocking." msgstr "" "إذا لم تكن أي من الإشارات في I معلقة للعملية، فإن B(2) إما أن " "يحظر حتى يتم توليد إشارة من الإشارات في I للعملية، أو يفشل مع الخطأ " "B إذا تم جعل واصف الملف غير محظور." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B(2)" msgstr "B(2)" #. type: TQ #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B(2)" #. type: TQ #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "(and similar)" msgstr "(وما شابه ذلك)" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The file descriptor is readable (the B(2) I؛ علم B(2) " "B) إذا كانت إشارة واحدة أو أكثر من الإشارات في I معلقة للعملية." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The signalfd file descriptor also supports the other file-descriptor " "multiplexing APIs: B(2), B(2), and B(7)." msgstr "" "يدعم واصف ملف signalfd أيضًا واجهات برمجة تطبيقات تعدد إرسال واصفات الملف " "الأخرى: B(2) وB(2) وB(7)." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B(2)" msgstr "B(2)" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "When the file descriptor is no longer required it should be closed. When " "all file descriptors associated with the same signalfd object have been " "closed, the resources for object are freed by the kernel." msgstr "" "عندما لا يكون واصف الملف مطلوبًا بعد الآن، يجب إغلاقه. عندما يتم إغلاق جميع " "واصفات الملف المرتبطة بنفس كائن signalfd، يتم تحرير موارد الكائن بواسطة " "النواة." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "The signalfd_siginfo structure" msgstr "بنية signalfd_siginfo" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The format of the I structure(s) returned by B(2)s " "from a signalfd file descriptor is as follows:" msgstr "" "تنسيق بنية (بنى) I التي ترجعها عمليات B(2) من واصف " "ملف signalfd هو كما يلي:" #. ssi_trapno is unused on most arches #. ssi_addr_lsb: commit b8aeec34175fc8fe8b0d40efea4846dfc1ba663e #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "struct signalfd_siginfo {\n" " uint32_t ssi_signo; /* Signal number */\n" " int32_t ssi_errno; /* Error number (unused) */\n" " int32_t ssi_code; /* Signal code */\n" " uint32_t ssi_pid; /* PID of sender */\n" " uint32_t ssi_uid; /* Real UID of sender */\n" " int32_t ssi_fd; /* File descriptor (SIGIO) */\n" " uint32_t ssi_tid; /* Kernel timer ID (POSIX timers)\n" " uint32_t ssi_band; /* Band event (SIGIO) */\n" " uint32_t ssi_overrun; /* POSIX timer overrun count */\n" " uint32_t ssi_trapno; /* Trap number that caused signal */\n" " int32_t ssi_status; /* Exit status or signal (SIGCHLD) */\n" " int32_t ssi_int; /* Integer sent by sigqueue(3) */\n" " uint64_t ssi_ptr; /* Pointer sent by sigqueue(3) */\n" " uint64_t ssi_utime; /* User CPU time consumed (SIGCHLD) */\n" " uint64_t ssi_stime; /* System CPU time consumed\n" " (SIGCHLD) */\n" " uint64_t ssi_addr; /* Address that generated signal\n" " (for hardware-generated signals) */\n" " uint16_t ssi_addr_lsb; /* Least significant bit of address\n" " (SIGBUS; since Linux 2.6.37) */\n" " uint8_t pad[\\f[I]X\\fR]; /* Pad size to 128 bytes (allow for\n" " additional fields in the future) */\n" "};\n" msgstr "" "struct signalfd_siginfo {\n" " uint32_t ssi_signo; /* Signal number */\n" " int32_t ssi_errno; /* Error number (unused) */\n" " int32_t ssi_code; /* Signal code */\n" " uint32_t ssi_pid; /* PID of sender */\n" " uint32_t ssi_uid; /* Real UID of sender */\n" " int32_t ssi_fd; /* File descriptor (SIGIO) */\n" " uint32_t ssi_tid; /* Kernel timer ID (POSIX timers)\n" " uint32_t ssi_band; /* Band event (SIGIO) */\n" " uint32_t ssi_overrun; /* POSIX timer overrun count */\n" " uint32_t ssi_trapno; /* Trap number that caused signal */\n" " int32_t ssi_status; /* Exit status or signal (SIGCHLD) */\n" " int32_t ssi_int; /* Integer sent by sigqueue(3) */\n" " uint64_t ssi_ptr; /* Pointer sent by sigqueue(3) */\n" " uint64_t ssi_utime; /* User CPU time consumed (SIGCHLD) */\n" " uint64_t ssi_stime; /* System CPU time consumed\n" " (SIGCHLD) */\n" " uint64_t ssi_addr; /* Address that generated signal\n" " (for hardware-generated signals) */\n" " uint16_t ssi_addr_lsb; /* Least significant bit of address\n" " (SIGBUS; since Linux 2.6.37) */\n" " uint8_t pad[\\f[I]X\\fR]; /* Pad size to 128 bytes (allow for\n" " additional fields in the future) */\n" "};\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Each of the fields in this structure is analogous to the similarly named " "field in the I structure. The I structure is " "described in B(2). Not all fields in the returned " "I structure will be valid for a specific signal; the set " "of valid fields can be determined from the value returned in the I " "field. This field is the analog of the I I field; see " "B(2) for details." msgstr "" "كل حقل من الحقول في هذه البنية مماثل للحقل المسمى بالمثل في بنية " "I. يتم وصف بنية I في B(2). لن تكون جميع " "الحقول في بنية I المرتجعة صالحة لإشارة محددة؛ يمكن تحديد " "مجموعة الحقول الصالحة من القيمة المرتجعة في حقل I. هذا الحقل هو " "مماثل لحقل I في I؛ انظر B(2) للتفاصيل." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "fork(2) semantics" msgstr "دلالات fork(2)" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "After a B(2), the child inherits a copy of the signalfd file " "descriptor. A B(2) from the file descriptor in the child will return " "information about signals queued to the child." msgstr "" "بعد B(2)، يرث الطفل نسخة من واصف ملف signalfd. سترجع عملية B(2) " "من واصف الملف في الطفل معلومات حول الإشارات المنتظرة للطفل." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Semantics of file descriptor passing" msgstr "دلالات تمرير واصف الملف" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "As with other file descriptors, signalfd file descriptors can be passed to " "another process via a UNIX domain socket (see B(7)). In the receiving " "process, a B(2) from the received file descriptor will return " "information about signals queued to that process." msgstr "" "كما هو الحال مع واصفات الملف الأخرى، يمكن تمرير واصفات ملف signalfd إلى " "عملية أخرى عبر مقبس نطاق UNIX (انظر B(7)). في العملية المستقبلة، سترجع " "عملية B(2) من واصف الملف المستلم معلومات حول الإشارات المنتظرة لتلك " "العملية." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "execve(2) semantics" msgstr "دلالات execve(2)" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Just like any other file descriptor, a signalfd file descriptor remains open " "across an B(2), unless it has been marked for close-on-exec (see " "B(2)). Any signals that were available for reading before the " "B(2) remain available to the newly loaded program. (This is " "analogous to traditional signal semantics, where a blocked signal that is " "pending remains pending across an B(2).)" msgstr "" "تمامًا مثل أي واصف ملف آخر، يظل واصف ملف signalfd مفتوحًا عبر B(2)، ما " "لم يتم وضع علامة عليه للإغلاق عند التنفيذ (انظر B(2)). أي إشارات كانت " "متاحة للقراءة قبل B(2) تظل متاحة للبرنامج المحمل حديثًا. (هذا مماثل " "لدلالات الإشارات التقليدية، حيث تظل الإشارة المحظورة المعلقة معلقة عبر " "B(2).)" #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Thread semantics" msgstr "دلالات الخيوط" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The semantics of signalfd file descriptors in a multithreaded program mirror " "the standard semantics for signals. In other words, when a thread reads " "from a signalfd file descriptor, it will read the signals that are directed " "to the thread itself and the signals that are directed to the process (i.e., " "the entire thread group). (A thread will not be able to read signals that " "are directed to other threads in the process.)" msgstr "" "دلالات واصفات ملف signalfd في برنامج متعدد الخيوط تعكس الدلالات القياسية " "للإشارات. بعبارة أخرى، عندما يقرأ خيط من واصف ملف signalfd، سيقرأ الإشارات " "الموجهة للخيط نفسه والإشارات الموجهة للعملية (أي مجموعة الخيوط بأكملها). (لن " "يتمكن الخيط من قراءة الإشارات الموجهة لخيوط أخرى في العملية.)" #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "epoll(7) semantics" msgstr "دلالات epoll(7)" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If a process adds (via B(2)) a signalfd file descriptor to an " "B(7) instance, then B(2) returns events only for " "signals sent to that process. In particular, if the process then uses " "B(2) to create a child process, then the child will be able to " "B(2) signals that are sent to it using the signalfd file descriptor, " "but B(2) will B indicate that the signalfd file descriptor " "is ready. In this scenario, a possible workaround is that after the " "B(2), the child process can close the signalfd file descriptor that it " "inherited from the parent process and then create another signalfd file " "descriptor and add it to the epoll instance. Alternatively, the parent and " "the child could delay creating their (separate) signalfd file descriptors " "and adding them to the epoll instance until after the call to B(2)." msgstr "" "إذا أضافت عملية ما (عبر B(2)) مُعرف ملف signalfd إلى مثيل " "B(7)، فإن B(2) تُرجع الأحداث الخاصة فقط بالإشارات المرسلة " "إلى تلك العملية. وعلى وجه الخصوص، إذا استخدمت العملية بعد ذلك B(2) " "لإنشاء عملية فرعية، فستتمكن العملية الفرعية من B(2) الإشارات المرسلة " "إليها باستخدام واصف الملف signalfd، ولكن B(2) لن تشير إلى أن " "واصف الملف signalfd جاهز. في هذا السيناريو، هناك حل بديل ممكن وهو أنه بعد " "B(2)، يمكن للعملية الفرعية إغلاق واصف الملف signalfd الذي ورثته من " "العملية الأم ثم إنشاء واصف ملف signalfd آخر وإضافته إلى مثيل epoll. بدلاً من " "ذلك، يمكن للعملية الأم والعملية الفرعية تأخير إنشاء واصفات ملفات signalfd " "(المنفصلة) الخاصة بهما وإضافتها إلى مثيل epoll حتى ما بعد استدعاء B(2)." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "RETURN VALUE" msgstr "قيمة الإرجاع" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "On success, B() returns a signalfd file descriptor; this is " "either a new file descriptor (if I was -1), or I if I was a " "valid signalfd file descriptor. On error, -1 is returned and I is " "set to indicate the error." msgstr "" "في حالة النجاح، تُرجع الدالة B() مُعرف ملف signalfd؛ ويكون هذا إما " "مُعرف ملف جديد (إذا كان I يساوي -1)، أو I نفسه إذا كان I مُعرف ملف " "signalfd صالحًا. وفي حالة حدوث خطأ، تُرجع الدالة القيمة -1 ويتم تعيين " "I للإشارة إلى الخطأ." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "ERRORS" msgstr "الأخطاء" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "The I file descriptor is not a valid file descriptor." msgstr "وصف الملف I ليس واصف ملف صالحًا." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. or, the #. .I sizemask #. argument is not equal to #. .IR sizeof(sigset_t) ; #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "I is not a valid signalfd file descriptor." msgstr "I ليس واصف ملف signalfd صالحًا." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "I is invalid; or, in Linux 2.6.26 or earlier, I is nonzero." msgstr "I غير صالح؛ أو، في لينكس 2.6.26 أو أقدم، I ليس صفرًا." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The per-process limit on the number of open file descriptors has been " "reached." msgstr "وُصل إلى الحد الأقصى لواصفات الملفات المفتوحة لكل عملية." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The system-wide limit on the total number of open files has been reached." msgstr "وُصل إلى الحد الأقصى لإجمالي عدد الملفات المفتوحة على مستوى النظام." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "Could not mount (internal) anonymous inode device." msgstr "تعذر وصل جهاز inode (داخلي) مجهول." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "There was insufficient memory to create a new signalfd file descriptor." msgstr "ذاكرة غير كافية لإنشاء واصف ملف signalfd جديد." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "VERSIONS" msgstr "الإصدارات" #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "C library/kernel differences" msgstr "الاختلافات بين مكتبة C والنواة" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The underlying Linux system call requires an additional argument, I, which specifies the size of the I argument. The glibc " "B() wrapper function does not include this argument, since it " "provides the required value for the underlying system call." msgstr "" "استدعاء نظام Linux الأساسي يتطلب وسيطة إضافية، I، التي تحدد " "حجم وسيطة I. دالة الغلاف B() في glibc لا تتضمن هذه الوسيطة، " "لأنها توفر القيمة المطلوبة لاستدعاء النظام الأساسي." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "There are two underlying Linux system calls: B() and the more " "recent B(). The former system call does not implement a I " "argument. The latter system call implements the I values described " "above. Starting with glibc 2.9, the B() wrapper function will " "use B() where it is available." msgstr "" "هناك استدعاءان أساسيان لنظام Linux: B() والأحدث B(). " "استدعاء النظام الأول لا ينفذ وسيطة I. استدعاء النظام الثاني ينفذ قيم " "I الموصوفة أعلاه. بدءًا من glibc 2.9، ستستخدم دالة الغلاف " "B() B() حيثما كان متاحًا." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "المعايير" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "Linux." msgstr "لينكس." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "التاريخ" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. signalfd() is in glibc 2.7, but reportedly does not build #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "Linux 2.6.22, glibc 2.8." msgstr "لينكس 2.6.22، glibc 2.8." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "Linux 2.6.27." msgstr "لينكس 2.6.27." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "NOTES" msgstr "ملاحظات" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "A process can create multiple signalfd file descriptors. This makes it " "possible to accept different signals on different file descriptors. (This " "may be useful if monitoring the file descriptors using B(2) أو B(2) أو B(7): وصول إشارات مختلفة " "سيجعل واصفات ملف مختلفة جاهزة.) إذا ظهرت إشارة في I لأكثر من واصف ملف " "واحد، فيمكن قراءة حدوث تلك الإشارة (مرة واحدة) من أي من واصفات الملف." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Attempts to include B and B in I are silently " "ignored." msgstr "محاولات تضمين B و B في I يتم تجاهلها بصمت." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The signal mask employed by a signalfd file descriptor can be viewed via the " "entry for the corresponding file descriptor in the process's IpidI directory. See B(5) for further details." msgstr "" "يمكن عرض قناع الإشارة المستخدم بواسطة واصف ملف signalfd عبر الإدخال لواصف " "الملف المقابل في دليل IpidI للعملية. راجع B(5) لمزيد " "من التفاصيل." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Limitations" msgstr "القيود" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The signalfd mechanism can't be used to receive signals that are " "synchronously generated, such as the B signal that results from " "accessing an invalid memory address or the B signal that results " "from an arithmetic error. Such signals can be caught only via signal " "handler." msgstr "" "لا يمكن استخدام آلية signalfd لاستقبال الإشارات المولدة بشكل متزامن، مثل " "إشارة B الناتجة عن الوصول إلى عنوان ذاكرة غير صالح أو إشارة " "B الناتجة عن خطأ حسابي. يمكن التقاط هذه الإشارات فقط عبر معالج إشارة." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "As described above, in normal usage one blocks the signals that will be " "accepted via B(). If spawning a child process to execute a helper " "program (that does not need the signalfd file descriptor), then, after the " "call to B(2), you will normally want to unblock those signals before " "calling B(2), so that the helper program can see any signals that it " "expects to see. Be aware, however, that this won't be possible in the case " "of a helper program spawned behind the scenes by any library function that " "the program may call. In such cases, one must fall back to using a " "traditional signal handler that writes to a file descriptor monitored by " "B(2) أو B(2) أو B(7)." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "BUGS" msgstr "العلل" #. The fix also was put into Linux 2.6.24.5 #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Before Linux 2.6.25, the I and I fields are not filled in " "with the data accompanying a signal sent by B(3)." msgstr "" "قبل لينكس 2.6.25، لا يتم ملء حقلي I و I بالبيانات المصاحبة " "لإشارة مرسلة بواسطة B(3)." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "أمثلة" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The program below accepts the signals B and B via a " "signalfd file descriptor. The program terminates after accepting a " "B signal. The following shell session demonstrates the use of the " "program:" msgstr "" "البرنامج أدناه يقبل الإشارات B و B عبر واصف ملف signalfd. " "ينتهي البرنامج بعد قبول إشارة B. جلسة الصدفة التالية توضح استخدام " "البرنامج:" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "$B< ./signalfd_demo>\n" "B<\\[ha]C> # Control-C generates SIGINT\n" "Got SIGINT\n" "B<\\[ha]C>\n" "Got SIGINT\n" "B<\\[ha]\\[rs]> # Control-\\[rs] generates SIGQUIT\n" "Got SIGQUIT\n" "$\n" msgstr "" "$B< ./signalfd_demo>\n" "B<\\[ha]C> # Control-C generates SIGINT\n" "Got SIGINT\n" "B<\\[ha]C>\n" "Got SIGINT\n" "B<\\[ha]\\[rs]> # Control-\\[rs] generates SIGQUIT\n" "Got SIGQUIT\n" "$\n" #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Program source" msgstr "مصدر البرنامج" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "#include Eerr.hE\n" "#include Esignal.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/signalfd.hE\n" "#include Esys/types.hE\n" "#include Eunistd.hE\n" "\\&\n" "int\n" "main(void)\n" "{\n" " int sfd;\n" " ssize_t s;\n" " sigset_t mask;\n" " struct signalfd_siginfo fdsi;\n" "\\&\n" " sigemptyset(&mask);\n" " sigaddset(&mask, SIGINT);\n" " sigaddset(&mask, SIGQUIT);\n" "\\&\n" " /* Block signals so that they aren\\[aq]t handled\n" " according to their default dispositions. */\n" "\\&\n" " if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)\n" " err(EXIT_FAILURE, \"sigprocmask\");\n" "\\&\n" " sfd = signalfd(-1, &mask, 0);\n" " if (sfd == -1)\n" " err(EXIT_FAILURE, \"signalfd\");\n" "\\&\n" " for (;;) {\n" " s = read(sfd, &fdsi, sizeof(fdsi));\n" " if (s != sizeof(fdsi))\n" " err(EXIT_FAILURE, \"read\");\n" "\\&\n" " if (fdsi.ssi_signo == SIGINT) {\n" " printf(\"Got SIGINT\\[rs]n\");\n" " } else if (fdsi.ssi_signo == SIGQUIT) {\n" " printf(\"Got SIGQUIT\\[rs]n\");\n" " exit(EXIT_SUCCESS);\n" " } else {\n" " printf(\"Read unexpected signal\\[rs]n\");\n" " }\n" " }\n" "}\n" msgstr "" "#include Eerr.hE\n" "#include Esignal.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/signalfd.hE\n" "#include Esys/types.hE\n" "#include Eunistd.hE\n" "\\&\n" "int\n" "main(void)\n" "{\n" " int sfd;\n" " ssize_t s;\n" " sigset_t mask;\n" " struct signalfd_siginfo fdsi;\n" "\\&\n" " sigemptyset(&mask);\n" " sigaddset(&mask, SIGINT);\n" " sigaddset(&mask, SIGQUIT);\n" "\\&\n" " /* Block signals so that they aren\\[aq]t handled\n" " according to their default dispositions. */\n" "\\&\n" " if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)\n" " err(EXIT_FAILURE, \"sigprocmask\");\n" "\\&\n" " sfd = signalfd(-1, &mask, 0);\n" " if (sfd == -1)\n" " err(EXIT_FAILURE, \"signalfd\");\n" "\\&\n" " for (;;) {\n" " s = read(sfd, &fdsi, sizeof(fdsi));\n" " if (s != sizeof(fdsi))\n" " err(EXIT_FAILURE, \"read\");\n" "\\&\n" " if (fdsi.ssi_signo == SIGINT) {\n" " printf(\"Got SIGINT\\[rs]n\");\n" " } else if (fdsi.ssi_signo == SIGQUIT) {\n" " printf(\"Got SIGQUIT\\[rs]n\");\n" " exit(EXIT_SUCCESS);\n" " } else {\n" " printf(\"Read unexpected signal\\[rs]n\");\n" " }\n" " }\n" "}\n" #. SRC END #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "انظر أيضًا" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B(2), B(2), B(2), B(2), B(2), " "B(2), B(2), B(2), B(3), " "B(3), B(7), B(7)" #. type: TH #: debian-trixie #, no-wrap msgid "2024-06-15" msgstr "15 يونيو 2024" #. type: TH #: debian-trixie #, no-wrap msgid "Linux man-pages 6.9.1" msgstr "صفحات دليل لينكس 6.9.1" #. type: Plain text #: debian-trixie msgid "Standard C library (I, I<-lc>)" msgstr "مكتبة سي المعيارية (I، I<-lc>)" #. ssi_trapno is unused on most arches #. ssi_addr_lsb: commit b8aeec34175fc8fe8b0d40efea4846dfc1ba663e #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide #, no-wrap msgid "" "struct signalfd_siginfo {\n" " uint32_t ssi_signo; /* Signal number */\n" " int32_t ssi_errno; /* Error number (unused) */\n" " int32_t ssi_code; /* Signal code */\n" " uint32_t ssi_pid; /* PID of sender */\n" " uint32_t ssi_uid; /* Real UID of sender */\n" " int32_t ssi_fd; /* File descriptor (SIGIO) */\n" " uint32_t ssi_tid; /* Kernel timer ID (POSIX timers)\n" " uint32_t ssi_band; /* Band event (SIGIO) */\n" " uint32_t ssi_overrun; /* POSIX timer overrun count */\n" " uint32_t ssi_trapno; /* Trap number that caused signal */\n" " int32_t ssi_status; /* Exit status or signal (SIGCHLD) */\n" " int32_t ssi_int; /* Integer sent by sigqueue(3) */\n" " uint64_t ssi_ptr; /* Pointer sent by sigqueue(3) */\n" " uint64_t ssi_utime; /* User CPU time consumed (SIGCHLD) */\n" " uint64_t ssi_stime; /* System CPU time consumed\n" " (SIGCHLD) */\n" " uint64_t ssi_addr; /* Address that generated signal\n" " (for hardware-generated signals) */\n" " uint16_t ssi_addr_lsb; /* Least significant bit of address\n" " (SIGBUS; since Linux 2.6.37) */\n" " uint8_t pad[I]; /* Pad size to 128 bytes (allow for\n" " additional fields in the future) */\n" "};\n" msgstr "" "struct signalfd_siginfo {\n" " uint32_t ssi_signo; /* Signal number */\n" " int32_t ssi_errno; /* Error number (unused) */\n" " int32_t ssi_code; /* Signal code */\n" " uint32_t ssi_pid; /* PID of sender */\n" " uint32_t ssi_uid; /* Real UID of sender */\n" " int32_t ssi_fd; /* File descriptor (SIGIO) */\n" " uint32_t ssi_tid; /* Kernel timer ID (POSIX timers)\n" " uint32_t ssi_band; /* Band event (SIGIO) */\n" " uint32_t ssi_overrun; /* POSIX timer overrun count */\n" " uint32_t ssi_trapno; /* Trap number that caused signal */\n" " int32_t ssi_status; /* Exit status or signal (SIGCHLD) */\n" " int32_t ssi_int; /* Integer sent by sigqueue(3) */\n" " uint64_t ssi_ptr; /* Pointer sent by sigqueue(3) */\n" " uint64_t ssi_utime; /* User CPU time consumed (SIGCHLD) */\n" " uint64_t ssi_stime; /* System CPU time consumed\n" " (SIGCHLD) */\n" " uint64_t ssi_addr; /* Address that generated signal\n" " (for hardware-generated signals) */\n" " uint16_t ssi_addr_lsb; /* Least significant bit of address\n" " (SIGBUS; since Linux 2.6.37) */\n" " uint8_t pad[I]; /* Pad size to 128 bytes (allow for\n" " additional fields in the future) */\n" "};\n" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide #, no-wrap msgid "" "#include Eerr.hE\n" "#include Esignal.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/signalfd.hE\n" "#include Esys/types.hE\n" "#include Eunistd.hE\n" "\\&\n" "int\n" "main(void)\n" "{\n" " int sfd;\n" " ssize_t s;\n" " sigset_t mask;\n" " struct signalfd_siginfo fdsi;\n" "\\&\n" " sigemptyset(&mask);\n" " sigaddset(&mask, SIGINT);\n" " sigaddset(&mask, SIGQUIT);\n" "\\&\n" " /* Block signals so that they aren\\[aq]t handled\n" " according to their default dispositions. */\n" "\\&\n" " if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)\n" " err(EXIT_FAILURE, \"sigprocmask\");\n" "\\&\n" " sfd = signalfd(-1, &mask, 0);\n" " if (sfd == -1)\n" " err(EXIT_FAILURE, \"signalfd\");\n" "\\&\n" " for (;;) {\n" " s = read(sfd, &fdsi, sizeof(fdsi));\n" " if (s != sizeof(fdsi))\n" " err(EXIT_FAILURE, \"read\");\n" "\\&\n" " if (fdsi.ssi_signo == SIGINT) {\n" " printf(\"Got SIGINT\\[rs]n\");\n" " } else if (fdsi.ssi_signo == SIGQUIT) {\n" " printf(\"Got SIGQUIT\\[rs]n\");\n" " exit(EXIT_SUCCESS);\n" " } else {\n" " printf(\"Read unexpected signal\\[rs]n\");\n" " }\n" " }\n" "}\n" msgstr "" "#include Eerr.hE\n" "#include Esignal.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/signalfd.hE\n" "#include Esys/types.hE\n" "#include Eunistd.hE\n" "\\&\n" "int\n" "main(void)\n" "{\n" " int sfd;\n" " ssize_t s;\n" " sigset_t mask;\n" " struct signalfd_siginfo fdsi;\n" "\\&\n" " sigemptyset(&mask);\n" " sigaddset(&mask, SIGINT);\n" " sigaddset(&mask, SIGQUIT);\n" "\\&\n" " /* Block signals so that they aren\\[aq]t handled\n" " according to their default dispositions. */\n" "\\&\n" " if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)\n" " err(EXIT_FAILURE, \"sigprocmask\");\n" "\\&\n" " sfd = signalfd(-1, &mask, 0);\n" " if (sfd == -1)\n" " err(EXIT_FAILURE, \"signalfd\");\n" "\\&\n" " for (;;) {\n" " s = read(sfd, &fdsi, sizeof(fdsi));\n" " if (s != sizeof(fdsi))\n" " err(EXIT_FAILURE, \"read\");\n" "\\&\n" " if (fdsi.ssi_signo == SIGINT) {\n" " printf(\"Got SIGINT\\[rs]n\");\n" " } else if (fdsi.ssi_signo == SIGQUIT) {\n" " printf(\"Got SIGQUIT\\[rs]n\");\n" " exit(EXIT_SUCCESS);\n" " } else {\n" " printf(\"Read unexpected signal\\[rs]n\");\n" " }\n" " }\n" "}\n" #. type: TH #: fedora-44 fedora-rawhide #, no-wrap msgid "2024-07-23" msgstr "23 يوليو 2024" #. type: TH #: fedora-44 fedora-rawhide #, no-wrap msgid "Linux man-pages 6.13" msgstr "صفحات دليل لينكس 6.13" #. type: TH #: mageia-cauldron #, no-wrap msgid "Linux man-pages 6.17" msgstr "صفحات دليل لينكس 6.17" #. type: TH #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Linux man-pages (unreleased)" msgstr "صفحات دليل لينكس (لم تصدر بعد)"