# 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:32+0200\n" "PO-Revision-Date: 2026-05-18 17:54+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 "MSGOP" msgstr "MSGOP" #. type: TH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "2026-02-11" msgstr "11 فبراير 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 "msgrcv, msgsnd - System V message queue operations" msgstr "msgrcv, msgsnd - عمليات طابور رسائل System V" #. 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/msg.hE>\n" msgstr "B<#include Esys/msg.hE>\n" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "Bsize_t msgsz;\n" "B< int >IB<, void >IB<[>IB<], size_t >IB<, long >IB<,>\n" "B< int >IB<);>\n" msgstr "" "Bsize_t msgsz;\n" "B< int >IB<, void >IB<[>IB<], size_t >IB<, long >IB<,>\n" "B< int >IB<);>\n" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "Bsize_t msgsz;\n" "B< int >IB<, const void >IB<[>IB<], size_t >IB<,>\n" "B< int >IB<);>\n" msgstr "" "Bsize_t msgsz;\n" "B< int >IB<, const void >IB<[>IB<], size_t >IB<,>\n" "B< 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 "" "The B() and B() system calls are used to send messages to, " "and receive messages from, a System\\ V message queue. The calling process " "must have write permission on the message queue in order to send a message, " "and read permission to receive a message." msgstr "" "استدعاءات النظام B() و B() تُستخدم لإرسال الرسائل إلى طابور " "رسائل System\\ V واستقبالها منه. يجب أن تمتلك العملية المستدعية صلاحية " "الكتابة على طابور الرسائل لإرسال رسالة، وصلاحية القراءة لاستقبال رسالة." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The I argument is a pointer to a caller-defined structure of the " "following general form:" msgstr "" "الوسيط I هو مؤشر إلى بنية معرفة من قبل المستدعي بالشكل العام التالي:" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "struct msgbuf {\n" " long mtype; /* message type, must be E 0 */\n" " char mtext[1]; /* message data */\n" "};\n" msgstr "" "struct msgbuf {\n" " long mtype; /* نوع الرسالة، يجب أن يكون E 0 */\n" " char mtext[1]; /* بيانات الرسالة */\n" "};\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The I field is an array (or other structure) whose size is specified " "by I, a nonnegative integer value. Messages of zero length (i.e., no " "I field) are permitted. The I field must have a strictly " "positive integer value. This value can be used by the receiving process for " "message selection (see the description of B() below)." msgstr "" "الحقل I هو مصفوفة (أو بنية أخرى) يُحدد حجمها بواسطة I، وهي قيمة " "عددية غير سالبة. يُسمح برسائل ذات طول صفري (أي لا يوجد حقل I). يجب أن " "يحتوي الحقل I على قيمة عددية موجبة تمامًا. يمكن استخدام هذه القيمة من " "قبل العملية المستقبلة لاختيار الرسالة (انظر وصف B() أدناه)." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "msgsnd()" msgstr "msgsnd()" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() system call appends a copy of the message pointed to by " "I to the message queue whose identifier is specified by I." msgstr "" "استدعاء النظام B() يُلحق نسخة من الرسالة المشار إليها بواسطة I " "إلى طابور الرسائل الذي يُحدد معرفه بواسطة I." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If sufficient space is available in the queue, B() succeeds " "immediately. The queue capacity is governed by the I field in " "the associated data structure for the message queue. During queue creation " "this field is initialized to B bytes, but this limit can be modified " "using B(2). A message queue is considered to be full if either of " "the following conditions is true:" msgstr "" "إذا توفرت مساحة كافية في الطابور، ينجح B() فورًا. سعة الطابور تُحكم " "بواسطة الحقل I في بنية البيانات المرتبطة بطابور الرسائل. أثناء " "إنشاء الطابور، يُهيأ هذا الحقل إلى B بايت، لكن يمكن تعديل هذا الحد " "باستخدام B(2). يُعتبر طابور الرسائل ممتلئًا إذا تحقق أحد الشرطين " "التاليين:" #. type: IP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "\\[bu]" msgstr "\\[bu]" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Adding a new message to the queue would cause the total number of bytes in " "the queue to exceed the queue's maximum size (the I field)." msgstr "" "إضافة رسالة جديدة إلى الطابور ستؤدي إلى تجاوز العدد الإجمالي للبايتات في " "الطابور للحجم الأقصى للطابور (الحقل I)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Adding another message to the queue would cause the total number of messages " "in the queue to exceed the queue's maximum size (the I field). " "This check is necessary to prevent an unlimited number of zero-length " "messages being placed on the queue. Although such messages contain no data, " "they nevertheless consume (locked) kernel memory." msgstr "" "إضافة رسالة أخرى إلى الطابور ستؤدي إلى تجاوز العدد الإجمالي للرسائل في " "الطابور للحجم الأقصى للطابور (الحقل I). هذا الفحص ضروري لمنع وضع " "عدد غير محدود من الرسائل ذات الطول الصفري في الطابور. على الرغم من أن هذه " "الرسائل لا تحتوي على بيانات، إلا أنها تستهلك ذاكرة نواة (مقفلة)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If insufficient space is available in the queue, then the default behavior " "of B() is to block until space becomes available. If B " "is specified in I, then the call instead fails with the error " "B." msgstr "" "إذا لم تتوفر مساحة كافية في الطابور، فإن السلوك المبدئي لـ B() هو " "الحظر حتى تتوفر مساحة. إذا تم تحديد B في I، فإن " "الاستدعاء يفشل بدلاً من ذلك مع الخطأ B." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "A blocked B() call may also fail if:" msgstr "قد يفشل استدعاء B() المحظور أيضًا إذا:" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "the queue is removed, in which case the system call fails with I set " "to B; or" msgstr "" "تمت إزالة الطابور، وفي هذه الحالة يفشل استدعاء النظام مع تعيين I إلى " "B؛ أو" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "a signal is caught, in which case the system call fails with I set to " "B; see B(7). (B() is never automatically restarted " "after being interrupted by a signal handler, regardless of the setting of " "the B flag when establishing a signal handler.)" msgstr "" "تم التقاط إشارة، وفي هذه الحالة يفشل استدعاء النظام مع تعيين I إلى " "B؛ انظر B(7). (لا يُعاد تشغيل B() آليًا بعد مقاطعته " "بواسطة معالج إشارة، بغض النظر عن إعداد العلم B عند إنشاء معالج " "الإشارة.)" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Upon successful completion the message queue data structure is updated as " "follows:" msgstr "عند الإكمال بنجاح، تُحدث بنية بيانات طابور الرسائل كما يلي:" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "I is set to the process ID of the calling process." msgstr "I يُضبط إلى معرف العملية للعملية المستدعية." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "I is incremented by 1." msgstr "I يُزاد بمقدار 1." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "I is set to the current time." msgstr "I يُضبط إلى الوقت الحالي." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "msgrcv()" msgstr "msgrcv()" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() system call removes a message from the queue specified by " "I and places it in the buffer pointed to by I." msgstr "" "استدعاء النظام B() يزيل رسالة من الطابور المحدد بواسطة I " "ويضعها في المخزن المؤقت المشار إليه بواسطة I." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The argument I specifies the maximum size in bytes for the member " "I of the structure pointed to by the I argument. If the " "message text has length greater than I, then the behavior depends on " "whether B is specified in I. If B is " "specified, then the message text will be truncated (and the truncated part " "will be lost); if B is not specified, then the message isn't " "removed from the queue and the system call fails returning -1 with I " "set to B." msgstr "" "الوسيط I يُحدد الحجم الأقصى بالبايتات للعضو I من البنية المشار " "إليها بواسطة الوسيط I. إذا كان طول نص الرسالة أكبر من I، فإن " "السلوك يعتمد على ما إذا كان B محددًا في I. إذا تم تحديد " "B، فسيُقتطع نص الرسالة (وسيُفقد الجزء المقتطع)؛ إذا لم يُحدد " "B، فلن تُزال الرسالة من الطابور ويفشل استدعاء النظام بإرجاع -1 " "مع تعيين I إلى B." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Unless B is specified in I (see below), the I " "argument specifies the type of message requested, as follows:" msgstr "" "ما لم يُحدد B في I (انظر أدناه)، فإن الوسيط I يُحدد " "نوع الرسالة المطلوبة، كما يلي:" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "If I is 0, then the first message in the queue is read." msgstr "إذا كان I يساوي 0، فتُقرأ أول رسالة في الطابور." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If I is greater than 0, then the first message in the queue of type " "I is read, unless B was specified in I, in which " "case the first message in the queue of type not equal to I will be " "read." msgstr "" "إذا كان I أكبر من 0، فتُقرأ أول رسالة في الطابور من النوع I، " "ما لم يُحدد B في I، وفي هذه الحالة تُقرأ أول رسالة في " "الطابور من نوع لا يساوي I." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If I is less than 0, then the first message in the queue with the " "lowest type less than or equal to the absolute value of I will be " "read." msgstr "" "إذا كان I أقل من 0، فتُقرأ أول رسالة في الطابور ذات النوع الأدنى " "الأصغر من أو المساوي للقيمة المطلقة لـ I." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The I argument is a bit mask constructed by ORing together zero or " "more of the following flags:" msgstr "" "الوسيط I هو قناع بتات يُبنى بواسطة OR معًا صفرًا أو أكثر من الأعلام " "التالية:" #. 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 "" "Return immediately if no message of the requested type is in the queue. The " "system call fails with I set to B." msgstr "" "أرجع فورًا إذا لم تكن هناك رسالة من النوع المطلوب في الطابور. يفشل استدعاء " "النظام مع تعيين 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 (since Linux 3.8)" msgstr "B (منذ لينكس 3.8)" #. commit 4a674f34ba04a002244edaf891b5da7fc1473ae8 #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Nondestructively fetch a copy of the message at the ordinal position in the " "queue specified by I (messages are considered to be numbered " "starting at 0)." msgstr "" "اجلب نسخة غير مدمرة من الرسالة في الموضع الترتيبي في الطابور المحدد بواسطة " "I (تُعتبر الرسائل مرقمة بدءًا من 0)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "This flag must be specified in conjunction with B, with the " "result that, if there is no message available at the given position, the " "call fails immediately with the error B. Because they alter the " "meaning of I in orthogonal ways, B and B may " "not both be specified in I." msgstr "" "يجب تحديد هذه العلامة بالتزامن مع B، مما يؤدي إلى أنه إذا لم تكن " "هناك رسالة متاحة في الموضع المحدد، يفشل الاستدعاء فورًا مع الخطأ B. " "نظرًا لأنهما يغيران معنى I بطرق متعامدة، لا يمكن تحديد كل من " "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 B flag was added for the implementation of the kernel " "checkpoint-restore facility and is available only if the kernel was built " "with the B option." msgstr "" "أُضيفت العلامة B لتنفيذ مرفق استعادة نقطة التفتيش للنواة وهي متاحة " "فقط إذا بُنيت النواة مع الخيار 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 "" "Used with I greater than 0 to read the first message in the queue " "with message type that differs from I." msgstr "" "تُستخدم مع I أكبر من 0 لقراءة أول رسالة في الطابور بنوع رسالة يختلف " "عن 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 "To truncate the message text if longer than I bytes." msgstr "لاقتطاع نص الرسالة إذا كان أطول من I بايت." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If no message of the requested type is available and B isn't " "specified in I, the calling process is blocked until one of the " "following conditions occurs:" msgstr "" "إذا لم تكن هناك رسالة من النوع المطلوب متاحة ولم يُحدد B في " "I، فتُحجب العملية المستدعية حتى يحدث أحد الشروط التالية:" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "A message of the desired type is placed in the queue." msgstr "تُوضع رسالة من النوع المطلوب في الطابور." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The message queue is removed from the system. In this case, the system call " "fails with I set to B." msgstr "" "تُزال طابور الرسائل من النظام. في هذه الحالة، يفشل استدعاء النظام مع تعيين " "I إلى B." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The calling process catches a signal. In this case, the system call fails " "with I set to B. (B() is never automatically " "restarted after being interrupted by a signal handler, regardless of the " "setting of the B flag when establishing a signal handler.)" msgstr "" "تلتقط العملية المستدعية إشارة. في هذه الحالة، يفشل استدعاء النظام مع تعيين " "I إلى B. (لا يُعاد تشغيل B() آليًا بعد مقاطعته بواسطة " "معالج إشارة، بغض النظر عن إعداد العلامة B عند إنشاء معالج إشارة.)" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "I is set to the process ID of the calling process." msgstr "يُعيّن I إلى معرف العملية للعملية المستدعية." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "I is decremented by 1." msgstr "يُقلّص I بمقدار 1." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "I is set to the current time." msgstr "يُعيّن I إلى الوقت الحالي." #. 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 0 and B() returns the number of " "bytes actually copied into the I array. On failure, both functions " "return -1, and set I to indicate the error." msgstr "" "عند النجاح، تُرجع B() 0 وتُرجع B() عدد البايتات المنسوخة فعليًا " "في مصفوفة I. عند الفشل، تُرجع كلتا الدالتين -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: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "B() can fail with the following errors:" 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" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The calling process does not have write permission on the message queue, and " "does not have the B capability in the user namespace that " "governs its IPC namespace." msgstr "" "لا تملك العملية المستدعية إذن الكتابة على طابور الرسائل، ولا تملك القدرة " "B في مساحة اسم المستخدم التي تحكم مساحة اسم IPC الخاصة بها." #. 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 message can't be sent due to the I limit for the queue and " "B was specified in I." msgstr "" "لا يمكن إرسال الرسالة بسبب حد I للطابور وتم تحديد B " "في 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 address pointed to by I isn't accessible." 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" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "The message queue was removed." 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 "" "Sleeping on a full message queue condition, the process caught a signal." 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 "" "Invalid I value, or nonpositive I value, or invalid I " "value (less than 0 or greater than the system value B)." msgstr "" "قيمة I غير صالحة، أو قيمة I غير موجبة، أو قيمة I غير " "صالحة (أقل من 0 أو أكبر من قيمة النظام 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 "" "The system does not have enough memory to make a copy of the message pointed " "to by I." msgstr "" "لا يملك النظام ذاكرة كافية لعمل نسخة من الرسالة المشار إليها بواسطة I." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "B() can fail with the following errors:" 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" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The message text length is greater than I and B isn't " "specified in I." msgstr "طول نص الرسالة أكبر من I ولم يُحدد B في I." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The calling process does not have read permission on the message queue, and " "does not have the B capability in the user namespace that " "governs its IPC namespace." msgstr "" "لا تملك العملية المستدعية إذن القراءة على طابور الرسائل، ولا تملك القدرة " "B في مساحة اسم المستخدم التي تحكم مساحة اسم IPC الخاصة بها." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "While the process was sleeping to receive a message, the message queue was " "removed." msgstr "بينما كانت العملية نائمة لاستقبال رسالة، أُزيل طابور الرسائل." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "While the process was sleeping to receive a message, the process caught a " "signal; see B(7)." msgstr "" "بينما كانت العملية نائمة لاستقبال رسالة، التقطت العملية إشارة؛ انظر " "B(7)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "I was invalid, or I was less than 0." msgstr "كان I غير صالح، أو كان I أقل من 0." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B (since Linux 3.14)" msgstr "B (منذ لينكس 3.14)" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "I specified B, but not B." msgstr "I حدد B، ولكن ليس B." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "I specified both B and B." msgstr "I حدد كلاً من B و 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 "" "B was specified in I and no message of the requested " "type existed on the message queue." msgstr "" "B تم تحديده في I ولم توجد رسالة من النوع المطلوب في " "طابور الرسائل." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "B and B were specified in I and the queue " "contains fewer than I messages." msgstr "" "B و B تم تحديدهما في I ويحتوي الطابور على أقل " "من I رسالة." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B (since Linux 3.8)" msgstr "B (منذ لينكس 3.8)" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Both B and B were specified in I, and this " "kernel was configured without B." msgstr "" "كلا من B و B تم تحديدهما في I، وتم تكوين هذه " "النواة بدون 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-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "POSIX.1-2024 XSI." msgstr "POSIX.1-2024 XSI." #. MSG_COPY since glibc 2.18 #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B and B flags are Linux-specific; their " "definitions can be obtained by defining the B<_GNU_SOURCE> feature test " "macro." msgstr "" "العلمان B و B خاصان بلينكس؛ يمكن الحصول على تعريفاتهما " "بتعريف ماكرو اختبار الميزة B<_GNU_SOURCE>." #. 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: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "SVr4, SUSv1, POSIX.1-2001 XSI." msgstr "SVr4, SUSv1, POSIX.1-2001 XSI." #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The I argument is declared as I in glibc 2.0 and " "2.1. It is declared as I in glibc 2.2 and later, as required by " "SUSv2 and SUSv3." msgstr "" "الوسيطة I مُعلنة كـ I في glibc 2.0 و 2.1. وهي " "مُعلنة كـ I في glibc 2.2 وما بعده، كما هو مطلوب بواسطة SUSv2 و " "SUSv3." #. 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 "" "The following limits on message queue resources affect the B() call:" 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" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Maximum size of a message text, in bytes (default value: 8192 bytes). On " "Linux, this limit can be read and modified via I." msgstr "" "الحد الأقصى لحجم نص الرسالة، بالبايت (القيمة المبدئية: 8192 بايت). في لينكس، " "يمكن قراءة هذا الحد وتعديله عبر 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 "" "Maximum number of bytes that can be held in a message queue (default value: " "16384 bytes). On Linux, this limit can be read and modified via I. A privileged process (Linux: a process with the " "B capability) can increase the size of a message queue " "beyond B using the B(2) B operation." msgstr "" "الحد الأقصى لعدد البايتات التي يمكن الاحتفاظ بها في طابور رسائل (القيمة " "المبدئية: 16384 بايت). في لينكس، يمكن قراءة هذا الحد وتعديله عبر I. يمكن لعملية متميزة (لينكس: عملية مع إمكانية " "B) زيادة حجم طابور الرسائل بما يتجاوز B باستخدام " "عملية B(2) B." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The implementation has no intrinsic system-wide limits on the number of " "message headers (B) and the number of bytes in the message pool " "(B)." msgstr "" "التنفيذ ليس له حدود نظامية جوهرية على عدد رؤوس الرسائل (B) وعدد " "البايتات في مجمع الرسائل (B)." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "BUGS" msgstr "العلل" #. http://marc.info/?l=linux-kernel&m=139048542803605&w=2 #. commit 4f87dac386cc43d5525da7a939d4b4e7edbea22c #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "In Linux 3.13 and earlier, if B() was called with the B " "flag, but without B, and the message queue contained less than " "I messages, then the call would block until the next message is " "written to the queue. At that point, the call would return a copy of the " "message, I of whether that message was at the ordinal position " "I. This bug is fixed in Linux 3.14." msgstr "" "في لينكس 3.13 وما قبله، إذا تم استدعاء B() مع العلم B، " "ولكن بدون B، واحتوى طابور الرسائل على أقل من I رسالة، " "فإن الاستدعاء سينتظر حتى تتم كتابة الرسالة التالية في الطابور. عند تلك " "النقطة، سيعيد الاستدعاء نسخة من الرسالة، I<بغض النظر> عما إذا كانت تلك " "الرسالة في الموضع الترتيبي I. تم إصلاح هذا الخلل في لينكس 3.14." #. http://marc.info/?l=linux-kernel&m=139048542803605&w=2 #. commit 4f87dac386cc43d5525da7a939d4b4e7edbea22c #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Specifying both B and B in I is a logical " "error (since these flags impose different interpretations on I). In " "Linux 3.13 and earlier, this error was not diagnosed by B(). This " "bug is fixed in Linux 3.14." msgstr "" "تحديد كلا من B و B في I هو خطأ منطقي (حيث أن " "هذه الأعلام تفرض تفسيرات مختلفة على I). في لينكس 3.13 وما قبله، لم " "يتم تشخيص هذا الخطأ بواسطة B(). تم إصلاح هذا الخلل في لينكس 3.14." #. 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 demonstrates the use of B() and B()." msgstr "البرنامج أدناه يوضح استخدام B() و B()." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The example program is first run with the B<-s> option to send a message and " "then run again with the B<-r> option to receive a message." msgstr "" "يتم تشغيل البرنامج المثال أولاً مع الخيار B<-s> لإرسال رسالة ثم تشغيله مرة " "أخرى مع الخيار B<-r> لاستقبال رسالة." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "The following shell session shows a sample run of the program:" 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< ./a.out -s>\n" "sent: a message at Wed Mar 4 16:25:45 2015\n" msgstr "" "$B< ./a.out -s>\n" "sent: a message at Wed Mar 4 16:25:45 2015\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "$B< ./a.out -r>\n" "message received: a message at Wed Mar 4 16:25:45 2015\n" msgstr "" "$B< ./a.out -r>\n" "message received: a message at Wed Mar 4 16:25:45 2015\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-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "#include Eerrno.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/ipc.hE\n" "#include Esys/msg.hE\n" "#include Etime.hE\n" "#include Eunistd.hE\n" "\\&\n" "struct msgbuf {\n" " long mtype;\n" " char mtext[80];\n" "};\n" "\\&\n" "static void\n" "usage(char *prog_name, char *msg)\n" "{\n" " if (msg != NULL)\n" " fputs(msg, stderr);\n" "\\&\n" " fprintf(stderr, \"Usage: %s [options]\\[rs]n\", prog_name);\n" " fprintf(stderr, \"Options are:\\[rs]n\");\n" " fprintf(stderr, \"-s send message using msgsnd()\\[rs]n\");\n" " fprintf(stderr, \"-r read message using msgrcv()\\[rs]n\");\n" " fprintf(stderr, \"-t message type (default is 1)\\[rs]n\");\n" " fprintf(stderr, \"-k message queue key (default is 1234)\\[rs]n\");\n" " exit(EXIT_FAILURE);\n" "}\n" "\\&\n" "static void\n" "send_msg(int qid, int msgtype)\n" "{\n" " time_t t;\n" " struct msgbuf msg;\n" "\\&\n" " msg.mtype = msgtype;\n" "\\&\n" " time(&t);\n" " snprintf(msg.mtext, sizeof(msg.mtext), \"a message at %s\",\n" " ctime(&t));\n" "\\&\n" " if (msgsnd(qid, &msg, sizeof(msg.mtext),\n" " IPC_NOWAIT) == -1)\n" " {\n" " perror(\"msgsnd error\");\n" " exit(EXIT_FAILURE);\n" " }\n" " printf(\"sent: %s\\[rs]n\", msg.mtext);\n" "}\n" "\\&\n" "static void\n" "get_msg(int qid, int msgtype)\n" "{\n" " struct msgbuf msg;\n" "\\&\n" " if (msgrcv(qid, &msg, sizeof(msg.mtext), msgtype,\n" " MSG_NOERROR | IPC_NOWAIT) == -1) {\n" " if (errno != ENOMSG) {\n" " perror(\"msgrcv\");\n" " exit(EXIT_FAILURE);\n" " }\n" " printf(\"No message available for msgrcv()\\[rs]n\");\n" " } else {\n" " printf(\"message received: %s\\[rs]n\", msg.mtext);\n" " }\n" "}\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " int qid, opt;\n" " int mode = 0; /* 1 = send, 2 = receive */\n" " int msgtype = 1;\n" " int msgkey = 1234;\n" "\\&\n" " while ((opt = getopt(argc, argv, \"srt:k:\")) != -1) {\n" " switch (opt) {\n" " case \\[aq]s\\[aq]:\n" " mode = 1;\n" " break;\n" " case \\[aq]r\\[aq]:\n" " mode = 2;\n" " break;\n" " case \\[aq]t\\[aq]:\n" " msgtype = atoi(optarg);\n" " if (msgtype E= 0)\n" " usage(argv[0], \"-t option must be greater than 0\\[rs]n\");\n" " break;\n" " case \\[aq]k\\[aq]:\n" " msgkey = atoi(optarg);\n" " break;\n" " default:\n" " usage(argv[0], \"Unrecognized option\\[rs]n\");\n" " }\n" " }\n" "\\&\n" " if (mode == 0)\n" " usage(argv[0], \"must use either -s or -r option\\[rs]n\");\n" "\\&\n" " qid = msgget(msgkey, IPC_CREAT | 0666);\n" "\\&\n" " if (qid == -1) {\n" " perror(\"msgget\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " if (mode == 2)\n" " get_msg(qid, msgtype);\n" " else\n" " send_msg(qid, msgtype);\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" "#include Eerrno.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/ipc.hE\n" "#include Esys/msg.hE\n" "#include Etime.hE\n" "#include Eunistd.hE\n" "\\&\n" "struct msgbuf {\n" " long mtype;\n" " char mtext[80];\n" "};\n" "\\&\n" "static void\n" "usage(char *prog_name, char *msg)\n" "{\n" " if (msg != NULL)\n" " fputs(msg, stderr);\n" "\\&\n" " fprintf(stderr, \"Usage: %s [options]\\[rs]n\", prog_name);\n" " fprintf(stderr, \"Options are:\\[rs]n\");\n" " fprintf(stderr, \"-s send message using msgsnd()\\[rs]n\");\n" " fprintf(stderr, \"-r read message using msgrcv()\\[rs]n\");\n" " fprintf(stderr, \"-t message type (default is 1)\\[rs]n\");\n" " fprintf(stderr, \"-k message queue key (default is 1234)\\[rs]n\");\n" " exit(EXIT_FAILURE);\n" "}\n" "\\&\n" "static void\n" "send_msg(int qid, int msgtype)\n" "{\n" " time_t t;\n" " struct msgbuf msg;\n" "\\&\n" " msg.mtype = msgtype;\n" "\\&\n" " time(&t);\n" " snprintf(msg.mtext, sizeof(msg.mtext), \"a message at %s\",\n" " ctime(&t));\n" "\\&\n" " if (msgsnd(qid, &msg, sizeof(msg.mtext),\n" " IPC_NOWAIT) == -1)\n" " {\n" " perror(\"msgsnd error\");\n" " exit(EXIT_FAILURE);\n" " }\n" " printf(\"sent: %s\\[rs]n\", msg.mtext);\n" "}\n" "\\&\n" "static void\n" "get_msg(int qid, int msgtype)\n" "{\n" " struct msgbuf msg;\n" "\\&\n" " if (msgrcv(qid, &msg, sizeof(msg.mtext), msgtype,\n" " MSG_NOERROR | IPC_NOWAIT) == -1) {\n" " if (errno != ENOMSG) {\n" " perror(\"msgrcv\");\n" " exit(EXIT_FAILURE);\n" " }\n" " printf(\"No message available for msgrcv()\\[rs]n\");\n" " } else {\n" " printf(\"message received: %s\\[rs]n\", msg.mtext);\n" " }\n" "}\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " int qid, opt;\n" " int mode = 0; /* 1 = send, 2 = receive */\n" " int msgtype = 1;\n" " int msgkey = 1234;\n" "\\&\n" " while ((opt = getopt(argc, argv, \"srt:k:\")) != -1) {\n" " switch (opt) {\n" " case \\[aq]s\\[aq]:\n" " mode = 1;\n" " break;\n" " case \\[aq]r\\[aq]:\n" " mode = 2;\n" " break;\n" " case \\[aq]t\\[aq]:\n" " msgtype = atoi(optarg);\n" " if (msgtype E= 0)\n" " usage(argv[0], \"-t option must be greater than 0\\[rs]n\");\n" " break;\n" " case \\[aq]k\\[aq]:\n" " msgkey = atoi(optarg);\n" " break;\n" " default:\n" " usage(argv[0], \"Unrecognized option\\[rs]n\");\n" " }\n" " }\n" "\\&\n" " if (mode == 0)\n" " usage(argv[0], \"must use either -s or -r option\\[rs]n\");\n" "\\&\n" " qid = msgget(msgkey, IPC_CREAT | 0666);\n" "\\&\n" " if (qid == -1) {\n" " perror(\"msgget\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " if (mode == 2)\n" " get_msg(qid, msgtype);\n" " else\n" " send_msg(qid, msgtype);\n" "\\&\n" " exit(EXIT_SUCCESS);\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(7), B(7), " "B(7)" msgstr "" "B(2), B(2), B(7), 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>)" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide #, no-wrap msgid "" "BIB<, const void >IB<[.>IB<], size_t >IB<,>\n" "B< int >IB<);>\n" msgstr "" "BIB<, const void >IB<[.>IB<], size_t >IB<,>\n" "B< int >IB<);>\n" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide #, no-wrap msgid "" "BIB<, void >IB<[.>IB<], size_t >IB<, long >IB<,>\n" "B< int >IB<);>\n" msgstr "" "BIB<, void >IB<[.>IB<], size_t >IB<, long >IB<,>\n" "B< int >IB<);>\n" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "a signal is caught, in which case the system call fails with I set to " "B;B B(7). (B() is never automatically " "restarted after being interrupted by a signal handler, regardless of the " "setting of the B flag when establishing a signal handler.)" msgstr "" "عند التقاط إشارة، تفشل في هذه الحالة عملية استدعاء النظام مع تعيين I " "إلى B؛ انظر B(7). (لا تتم إعادة تشغيل B() تلقائيًا " "أبدًا بعد مقاطعتها بواسطة معالج الإشارات، بغض النظر عن إعداد علامة " "B عند إنشاء معالج الإشارات.)" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "B and B were specified in I and the queue " "contains less than I messages." msgstr "" "حُددت B و B في I، وتحتوي قائمة الانتظار على عدد " "رسائل أقل من I." #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "POSIX.1-2008." msgstr "POSIX.1-2008." #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "POSIX.1-2001, SVr4." msgstr "POSIX.1-2001، SVr4." #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "" "The I argument is declared as I in glibc 2.0 and " "2.1. It is declared as I in glibc 2.2 and later, as required by " "SUSv2 and SUSv3." msgstr "" "يعرف الوسيط I على أنه I في glibc 2.0 و2.1. ويعرف " "على أنه I في glibc 2.2 والإصدارات الأحدث، وفقًا لمتطلبات SUSv2 " "وSUSv3." #. 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 "صفحات دليل لينكس (لم تصدر بعد)"