# 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:42+0200\n" "PO-Revision-Date: 2026-06-03 18:13+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 "sem_wait" msgstr "sem_wait" #. 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 "sem_wait, sem_timedwait, sem_trywait - lock a semaphore" msgstr "sem_wait, sem_timedwait, sem_trywait - قفل كمية" #. 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 "POSIX threads library (I,\\ I<-lpthread>)" msgstr "مكتبة مسالك POSIX (I،\\ I<-lpthread>)" #. 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 Esemaphore.hE>\n" msgstr "B<#include Esemaphore.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<);>\n" "BIB<);>\n" "BIB<,>\n" "B< const struct timespec *restrict >IB<);>\n" msgstr "" "BIB<);>\n" "BIB<);>\n" "BIB<,>\n" "B< const struct timespec *restrict >IB<);>\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Feature Test Macro Requirements for glibc (see B(7)):" msgstr "" "متطلبات ماكروات اختبار الميزات لـ glibc (انظر B(7)):" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "B():" msgstr "B():" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid " _POSIX_C_SOURCE E= 200112L\n" msgstr " _POSIX_C_SOURCE E= 200112L\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() decrements (locks) the semaphore pointed to by I. If " "the semaphore's value is greater than zero, then the decrement proceeds, and " "the function returns, immediately. If the semaphore currently has the value " "zero, then the call blocks until either it becomes possible to perform the " "decrement (i.e., the semaphore value rises above zero), or a signal handler " "interrupts the call." msgstr "" "B() تُنقص (تقفل) الكمية المشار إليها بواسطة I. إذا كانت قيمة " "الكمية أكبر من الصفر، فإن النقص يجري، وتعود الدالة فورًا. إذا كانت الكمية " "حاليًا قيمتها صفر، فإن الاستدعاء يُحجب حتى يصبح من الممكن إجراء النقص (أي " "ترتفع قيمة الكمية فوق الصفر)، أو يقاطع معالج إشارة الاستدعاء." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B() is the same as B(), except that if the decrement " "cannot be immediately performed, then call returns an error (I set to " "B) instead of blocking." 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 "" "B() is the same as B(), except that I " "specifies a limit on the amount of time that the call should block if the " "decrement cannot be immediately performed. The I argument " "points to a B(3) structure that specifies an absolute timeout in " "seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC)." msgstr "" "B() هي نفس B()، باستثناء أن I يُحدد " "حدًا لمقدار الوقت الذي يجب أن يُحجب فيه الاستدعاء إذا تعذر إجراء النقص فورًا. " "وسيطة I تُشير إلى بنية B(3) التي تُحدد مهلة مطلقة " "بالثواني والنانوثواني منذ العصر، 1970-01-01 00:00:00 +0000 (UTC)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If the timeout has already expired by the time of the call, and the " "semaphore could not be locked immediately, then B() fails " "with a timeout error (I set to B)." msgstr "" "إذا كانت المهلة قد انتهت بالفعل بحلول وقت الاستدعاء، ولم يمكن قفل الكمية " "فورًا، فإن B() تفشل مع خطأ مهلة (I مضبوط على " "B)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If the operation can be performed immediately, then B() " "never fails with a timeout error, regardless of the value of " "I. Furthermore, the validity of I is not checked " "in this case." msgstr "" "إذا أمكن إجراء العملية فورًا، فإن B() لا تفشل أبدًا مع خطأ " "مهلة، بغض النظر عن قيمة I. علاوة على ذلك، لا يُفحص صحة " "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 "" "All of these functions return 0 on success; on error, the value of the " "semaphore is left unchanged, -1 is returned, and I is set to indicate " "the error." msgstr "" "كل هذه الدوال تُرجع 0 عند النجاح؛ عند الخطأ، تُترك قيمة الكمية دون تغيير، " "وتُعاد -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 "" "(B()) The operation could not be performed without blocking (i." "e., the semaphore currently has the value zero)." 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 call was interrupted by a signal handler; 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 "I is not a valid semaphore." msgstr "I ليس إشارة (semaphore) صالحة." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "(B()) The value of I is less than 0, " "or greater than or equal to 1000 million." msgstr "" "(B()) قيمة I أقل من 0، أو أكبر من أو " "تساوي 1000 مليون." #. 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" #. POSIX.1-2001 also allows EDEADLK -- "A deadlock condition #. was detected", but this does not occur on Linux(?). #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "(B()) The call timed out before the semaphore could be " "locked." msgstr "(B()) انتهت مهلة الاستدعاء قبل أن يمكن قفل الكمية." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "ATTRIBUTES" msgstr "السمات" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "For an explanation of the terms used in this section, see B(7)." msgstr "" "للاطلاع على شرح للمصطلحات المستخدمة في هذا القسم، انظر B(7)." #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Interface" msgstr "الواجهة" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Attribute" msgstr "السمة" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Value" msgstr "القيمة" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid ".na\n" msgstr ".na\n" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid ".nh\n" msgstr ".nh\n" #. type: tbl table #: 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()" msgstr "" "B(),\n" "B(),\n" "B()" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Thread safety" msgstr "سلامة الخيوط" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "MT-Safe" msgstr "MT-Safe" #. 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 "POSIX.1-2008." msgstr "POSIX.1-2008." #. 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-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "POSIX.1-2001." msgstr "POSIX.1-2001." #. 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 (somewhat trivial) program shown below operates on an unnamed " "semaphore. The program expects two command-line arguments. The first " "argument specifies a seconds value that is used to set an alarm timer to " "generate a B signal. This handler performs a B(3) to " "increment the semaphore that is being waited on in I using " "B(). The second command-line argument specifies the length " "of the timeout, in seconds, for B(). The following shows " "what happens on two different runs of the program:" msgstr "" "البرنامج (التافه نوعًا ما) الموضح أدناه يعمل على كمية غير مسماة. يتوقع " "البرنامج وسيطتين لسطر الأوامر. تحدد الوسيطة الأولى قيمة ثوانٍ تُستخدم لضبط " "مؤقت إنذار لتوليد إشارة B. يُنفذ هذا المعالج B(3) لزيادة " "الكمية التي يُنتظر عليها في I باستخدام B(). تحدد " "وسيطة سطر الأوامر الثانية طول المهلة، بالثواني، لـ 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< ./a.out 2 3>\n" "About to call sem_timedwait()\n" "sem_post() from handler\n" "sem_timedwait() succeeded\n" "$B< ./a.out 2 1>\n" "About to call sem_timedwait()\n" "sem_timedwait() timed out\n" msgstr "" "$B< ./a.out 2 3>\n" "About to call sem_timedwait()\n" "sem_post() from handler\n" "sem_timedwait() succeeded\n" "$B< ./a.out 2 1>\n" "About to call sem_timedwait()\n" "sem_timedwait() timed out\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 Eerrno.hE\n" "#include Esemaphore.hE\n" "#include Esignal.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Etime.hE\n" "#include Eunistd.hE\n" "\\&\n" "#include Eassert.hE\n" "\\&\n" "sem_t sem;\n" "\\&\n" "static void\n" "handler(int sig)\n" "{\n" " write(STDOUT_FILENO, \"sem_post() from handler\\[rs]n\", 24);\n" " if (sem_post(&sem) == -1) {\n" " write(STDERR_FILENO, \"sem_post() failed\\[rs]n\", 18);\n" " _exit(EXIT_FAILURE);\n" " }\n" "}\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " struct sigaction sa;\n" " struct timespec ts;\n" " int s;\n" "\\&\n" " if (argc != 3) {\n" " fprintf(stderr, \"Usage: %s Ealarm-secsE Ewait-secsE\\[rs]n\",\n" " argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " if (sem_init(&sem, 0, 0) == -1)\n" " err(EXIT_FAILURE, \"sem_init\");\n" "\\&\n" " /* Establish SIGALRM handler; set alarm timer using argv[1]. */\n" "\\&\n" " sa.sa_handler = handler;\n" " sigemptyset(&sa.sa_mask);\n" " sa.sa_flags = 0;\n" " if (sigaction(SIGALRM, &sa, NULL) == -1)\n" " err(EXIT_FAILURE, \"sigaction\");\n" "\\&\n" " alarm(atoi(argv[1]));\n" "\\&\n" " /* Calculate relative interval as current time plus\n" " number of seconds given argv[2]. */\n" "\\&\n" " if (clock_gettime(CLOCK_REALTIME, &ts) == -1)\n" " err(EXIT_FAILURE, \"clock_gettime\");\n" "\\&\n" " ts.tv_sec += atoi(argv[2]);\n" "\\&\n" " printf(\"%s() about to call sem_timedwait()\\[rs]n\", __func__);\n" " while ((s = sem_timedwait(&sem, &ts)) == -1 && errno == EINTR)\n" " continue; /* Restart if interrupted by handler. */\n" "\\&\n" " /* Check what happened. */\n" "\\&\n" " if (s == -1) {\n" " if (errno == ETIMEDOUT)\n" " printf(\"sem_timedwait() timed out\\[rs]n\");\n" " else\n" " perror(\"sem_timedwait\");\n" " } else\n" " printf(\"sem_timedwait() succeeded\\[rs]n\");\n" "\\&\n" " exit((s == 0) ? EXIT_SUCCESS : EXIT_FAILURE);\n" "}\n" msgstr "" "#include Eerr.hE\n" "#include Eerrno.hE\n" "#include Esemaphore.hE\n" "#include Esignal.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Etime.hE\n" "#include Eunistd.hE\n" "\\&\n" "#include Eassert.hE\n" "\\&\n" "sem_t sem;\n" "\\&\n" "static void\n" "handler(int sig)\n" "{\n" " write(STDOUT_FILENO, \"sem_post() from handler\\[rs]n\", 24);\n" " if (sem_post(&sem) == -1) {\n" " write(STDERR_FILENO, \"sem_post() failed\\[rs]n\", 18);\n" " _exit(EXIT_FAILURE);\n" " }\n" "}\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " struct sigaction sa;\n" " struct timespec ts;\n" " int s;\n" "\\&\n" " if (argc != 3) {\n" " fprintf(stderr, \"Usage: %s Ealarm-secsE Ewait-secsE\\[rs]n\",\n" " argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " if (sem_init(&sem, 0, 0) == -1)\n" " err(EXIT_FAILURE, \"sem_init\");\n" "\\&\n" " /* Establish SIGALRM handler; set alarm timer using argv[1]. */\n" "\\&\n" " sa.sa_handler = handler;\n" " sigemptyset(&sa.sa_mask);\n" " sa.sa_flags = 0;\n" " if (sigaction(SIGALRM, &sa, NULL) == -1)\n" " err(EXIT_FAILURE, \"sigaction\");\n" "\\&\n" " alarm(atoi(argv[1]));\n" "\\&\n" " /* Calculate relative interval as current time plus\n" " number of seconds given argv[2]. */\n" "\\&\n" " if (clock_gettime(CLOCK_REALTIME, &ts) == -1)\n" " err(EXIT_FAILURE, \"clock_gettime\");\n" "\\&\n" " ts.tv_sec += atoi(argv[2]);\n" "\\&\n" " printf(\"%s() about to call sem_timedwait()\\[rs]n\", __func__);\n" " while ((s = sem_timedwait(&sem, &ts)) == -1 && errno == EINTR)\n" " continue; /* Restart if interrupted by handler. */\n" "\\&\n" " /* Check what happened. */\n" "\\&\n" " if (s == -1) {\n" " if (errno == ETIMEDOUT)\n" " printf(\"sem_timedwait() timed out\\[rs]n\");\n" " else\n" " perror(\"sem_timedwait\");\n" " } else\n" " printf(\"sem_timedwait() succeeded\\[rs]n\");\n" "\\&\n" " exit((s == 0) ? EXIT_SUCCESS : EXIT_FAILURE);\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(3), B(3), B(3), " "B(7), B