# 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:35+0200\n" "PO-Revision-Date: 2026-05-18 18:05+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 "pipe" msgstr "pipe" #. 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 "pipe, pipe2 - create pipe" msgstr "pipe, pipe2 - إنشاء أنبوب" #. 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 Eunistd.hE>\n" msgstr "B<#include Eunistd.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<[2]);>\n" msgstr "BIB<[2]);>\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<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n" "B<#include Efcntl.hE> /* Definition of B constants */\n" "B<#include Eunistd.hE>\n" msgstr "" "B<#define _GNU_SOURCE> /* انظر feature_test_macros(7) */\n" "B<#include Efcntl.hE> /* تعريف ثوابت B */\n" "B<#include Eunistd.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<[2], int >IB<);>\n" msgstr "BIB<[2], int >IB<);>\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "/* On Alpha, IA-64, MIPS, SuperH, and SPARC/SPARC64, pipe() has the\n" " following prototype; see VERSIONS */\n" msgstr "/* في أنظمة Alpha وIA-64 وMIPS وSuperH وSPARC/SPARC64، يكون للوظيفة pipe() النموذج الأولي التالي؛ انظر VERSIONS */\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\n" "B\n" "B<};>\n" "B\n" msgstr "" "B\n" "B\n" "B<};>\n" "B\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 pipe, a unidirectional data channel that can be used " "for interprocess communication. The array I is used to return two " "file descriptors referring to the ends of the pipe. I refers to " "the read end of the pipe. I refers to the write end of the " "pipe. Data written to the write end of the pipe is buffered by the kernel " "until it is read from the read end of the pipe. For further details, see " "B(7)." msgstr "" "B() ينشئ أنبوبًا، قناة بيانات أحادية الاتجاه يمكن استخدامها للتواصل " "بين العمليات. المصفوفة I تُستخدم لإرجاع واصفي ملف يشيران إلى طرفي " "الأنبوب. I يشير إلى طرف القراءة للأنبوب. I يشير إلى " "طرف الكتابة للأنبوب. البيانات المكتوبة في طرف الكتابة للأنبوب تُخزن مؤقتًا " "بواسطة النواة حتى تُقرأ من طرف القراءة للأنبوب. لمزيد من التفاصيل، انظر " "B(7)." #. 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 B() is the same as B(). The following " "values can be bitwise ORed in I to obtain different behavior:" msgstr "" "إذا كانت I تساوي 0، فإن B() مماثلة لـ B(). يمكن إجراء " "عملية OR على البتات للقيم التالية في 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 "" "Set the close-on-exec (B) flag on the two new file " "descriptors. See the description of the same flag in B(2) for " "reasons why this may be useful." msgstr "" "اضبط علم الإغلاق عند التنفيذ (B) على واصفي الملف الجديدين. " "انظر وصف نفس العلم في 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 (since Linux 3.4)" msgstr "B (منذ Linux 3.4)" #. commit 9883035ae7edef3ec62ad215611cb8e17d6a1a5d #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Create a pipe that performs I/O in \"packet\" mode. Each B(2) to " "the pipe is dealt with as a separate packet, and B(2)s from the pipe " "will read one packet at a time. Note the following points:" msgstr "" "أنشئ أنبوبًا يؤدي الإدخال/الإخراج في وضع \"الحزمة\". كل B(2) إلى " "الأنبوب يُعالج كحزمة منفصلة، وقراءات 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 "" "Writes of greater than B bytes (see B(7)) will be split " "into multiple packets. The constant B is defined in Ilimits." "hE>." msgstr "" "الكتابات التي تزيد عن B بايت (انظر B(7)) ستُقسم إلى حزم " "متعددة. الثابت B مُعرف في Ilimits.hE>." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If a B(2) specifies a buffer size that is smaller than the next " "packet, then the requested number of bytes are read, and the excess bytes in " "the packet are discarded. Specifying a buffer size of B will be " "sufficient to read the largest possible packets (see the previous point)." msgstr "" "إذا حددت B(2) حجم مخزن مؤقت أصغر من الحزمة التالية، فسيُقرأ العدد " "المطلوب من البايتات، وتُتجاهل البايتات الزائدة في الحزمة. تحديد حجم مخزن " "مؤقت بقيمة B سيكون كافيًا لقراءة أكبر الحزم الممكنة (انظر النقطة " "السابقة)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Zero-length packets are not supported. (A B(2) that specifies a " "buffer size of zero is a no-op, and returns 0.)" msgstr "" "الحزم ذات الطول الصفري غير مدعومة. (B(2) التي تحدد حجم مخزن مؤقت " "صفري هي عملية لا تفعل شيئًا، وتُرجع 0.)" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Older kernels that do not support this flag will indicate this via an " "B error." msgstr "النوى الأقدم التي لا تدعم هذا العلم ستشير إلى ذلك عبر خطأ B." #. commit 0dbf5f20652108106cb822ad7662c786baaa03ff #. FIXME . But, it is not possible to specify O_DIRECT when opening a FIFO #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Since Linux 4.5, it is possible to change the B setting of a pipe " "file descriptor using B(2)." msgstr "" "منذ Linux 4.5، من الممكن تغيير إعداد B لواصف ملف أنبوب باستخدام " "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 B file status flag on the open file descriptions " "referred to by the new file descriptors. Using this flag saves extra calls " "to B(2) to achieve the same result." msgstr "" "اضبط علم حالة الملف B على أوصاف الملف المفتوحة المشار إليها " "بواسطة واصفي الملف الجديدين. استخدام هذا العلم يوفر استدعاءات إضافية لـ " "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" #. commit c73be61cede5882f9605a852414db559c0ebedfd #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Since Linux 5.8, general notification mechanism is built on the top of the " "pipe where kernel splices notification messages into pipes opened by user " "space. The owner of the pipe has to tell the kernel which sources of events " "to watch and filters can also be applied to select which subevents should be " "placed into the pipe." msgstr "" "منذ Linux 5.8، آلية الإشعار العامة مبنية فوق الأنبوب حيث تقوم النواة بوصل " "رسائل الإشعار في الأنابيب المفتوحة بواسطة مساحة المستخدم. يجب على مالك " "الأنبوب إخبار النواة بمصادر الأحداث التي يجب مراقبتها، ويمكن أيضًا تطبيق " "مرشحات لاختيار الأحداث الفرعية التي يجب وضعها في الأنبوب." #. 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, zero is returned. On error, -1 is returned, I is set to " "indicate the error, and I is left unchanged." msgstr "" "عند النجاح، يُعاد صفر. عند الخطأ، يُعاد -1، ويُضبط I للإشارة إلى الخطأ، " "ويُترك I دون تغيير." #. http://austingroupbugs.net/view.php?id=467 #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "On Linux (and other systems), B() does not modify I on " "failure. A requirement standardizing this behavior was added in " "POSIX.1-2008 TC2. The Linux-specific B() system call likewise does " "not modify I on failure." msgstr "" "على Linux (وأنظمة أخرى)، B() لا تُعدل I عند الفشل. تمت إضافة " "متطلب لتوحيد هذا السلوك في POSIX.1-2008 TC2. استدعاء النظام الخاص بـ Linux " "B() بالمثل لا يُعدل 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 "I is not valid." 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 "(B()) Invalid value in I." msgstr "(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 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: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The user hard limit on memory that can be allocated for pipes has been " "reached and the caller is not privileged; see B(7)." msgstr "" "تم الوصول إلى الحد الصعب للمستخدم على الذاكرة التي يمكن تخصيصها للأنابيب " "والمتصل ليس له صلاحية؛ انظر 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" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "(B()) B was passed in I and support for " "notifications (B) is not compiled into the kernel." 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 "VERSIONS" msgstr "الإصدارات" #. See http://math-atlas.sourceforge.net/devel/assembly/64.psabi.1.33.ps.Z #. for example, section 3.2.1 "Registers and the Stack Frame". #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The System V ABI on some architectures allows the use of more than one " "register for returning multiple values; several architectures (namely, " "Alpha, IA-64, MIPS, SuperH, and SPARC/SPARC64) (ab)use this feature in " "order to implement the B() system call in a functional manner: the " "call doesn't take any arguments and returns a pair of file descriptors as " "the return value on success. The glibc B() wrapper function " "transparently deals with this. See B(2) for information regarding " "registers used for storing second file descriptor." msgstr "" "واجهة System V ABI على بعض البنى تسمح باستخدام أكثر من مسجل لإرجاع قيم " "متعددة؛ عدة بنى (وهي Alpha وIA-64 وMIPS وSuperH وSPARC/SPARC64) (تساء) " "استخدام هذه الميزة لتنفيذ استدعاء النظام B() بطريقة وظيفية: الاستدعاء " "لا يأخذ أي وسيطات ويُرجع زوجًا من واصفي الملف كقيمة إرجاع عند النجاح. دالة " "الغلاف glibc B() تتعامل مع هذا بشفافية. انظر B(2) للحصول " "على معلومات حول المسجلات المستخدمة لتخزين واصف الملف الثاني." #. 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." msgstr "POSIX.1-2024." #. 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()" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "POSIX.1-2001." msgstr "POSIX.1-2001." #. 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-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "POSIX.1-2024. Linux 2.6.27, glibc 2.9." msgstr "POSIX.1-2024. Linux 2.6.27, glibc 2.9." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "أمثلة" #. fork.2 refers to this example program. #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The following program creates a pipe, and then B(2)s to create a child " "process; the child inherits a duplicate set of file descriptors that refer " "to the same pipe. After the B(2), each process closes the file " "descriptors that it doesn't need for the pipe (see B(7)). The parent " "then writes the string contained in the program's command-line argument to " "the pipe, and the child reads this string a byte at a time from the pipe and " "echoes it on standard output." msgstr "" "البرنامج التالي ينشئ أنبوبًا، ثم يستدعي B(2) لإنشاء عملية طفل؛ يرث " "الطفل مجموعة مكررة من واصفي الملف التي تشير إلى نفس الأنبوب. بعد " "B(2)، تغلق كل عملية واصفات الملف التي لا تحتاجها للأنبوب (انظر " "B(7)). ثم يكتب الأب السلسلة الموجودة في وسيطة سطر الأوامر للبرنامج " "إلى الأنبوب، ويقرأ الطفل هذه السلسلة بايتًا بايتًا من الأنبوب ويطبعها على " "المخرجات القياسية." #. 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 fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "#include Eerr.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "#include Esys/types.hE\n" "#include Esys/wait.hE\n" "#include Eunistd.hE\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " int pipefd[2];\n" " char buf;\n" " pid_t cpid;\n" "\\&\n" " if (argc != 2) {\n" " fprintf(stderr, \"Usage: %s EstringE\\[rs]n\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " if (pipe(pipefd) == -1)\n" " err(EXIT_FAILURE, \"pipe\");\n" "\\&\n" " cpid = fork();\n" " if (cpid == -1)\n" " err(EXIT_FAILURE, \"fork\");\n" "\\&\n" " if (cpid == 0) { /* Child reads from pipe */\n" " if (close(pipefd[1]) == -1) /* Close unused write end */\n" " err(EXIT_FAILURE, \"close\");\n" "\\&\n" " while (read(pipefd[0], &buf, 1) E 0) {\n" " if (write(STDOUT_FILENO, &buf, 1) != 1)\n" " err(EXIT_FAILURE, \"write\");\n" " }\n" "\\&\n" " if (write(STDOUT_FILENO, \"\\[rs]n\", 1) != 1)\n" " err(EXIT_FAILURE, \"write\");\n" " if (close(pipefd[0]) == -1)\n" " err(EXIT_FAILURE, \"close\");\n" " _exit(EXIT_SUCCESS);\n" "\\&\n" " } else { /* Parent writes argv[1] to pipe */\n" " if (close(pipefd[0]) == -1) /* Close unused read end */\n" " err(EXIT_FAILURE, \"close\");\n" " if (write(pipefd[1], argv[1], strlen(argv[1])) != strlen(argv[1]))\n" " err(EXIT_FAILURE, \"write\");\n" " if (close(pipefd[1]) == -1) /* Reader will see EOF */\n" " err(EXIT_FAILURE, \"close\");\n" " if (wait(NULL) == -1) /* Wait for child */\n" " err(EXIT_FAILURE, \"wait\");\n" " exit(EXIT_SUCCESS);\n" " }\n" "}\n" msgstr "" "#include Eerr.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "#include Esys/types.hE\n" "#include Esys/wait.hE\n" "#include Eunistd.hE\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " int pipefd[2];\n" " char buf;\n" " pid_t cpid;\n" "\\&\n" " if (argc != 2) {\n" " fprintf(stderr, \"Usage: %s EstringE\\[rs]n\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " if (pipe(pipefd) == -1)\n" " err(EXIT_FAILURE, \"pipe\");\n" "\\&\n" " cpid = fork();\n" " if (cpid == -1)\n" " err(EXIT_FAILURE, \"fork\");\n" "\\&\n" " if (cpid == 0) { /* Child reads from pipe */\n" " if (close(pipefd[1]) == -1) /* Close unused write end */\n" " err(EXIT_FAILURE, \"close\");\n" "\\&\n" " while (read(pipefd[0], &buf, 1) E 0) {\n" " if (write(STDOUT_FILENO, &buf, 1) != 1)\n" " err(EXIT_FAILURE, \"write\");\n" " }\n" "\\&\n" " if (write(STDOUT_FILENO, \"\\[rs]n\", 1) != 1)\n" " err(EXIT_FAILURE, \"write\");\n" " if (close(pipefd[0]) == -1)\n" " err(EXIT_FAILURE, \"close\");\n" " _exit(EXIT_SUCCESS);\n" "\\&\n" " } else { /* Parent writes argv[1] to pipe */\n" " if (close(pipefd[0]) == -1) /* Close unused read end */\n" " err(EXIT_FAILURE, \"close\");\n" " if (write(pipefd[1], argv[1], strlen(argv[1])) != strlen(argv[1]))\n" " err(EXIT_FAILURE, \"write\");\n" " if (close(pipefd[1]) == -1) /* Reader will see EOF */\n" " err(EXIT_FAILURE, \"close\");\n" " if (wait(NULL) == -1) /* Wait for child */\n" " err(EXIT_FAILURE, \"wait\");\n" " exit(EXIT_SUCCESS);\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(3), B(7)" msgstr "" "B(2), B(2), B(2), B(2), B(2), " "B(2), B(2), B(3), 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 msgid "POSIX.1-2008." msgstr "POSIX.1-2008." #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "Linux." msgstr "لينكس." #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide msgid "Linux 2.6.27, glibc 2.9." msgstr "لينكس 2.6.27، glibc 2.9." #. type: Plain text #: debian-trixie #, no-wrap msgid "" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "#include Esys/types.hE\n" "#include Esys/wait.hE\n" "#include Eunistd.hE\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " int pipefd[2];\n" " char buf;\n" " pid_t cpid;\n" "\\&\n" " if (argc != 2) {\n" " fprintf(stderr, \"Usage: %s EstringE\\[rs]n\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " if (pipe(pipefd) == -1) {\n" " perror(\"pipe\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " cpid = fork();\n" " if (cpid == -1) {\n" " perror(\"fork\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " if (cpid == 0) { /* Child reads from pipe */\n" " close(pipefd[1]); /* Close unused write end */\n" "\\&\n" " while (read(pipefd[0], &buf, 1) E 0)\n" " write(STDOUT_FILENO, &buf, 1);\n" "\\&\n" " write(STDOUT_FILENO, \"\\[rs]n\", 1);\n" " close(pipefd[0]);\n" " _exit(EXIT_SUCCESS);\n" "\\&\n" " } else { /* Parent writes argv[1] to pipe */\n" " close(pipefd[0]); /* Close unused read end */\n" " write(pipefd[1], argv[1], strlen(argv[1]));\n" " close(pipefd[1]); /* Reader will see EOF */\n" " wait(NULL); /* Wait for child */\n" " exit(EXIT_SUCCESS);\n" " }\n" "}\n" msgstr "" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "#include Esys/types.hE\n" "#include Esys/wait.hE\n" "#include Eunistd.hE\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " int pipefd[2];\n" " char buf;\n" " pid_t cpid;\n" "\\&\n" " if (argc != 2) {\n" " fprintf(stderr, \"Usage: %s EstringE\\[rs]n\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " if (pipe(pipefd) == -1) {\n" " perror(\"pipe\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " cpid = fork();\n" " if (cpid == -1) {\n" " perror(\"fork\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " if (cpid == 0) { /* Child reads from pipe */\n" " close(pipefd[1]); /* Close unused write end */\n" "\\&\n" " while (read(pipefd[0], &buf, 1) E 0)\n" " write(STDOUT_FILENO, &buf, 1);\n" "\\&\n" " write(STDOUT_FILENO, \"\\[rs]n\", 1);\n" " close(pipefd[0]);\n" " _exit(EXIT_SUCCESS);\n" "\\&\n" " } else { /* Parent writes argv[1] to pipe */\n" " close(pipefd[0]); /* Close unused read end */\n" " write(pipefd[1], argv[1], strlen(argv[1]));\n" " close(pipefd[1]); /* Reader will see EOF */\n" " wait(NULL); /* Wait for child */\n" " exit(EXIT_SUCCESS);\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 "صفحات دليل لينكس (لم تصدر بعد)"