# Russian translation of manpages # This file is distributed under the same license as the manpages-l10n package. # Copyright © of this file: # Alexander Golubev , 2018. # Azamat Hackimov , 2011, 2014-2016. # Hotellook, 2014. # Nikita , 2014. # Spiros Georgaras , 2016. # Vladislav , 2015. # Yuri Kozlov , 2011-2019. # Иван Павлов , 2017. msgid "" msgstr "" "Project-Id-Version: manpages-l10n\n" "POT-Creation-Date: 2024-06-01 06:20+0200\n" "PO-Revision-Date: 2019-10-15 18:55+0300\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n" "%100>=11 && n%100<=14)? 2 : 3);\n" "X-Generator: Lokalize 2.0\n" #. type: TH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "sem_wait" msgstr "" #. type: TH #: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "2024-05-02" msgstr "2 мая 2024 г." #. type: TH #: archlinux debian-unstable #, fuzzy, no-wrap #| msgid "Linux man-pages 6.7" msgid "Linux man-pages 6.8" msgstr "Linux man-pages 6.7" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "ИМЯ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "sem_wait, sem_timedwait, sem_trywait - lock a semaphore" msgstr "sem_wait, sem_timedwait, sem_trywait - блокирует семафор" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "POSIX threads library (I, I<-lpthread>)" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "СИНТАКСИС" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<#include Esemaphore.hE>\n" msgstr "B<#include Esemaphore.hE>\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "" #| "BIB<, struct sembuf *>IB<, size_t >IB<,>\n" #| "B< const struct timespec *>IB<);>\n" msgid "" "BIB<);>\n" "BIB<);>\n" "BIB<,>\n" "B< const struct timespec *restrict >IB<);>\n" msgstr "" "BIB<, struct sembuf *>IB<, size_t >IB<,>\n" "B< const struct timespec *>IB<);>\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Feature Test Macro Requirements for glibc (see B(7)):" msgstr "" "Требования макроса тестирования свойств для glibc (см. " "B(7)):" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "B(2)" msgid "B():" msgstr "B(2)" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid " _POSIX_C_SOURCE E= 200112L\n" msgstr " _POSIX_C_SOURCE E= 200112L\n" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "ОПИСАНИЕ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 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-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 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-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| 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 structure that specifies an absolute " #| "timeout in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 " #| "+0000 (UTC). This structure is defined as follows:" 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 указывает на структуру, в которой задаётся абсолютное время " "ожидания в секундах и наносекундах, начиная с эпохи, 1970-01-01 00:00:00 " "+0000 (UTC). Эта структура определена следующим образом:" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 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-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 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-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "RETURN VALUE" msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 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-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "ERRORS" msgstr "ОШИБКИ" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "The operation could not be performed without blocking (i.e., the " #| "semaphore currently has the value zero)." msgid "" "(B()) The operation could not be performed without blocking (i." "e., the semaphore currently has the value zero)." msgstr "" "Операция не может быть выполнена без блокировки (т. е., значение семафор " "равно нулю)." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "The call was interrupted by a signal handler; see B(7)." msgstr "Вызов был прерван обработчиком сигнала; смотрите B(7)." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "I is not a valid semaphore." msgstr "Значение I не является корректным для семафора." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "The value of I is less than 0, or greater than or " #| "equal to 1000 million." msgid "" "(B()) The value of I is less than 0, " "or greater than or equal to 1000 million." msgstr "" "Значение I меньше 0, или больше или равно 1000 " "миллионов." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 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-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "The call timed out before the semaphore could be locked." msgid "" "(B()) The call timed out before the semaphore could be " "locked." msgstr "Истёк период ожидания в вызове раньше возможности блокировки семафора." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "ATTRIBUTES" msgstr "АТРИБУТЫ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "For an explanation of the terms used in this section, see B(7)." msgstr "Описание терминов данного раздела смотрите в B(7)." #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Interface" msgstr "Интерфейс" #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Attribute" msgstr "Атрибут" #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Value" msgstr "Значение" #. type: tbl table #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid ".na\n" msgstr ".na\n" #. type: tbl table #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid ".nh\n" msgstr ".nh\n" #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "B(),\n" "B(),\n" "B()" msgstr "" "B(),\n" "B(),\n" "B()" #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Thread safety" msgstr "Безвредность в нитях" #. type: tbl table #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "MT-Safe" msgstr "MT-Safe" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "СТАНДАРТЫ" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "POSIX.1-2008." msgstr "POSIX.1-2008." #. type: SH #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "ИСТОРИЯ" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "POSIX.1-2001." msgstr "POSIX.1-2001." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "ПРИМЕРЫ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 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-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 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() из обработчика\n" "sem_timedwait() выполнена успешно\n" "$B< ./a.out 2 1>\n" "About to call sem_timedwait()\n" "истекло время ожидания sem_timedwait()\n" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Program source" msgstr "Исходный код программы" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid "" "#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" "#define handle_error(msg) \\e\n" " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n" "\\&\n" "static void\n" "handler(int sig)\n" "{\n" " write(STDOUT_FILENO, \"sem_post() from handler\\en\", 24);\n" " if (sem_post(&sem) == -1) {\n" " write(STDERR_FILENO, \"sem_post() failed\\en\", 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\\en\",\n" " argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " if (sem_init(&sem, 0, 0) == -1)\n" " handle_error(\"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" " handle_error(\"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" " handle_error(\"clock_gettime\");\n" "\\&\n" " ts.tv_sec += atoi(argv[2]);\n" "\\&\n" " printf(\"%s() about to call sem_timedwait()\\en\", __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\\en\");\n" " else\n" " perror(\"sem_timedwait\");\n" " } else\n" " printf(\"sem_timedwait() succeeded\\en\");\n" "\\&\n" " exit((s == 0) ? EXIT_SUCCESS : EXIT_FAILURE);\n" "}\n" msgstr "" #. SRC END #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "СМОТРИТЕ ТАКЖЕ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "B(2), B(3), B(3), " #| "B(7), B