# Russian translation of manpages
# This file is distributed under the same license as the manpages-l10n package.
# Copyright © of this file:
# aereiae <aereiae@gmail.com>, 2014.
# Alexey <a.chepugov@gmail.com>, 2015.
# Azamat Hackimov <azamat.hackimov@gmail.com>, 2013-2017.
# Dmitriy S. Seregin <dseregin@59.ru>, 2013.
# Dmitry Bolkhovskikh <d20052005@yandex.ru>, 2017.
# ITriskTI <ITriskTI@gmail.com>, 2013.
# Max Is <ismax799@gmail.com>, 2016.
# Yuri Kozlov <yuray@komyakino.ru>, 2011-2019.
# Иван Павлов <pavia00@gmail.com>, 2017.
# Малянов Евгений Викторович <maljanow@outlook.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: manpages-l10n\n"
"POT-Creation-Date: 2024-06-01 06:05+0200\n"
"PO-Revision-Date: 2019-10-06 08:59+0300\n"
"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
"Language-Team: Russian <man-pages-ru-talks@lists.sourceforge.net>\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 "MSGOP"
msgstr "MSGOP"

#. 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 "msgrcv, msgsnd - System V message queue operations"
msgstr "msgrcv, msgsnd - операции с очередью сообщений System V"

#. 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 "Standard C library (I<libc>, I<-lc>)"
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 E<lt>sys/msg.hE<gt>>\n"
msgstr "B<#include E<lt>sys/msg.hE<gt>>\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 "B<int msgsnd(int >I<msqid>B<, const void *>I<msgp>B<, size_t >I<msgsz>B<, int >I<msgflg>B<);>\n"
msgid ""
"B<int msgsnd(int >I<msqid>B<, const void >I<msgp>B<[.>I<msgsz>B<], size_t >I<msgsz>B<,>\n"
"B<               int >I<msgflg>B<);>\n"
msgstr "B<int msgsnd(int >I<msqid>B<, const void *>I<msgp>B<, size_t >I<msgsz>B<, int >I<msgflg>B<);>\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 ""
#| "B<ssize_t msgrcv(int >I<msqid>B<, void *>I<msgp>B<, size_t >I<msgsz>B<, long >I<msgtyp>B<,>\n"
#| "B<               int >I<msgflg>B<);>\n"
msgid ""
"B<ssize_t msgrcv(int >I<msqid>B<, void >I<msgp>B<[.>I<msgsz>B<], size_t >I<msgsz>B<, long >I<msgtyp>B<,>\n"
"B<               int >I<msgflg>B<);>\n"
msgstr ""
"B<ssize_t msgrcv(int >I<msqid>B<, void *>I<msgp>B<, size_t >I<msgsz>B<, long >I<msgtyp>B<,>\n"
"B<               int >I<msgflg>B<);>\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 ""
"The B<msgsnd>()  and B<msgrcv>()  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<msgsnd>() и B<msgrcv>() используются для отправки и "
"получения сообщений из очереди сообщений System\\ V. Вызывающий процесс "
"должен иметь права на запись в очередь сообщений, чтобы отправлять сообщения "
"и права на чтение для получения сообщений."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The I<msgp> argument is a pointer to a caller-defined structure of the "
"following general form:"
msgstr ""
"Аргумент I<msgp> представляет собой указатель на структуру, определяемую "
"вызывающим как:"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid ""
"struct msgbuf {\n"
"    long mtype;       /* message type, must be E<gt> 0 */\n"
"    char mtext[1];    /* message data */\n"
"};\n"
msgstr ""
"struct msgbuf {\n"
"    long mtype;       /* тип сообщения, значение должно быть E<gt> 0 */\n"
"    char mtext[1];    /* данные сообщения */\n"
"};\n"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The I<mtext> field is an array (or other structure) whose size is specified "
"by I<msgsz>, a nonnegative integer value.  Messages of zero length (i.e., no "
"I<mtext> field) are permitted.  The I<mtype> 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<msgrcv>()  below)."
msgstr ""
"Поле I<mtext> является массивом (или другой структурой), размер которого "
"определяется I<msgsz> — неотрицательным целым значением. Разрешены сообщения "
"нулевой длины (т.е. без поля I<mtext>). Поле I<mtype> должно быть только "
"положительным целым значением. Это значение используется процессом-"
"получателем для выбора сообщения (см. описание B<msgrcv>() далее)."

#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "msgsnd()"
msgstr "msgsnd()"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The B<msgsnd>()  system call appends a copy of the message pointed to by "
"I<msgp> to the message queue whose identifier is specified by I<msqid>."
msgstr ""
"Системный вызов B<msgsnd>() добавляет копию сообщения, указанного I<msgp>, в "
"очередь сообщений, идентификатор которой задаётся в I<msqid>."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"If sufficient space is available in the queue, B<msgsnd>()  succeeds "
"immediately.  The queue capacity is governed by the I<msg_qbytes> field in "
"the associated data structure for the message queue.  During queue creation "
"this field is initialized to B<MSGMNB> bytes, but this limit can be modified "
"using B<msgctl>(2).  A message queue is considered to be full if either of "
"the following conditions is true:"
msgstr ""
"Если в очереди достаточно места, то B<msgsnd>() сразу успешно завершается. "
"Размер очереди управляется полем I<msg_qbytes> в связанной структуре данных "
"очереди сообщений. При создании очереди это поле инициализируется значением "
"B<MSGMNB> байт, но данное ограничение можно изменить с помощью B<msgctl>(2). "
"Очередь сообщений считается заполненной при одном из следующих условий:"

#. type: IP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "\\[bu]"
msgstr "\\[bu]"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 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<msg_qbytes> field)."
msgstr ""
"Добавление нового сообщения привело бы к превышению общего количества байт "
"очереди над максимальным количеством размером очереди (поле I<msg_qbytes>)."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 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<msg_qbytes> 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<msg_qbytes>). Эта проверка необходима для предотвращения помещения в "
"очередь бесконечного количества сообщений нулевой длины. Хотя такие "
"сообщения не содержат данных, тем не менее, они потребляют (блокируют) "
"память ядра."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"If insufficient space is available in the queue, then the default behavior "
"of B<msgsnd>()  is to block until space becomes available.  If B<IPC_NOWAIT> "
"is specified in I<msgflg>, then the call instead fails with the error "
"B<EAGAIN>."
msgstr ""
"Если в очереди недостаточно места, то по умолчанию B<msgsnd>() блокирует "
"выполнение до появления свободного места. Если в I<msgflg> указан "
"B<IPC_NOWAIT>, то вызов вместо этого завершается с ошибкой B<EAGAIN>."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "A blocked B<msgsnd>()  call may also fail if:"
msgstr "Заблокированный вызов B<msgsnd>() может завершиться ошибкой если:"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"the queue is removed, in which case the system call fails with I<errno> set "
"to B<EIDRM>; or"
msgstr ""
"очередь удалена (в этом случае системный вызов выдаст ошибку, определив "
"I<errno> в значение B<EIDRM>;"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"a signal is caught, in which case the system call fails with I<errno> set to "
"B<EINTR>;B<see> B<signal>(7).  (B<msgsnd>()  is never automatically "
"restarted after being interrupted by a signal handler, regardless of the "
"setting of the B<SA_RESTART> flag when establishing a signal handler.)"
msgstr ""
"пойман сигнал; в этом случае системный вызов завершается с ошибкой и "
"присваивает I<errno> значение B<EINTR>; B<см.> B<signal>(7). Вызов "
"B<msgsnd>() никогда не перезапускается автоматически после прерывания "
"обработчиком сигнала, независимо от установки флага B<SA_RESTART> при "
"настройке обработчика сигнала."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Upon successful completion the message queue data structure is updated as "
"follows:"
msgstr ""
"Перед успешным завершением структура данных очереди сообщений будет "
"обновлена следующим образом:"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "I<msg_lspid> is set to the process ID of the calling process."
msgstr ""
"Значение I<msg_lspid> устанавливается равным идентификатору вызывающего "
"процесса."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "I<msg_qnum> is incremented by 1."
msgstr "Значение I<msg_qnum> увеличивается на 1."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "I<msg_stime> is set to the current time."
msgstr "Значение I<msg_stime> присваивается значение текущего времени."

#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "msgrcv()"
msgstr "msgrcv()"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The B<msgrcv>()  system call removes a message from the queue specified by "
"I<msqid> and places it in the buffer pointed to by I<msgp>."
msgstr ""
"Системный вызов B<msgrcv>() удаляет сообщение из очереди, указанной в "
"I<msqid> и помещает его в буфер, указанный в I<msgp>."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The argument I<msgsz> specifies the maximum size in bytes for the member "
"I<mtext> of the structure pointed to by the I<msgp> argument.  If the "
"message text has length greater than I<msgsz>, then the behavior depends on "
"whether B<MSG_NOERROR> is specified in I<msgflg>.  If B<MSG_NOERROR> is "
"specified, then the message text will be truncated (and the truncated part "
"will be lost); if B<MSG_NOERROR> is not specified, then the message isn't "
"removed from the queue and the system call fails returning -1 with I<errno> "
"set to B<E2BIG>."
msgstr ""
"Параметр I<msgsz> задаёт максимальный размер (в байтах) элемента I<mtext> "
"структуры, находящейся по адресу, указанному в аргументе I<msgp>. Если длина "
"текста сообщения больше чем I<msgsz>, то поведение зависит от наличия флага "
"B<MSG_NOERROR> в I<msgflg>. Если B<MSG_NOERROR> указан, то текст сообщения "
"будет урезан (а урезанная часть потеряна); иначе сообщение не удаляется из "
"очереди, а системный вызов возвращает -1 и присваивает I<errno> значение "
"B<E2BIG>."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Unless B<MSG_COPY> is specified in I<msgflg> (see below), the I<msgtyp> "
"argument specifies the type of message requested, as follows:"
msgstr ""
"Если в I<msgflg> (смотрите ниже ) не указан B<MSG_COPY>, то в аргументе "
"I<msgtyp> указывается тип запрашиваемого сообщения:"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "If I<msgtyp> is 0, then the first message in the queue is read."
msgstr "Если I<msgtyp> равно нулю, то читается первое сообщение в очереди."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"If I<msgtyp> is greater than 0, then the first message in the queue of type "
"I<msgtyp> is read, unless B<MSG_EXCEPT> was specified in I<msgflg>, in which "
"case the first message in the queue of type not equal to I<msgtyp> will be "
"read."
msgstr ""
"Если I<msgtyp> больше нуля, то из очереди читается первое сообщение с типом "
"I<msgtyp> (если только в I<msgflg> не указан B<MSG_EXCEPT>. В этом случае из "
"очереди читается первое сообщение, тип которого не равен I<msgtyp>)."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"If I<msgtyp> 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<msgtyp> will be "
"read."
msgstr ""
"Если I<msgtyp> меньше нуля, то из очереди читается первое сообщение со "
"значением, меньшим или равным абсолютному значению I<msgtyp>."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The I<msgflg> argument is a bit mask constructed by ORing together zero or "
"more of the following flags:"
msgstr ""
"Аргумент I<msgflg> представляет собой битовую маску из комбинации нуля или "
"более следующих флагов:"

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<IPC_NOWAIT>"
msgstr "B<IPC_NOWAIT>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Return immediately if no message of the requested type is in the queue.  The "
"system call fails with I<errno> set to B<ENOMSG>."
msgstr ""
"Немедленный возврат, если в очереди нет сообщений необходимого типа. При "
"этом системный вызов возвращает ошибку, присваивая I<errno> значение "
"B<ENOMSG>."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<MSG_COPY> (since Linux 3.8)"
msgstr "B<MSG_COPY> (начиная с Linux 3.8)"

#.  commit 4a674f34ba04a002244edaf891b5da7fc1473ae8
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Nondestructively fetch a copy of the message at the ordinal position in the "
"queue specified by I<msgtyp> (messages are considered to be numbered "
"starting at 0)."
msgstr ""
"Забирает копию сообщения без удаления из начальной позиции в очереди, "
"заданной в I<msgtyp> (сообщения нумеруются начиная с 0)."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"This flag must be specified in conjunction with B<IPC_NOWAIT>, with the "
"result that, if there is no message available at the given position, the "
"call fails immediately with the error B<ENOMSG>.  Because they alter the "
"meaning of I<msgtyp> in orthogonal ways, B<MSG_COPY> and B<MSG_EXCEPT> may "
"not both be specified in I<msgflg>."
msgstr ""
"Этот флаг должен указываться вместе с B<IPC_NOWAIT>; в этом случае, если в "
"заданной позиции сообщение отсутствует, то вызов завершается с ошибкой "
"B<ENOMSG> немедленно. Флаги B<MSG_COPY> и B<MSG_EXCEPT> не могут указываться "
"вместе в I<msgflg>, так как кардинально изменяют смысл I<msgtyp>."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The B<MSG_COPY> flag was added for the implementation of the kernel "
"checkpoint-restore facility and is available only if the kernel was built "
"with the B<CONFIG_CHECKPOINT_RESTORE> option."
msgstr ""
"Флаг B<MSG_COPY> был добавлен для реализации способности ядра для "
"контрольных точек/восстановления и доступен только, если ядро собрано с "
"параметром B<CONFIG_CHECKPOINT_RESTORE>."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<MSG_EXCEPT>"
msgstr "B<MSG_EXCEPT>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Used with I<msgtyp> greater than 0 to read the first message in the queue "
"with message type that differs from I<msgtyp>."
msgstr ""
"Используется, если I<msgtyp> больше 0, для чтения первого сообщения в "
"очереди с типом, отличным от I<msgtyp>."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<MSG_NOERROR>"
msgstr "B<MSG_NOERROR>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "To truncate the message text if longer than I<msgsz> bytes."
msgstr ""
"Используется для урезания текста сообщения, если его размер больше I<msgsz> "
"байт."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"If no message of the requested type is available and B<IPC_NOWAIT> isn't "
"specified in I<msgflg>, the calling process is blocked until one of the "
"following conditions occurs:"
msgstr ""
"Если в очереди нет сообщения необходимого типа и в I<msgflg> не указан "
"B<IPC_NOWAIT>, то вызывающий процесс будет заблокирован до тех пор, пока не "
"произойдет одно из следующих событий:"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "A message of the desired type is placed in the queue."
msgstr "В очередь не будет помещено сообщение необходимого типа."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The message queue is removed from the system.  In this case, the system call "
"fails with I<errno> set to B<EIDRM>."
msgstr ""
"Очередь сообщений удалена из системы. В этом случае системный вызов "
"возвращает ошибку и присваивает I<errno> значение B<EIDRM>."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The calling process catches a signal.  In this case, the system call fails "
"with I<errno> set to B<EINTR>.  (B<msgrcv>()  is never automatically "
"restarted after being interrupted by a signal handler, regardless of the "
"setting of the B<SA_RESTART> flag when establishing a signal handler.)"
msgstr ""
"Вызывающий процесс не получит сигнал, который должен обработать. В этом "
"случае системный вызов возвращает ошибку и присваивает переменной I<errno> "
"значение B<EINTR>. Вызов B<msgrcv>() никогда не перезапускается "
"автоматически после прерывания обработчиком сигнала, независимо от установки "
"флага B<SA_RESTART> при настройке обработчика сигнала."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "I<msg_lrpid> is set to the process ID of the calling process."
msgstr ""
"Значение I<msg_lrpid> устанавливается равным идентификатору вызывающего "
"процесса."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "I<msg_qnum> is decremented by 1."
msgstr "Значение I<msg_qnum> уменьшается на 1."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "I<msg_rtime> is set to the current time."
msgstr "Значение I<msg_rtime> становится равным текущему времени."

#. 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
#, fuzzy
#| msgid ""
#| "On success, B<modify_ldt>()  returns either the actual number of bytes "
#| "read (for reading)  or 0 (for writing).  On failure, B<modify_ldt>()  "
#| "returns -1 and sets I<errno> to indicate the error."
msgid ""
"On success, B<msgsnd>()  returns 0 and B<msgrcv>()  returns the number of "
"bytes actually copied into the I<mtext> array.  On failure, both functions "
"return -1, and set I<errno> to indicate the error."
msgstr ""
"При успешном выполнении B<modify_ldt>() возвращается реальное количество "
"прочитанных байт (при чтении) или 0 (при записи). При ошибке B<modify_ldt>() "
"возвращает -1, а I<errno> устанавливается в соответствующее значение."

#. 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: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, fuzzy
#| msgid ""
#| "When B<msgsnd>()  fails, I<errno> will be set to one among the following "
#| "values:"
msgid "B<msgsnd>()  can fail with the following errors:"
msgstr ""
"Значения I<errno>, устанавливаемые при возникновении ошибок в B<msgsnd>():"

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<EACCES>"
msgstr "B<EACCES>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The calling process does not have write permission on the message queue, and "
"does not have the B<CAP_IPC_OWNER> capability in the user namespace that "
"governs its IPC namespace."
msgstr ""
"Вызывающий процесс не имеет прав записи в очередь сообщений и не имеет "
"мандата B<CAP_IPC_OWNER> в пользовательском пространстве имён, которое "
"управляет его пространством имён IPC."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<EAGAIN>"
msgstr "B<EAGAIN>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The message can't be sent due to the I<msg_qbytes> limit for the queue and "
"B<IPC_NOWAIT> was specified in I<msgflg>."
msgstr ""
"Сообщение не может быть отправлено, так как размер очереди превысит лимит, "
"равный I<msg_qbytes>, а в параметре I<msgflg> установлен флаг B<IPC_NOWAIT>."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<EFAULT>"
msgstr "B<EFAULT>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "The address pointed to by I<msgp> isn't accessible."
msgstr "Память с адресом, указанным I<msgp>, недоступна."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<EIDRM>"
msgstr "B<EIDRM>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "The message queue was removed."
msgstr "Очередь сообщений была удалена."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<EINTR>"
msgstr "B<EINTR>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Sleeping on a full message queue condition, the process caught a signal."
msgstr ""
"Процесс ждал свободного места в очереди и получил сигнал, который должен "
"обработать."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<EINVAL>"
msgstr "B<EINVAL>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Invalid I<msqid> value, or nonpositive I<mtype> value, or invalid I<msgsz> "
"value (less than 0 or greater than the system value B<MSGMAX>)."
msgstr ""
"Задано неправильное значение I<msqid>, не положительное значение I<mtype> "
"или неправильное значение I<msgsz> (меньше 0, или больше системного лимита, "
"заданного B<MSGMAX>)."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<ENOMEM>"
msgstr "B<ENOMEM>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The system does not have enough memory to make a copy of the message pointed "
"to by I<msgp>."
msgstr ""
"Недостаточно памяти в системе для копирования сообщения, указанного I<msgp>."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, fuzzy
#| msgid ""
#| "When B<msgrcv>()  fails, I<errno> will be set to one among the following "
#| "values:"
msgid "B<msgrcv>()  can fail with the following errors:"
msgstr ""
"Значения I<errno>, устанавливаемые при возникновении ошибок в B<msgrcv>():"

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<E2BIG>"
msgstr "B<E2BIG>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The message text length is greater than I<msgsz> and B<MSG_NOERROR> isn't "
"specified in I<msgflg>."
msgstr ""
"Длина текста получаемого сообщения больше, чем I<msgsz>, а в поле I<msgflg> "
"не установлен флаг B<MSG_NOERROR>."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The calling process does not have read permission on the message queue, and "
"does not have the B<CAP_IPC_OWNER> capability in the user namespace that "
"governs its IPC namespace."
msgstr ""
"Вызывающий процесс не имеет прав чтобы прочитать очереди сообщений и не "
"имеет мандата B<CAP_IPC_OWNER> в пространстве имён пользователя, который "
"управляет его пространством имён IPC."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"While the process was sleeping to receive a message, the message queue was "
"removed."
msgstr ""
"Процесс ждал приёма сообщения, и в это время очередь сообщений была удалена."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"While the process was sleeping to receive a message, the process caught a "
"signal; see B<signal>(7)."
msgstr ""
"Во время ожидания приёма сообщения процесс получил сигнал; см. B<signal>(7)."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "I<msqid> was invalid, or I<msgsz> was less than 0."
msgstr "Неверное значение I<msqid> или I<msgsz> меньше 0."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<EINVAL> (since Linux 3.14)"
msgstr "B<EINVAL> (начиная с Linux 3.14)"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "I<msgflg> specified B<MSG_COPY>, but not B<IPC_NOWAIT>."
msgstr "В I<msgflg> указан флаг B<MSG_COPY>, но нет B<IPC_NOWAIT>."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "I<msgflg> specified both B<MSG_COPY> and B<MSG_EXCEPT>."
msgstr "В I<msgflg> указаны B<MSG_COPY> и B<MSG_EXCEPT>."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<ENOMSG>"
msgstr "B<ENOMSG>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"B<IPC_NOWAIT> was specified in I<msgflg> and no message of the requested "
"type existed on the message queue."
msgstr ""
"В очереди нет сообщения необходимого типа, а в параметре I<msgflg> "
"установлен флаг B<IPC_NOWAIT>."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"B<IPC_NOWAIT> and B<MSG_COPY> were specified in I<msgflg> and the queue "
"contains less than I<msgtyp> messages."
msgstr ""
"Флаги B<IPC_NOWAIT> и B<MSG_COPY> указаны в I<msgflg>, но в очереди "
"содержится меньше I<msgtyp> сообщений."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<ENOSYS> (since Linux 3.8)"
msgstr "B<ENOSYS> (начиная с Linux 3.8)"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, fuzzy
#| msgid ""
#| "I<MSG_COPY> was specified in I<msgflg>, and this kernel was configured "
#| "without B<CONFIG_CHECKPOINT_RESTORE>."
msgid ""
"Both B<MSG_COPY> and B<IPC_NOWAIT> were specified in I<msgflg>, and this "
"kernel was configured without B<CONFIG_CHECKPOINT_RESTORE>."
msgstr ""
"Флаг I<MSG_COPY> указан в I<msgflg>, но ядро собрано без параметра "
"B<CONFIG_CHECKPOINT_RESTORE>."

#. 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."

#.  MSG_COPY since glibc 2.18
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The B<MSG_EXCEPT> and B<MSG_COPY> flags are Linux-specific; their "
"definitions can be obtained by defining the B<_GNU_SOURCE> feature test "
"macro."
msgstr ""
"Флаги B<MSG_EXCEPT> и B<MSG_COPY> есть только в Linux; их определения можно "
"получить указав макрос тестирования свойств B<_GNU_SOURCE>."

#. 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, SVr4."
msgstr "POSIX.1-2001, SVr4."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The I<msgp> argument is declared as I<struct msgbuf\\ *> in glibc 2.0 and "
"2.1.  It is declared as I<void\\ *> in glibc 2.2 and later, as required by "
"SUSv2 and SUSv3."
msgstr ""
"Аргумент I<msgp> в glibc 2.0 и 2.1 объявлен как I<struct msgbuf *>. В glibc "
"2.2 и новее, в соответствии с SUSv2 и SUSv3, он объявлен как I<void\\ *>."

#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "NOTES"
msgstr "ПРИМЕЧАНИЯ"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The following limits on message queue resources affect the B<msgsnd>()  call:"
msgstr ""
"На работу системного вызова B<msgsnd>() влияют следующие системные "
"ограничения на ресурсы очереди сообщений:"

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<MSGMAX>"
msgstr "B<MSGMAX>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 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</proc/sys/kernel/msgmax>."
msgstr ""
"Максимальный размер текста сообщения: по умолчанию он равен 8192 байтам (в "
"Linux это ограничение можно прочитать и изменить через I</proc/sys/kernel/"
"msgmax>)."

#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<MSGMNB>"
msgstr "B<MSGMNB>"

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 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</proc/sys/"
"kernel/msgmnb>.  A privileged process (Linux: a process with the "
"B<CAP_SYS_RESOURCE> capability)  can increase the size of a message queue "
"beyond B<MSGMNB> using the B<msgctl>(2)  B<IPC_SET> operation."
msgstr ""
"Максимальное количество байт, которое может храниться в очереди сообщений "
"(по умолчанию 16384 байт). В Linux это ограничение можно прочитать и "
"изменить через I</proc/sys/kernel/msgmnb>. Привилегированный процесс (Linux: "
"процесс с мандатом B<CAP_SYS_RESOURCE>) может устанавливать размер очереди "
"сообщений больше чем B<MSGMNB> при помощи вызова B<msgctl>() с операцией "
"B<IPC_SET>."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The implementation has no intrinsic system-wide limits on the number of "
"message headers (B<MSGTQL>)  and the number of bytes in the message pool "
"(B<MSGPOOL>)."
msgstr ""
"Реализация не накладывает существенных системных ограничений на максимальное "
"количество заголовков сообщений (B<MSGTQL>) и на количество байт в пуле "
"сообщений (B<MSGPOOL>)."

#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "BUGS"
msgstr "ОШИБКИ"

#.  http://marc.info/?l=linux-kernel&m=139048542803605&w=2
#.  commit 4f87dac386cc43d5525da7a939d4b4e7edbea22c
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"In Linux 3.13 and earlier, if B<msgrcv>()  was called with the B<MSG_COPY> "
"flag, but without B<IPC_NOWAIT>, and the message queue contained less than "
"I<msgtyp> 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<regardless> of whether that message was at the ordinal position "
"I<msgtyp>.  This bug is fixed in Linux 3.14."
msgstr ""
"В Linux 3.13 и старее, если B<msgrcv>() был вызван с флагом B<MSG_COPY> "
"flag, но без B<IPC_NOWAIT>, и очередь сообщений содержала менее I<msgtyp> "
"сообщений, то вызов блокировал выполнения до тех пор, пока следующее "
"сообщение не записывалось в очередь. written to the queue. В этот момент "
"вызов возвращал копию сообщения, I<независимо> от того, что сообщение было в "
"начальной позиции I<msgtyp>. Этот дефект был исправлен в Linux 3.14."

#.  http://marc.info/?l=linux-kernel&m=139048542803605&w=2
#.  commit 4f87dac386cc43d5525da7a939d4b4e7edbea22c
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Specifying both B<MSG_COPY> and B<MSC_EXCEPT> in I<msgflg> is a logical "
"error (since these flags impose different interpretations on I<msgtyp>).  In "
"Linux 3.13 and earlier, this error was not diagnosed by B<msgrcv>().  This "
"bug is fixed in Linux 3.14."
msgstr ""
"Указание обоих флагов B<MSG_COPY> и B<MSC_EXCEPT> в I<msgflg> является "
"логической ошибкой (так как для флагов по-разному интерпретируется "
"I<msgtyp>). В Linux 3.13 и старее эта ошибка не определялась B<msgrcv>(). "
"Этот дефект был исправлен в Linux 3.14."

#. 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 program below demonstrates the use of B<msgsnd>()  and B<msgrcv>()."
msgstr ""
"Представленная ниже программа показывает использование B<msgsnd>() и "
"B<msgrcv>()."

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 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-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "The following shell session shows a sample run of the program:"
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< ./a.out -s>\n"
"sent: a message at Wed Mar  4 16:25:45 2015\n"
msgstr ""
"$B< ./a.out -s>\n"
"отправка: дата сообщения Wed Mar  4 16:25:45 2015\n"

#. 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 -r>\n"
"message received: a message at Wed Mar  4 16:25:45 2015\n"
msgstr ""
"$B< ./a.out -r>\n"
"приём: дата сообщения Wed Mar  4 16:25:45 2015\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 E<lt>errno.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
"#include E<lt>stdlib.hE<gt>\n"
"#include E<lt>sys/ipc.hE<gt>\n"
"#include E<lt>sys/msg.hE<gt>\n"
"#include E<lt>time.hE<gt>\n"
"#include E<lt>unistd.hE<gt>\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]\\en\", prog_name);\n"
"    fprintf(stderr, \"Options are:\\en\");\n"
"    fprintf(stderr, \"-s        send message using msgsnd()\\en\");\n"
"    fprintf(stderr, \"-r        read message using msgrcv()\\en\");\n"
"    fprintf(stderr, \"-t        message type (default is 1)\\en\");\n"
"    fprintf(stderr, \"-k        message queue key (default is 1234)\\en\");\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\\en\", 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()\\en\");\n"
"    } else {\n"
"        printf(\"message received: %s\\en\", 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<lt>= 0)\n"
"                usage(argv[0], \"-t option must be greater than 0\\en\");\n"
"            break;\n"
"        case \\[aq]k\\[aq]:\n"
"            msgkey = atoi(optarg);\n"
"            break;\n"
"        default:\n"
"            usage(argv[0], \"Unrecognized option\\en\");\n"
"        }\n"
"    }\n"
"\\&\n"
"    if (mode == 0)\n"
"        usage(argv[0], \"must use either -s or -r option\\en\");\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 ""

#.  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
msgid ""
"B<msgctl>(2), B<msgget>(2), B<capabilities>(7), B<mq_overview>(7), "
"B<sysvipc>(7)"
msgstr ""
"B<msgctl>(2), B<msgget>(2), B<capabilities>(7), B<mq_overview>(7), "
"B<sysvipc>(7)"

#. type: TH
#: debian-bookworm
#, no-wrap
msgid "2023-02-05"
msgstr "5 февраля 2023 г."

#. type: TH
#: debian-bookworm
#, no-wrap
msgid "Linux man-pages 6.03"
msgstr "Linux man-pages 6.03"

#. type: Plain text
#: debian-bookworm
msgid "POSIX.1-2001, POSIX.1-2008, SVr4."
msgstr "POSIX.1-2001, POSIX.1-2008, SVr4."

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"#include E<lt>errno.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
"#include E<lt>stdlib.hE<gt>\n"
"#include E<lt>sys/ipc.hE<gt>\n"
"#include E<lt>sys/msg.hE<gt>\n"
"#include E<lt>time.hE<gt>\n"
"#include E<lt>unistd.hE<gt>\n"
msgstr ""
"#include E<lt>errno.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
"#include E<lt>stdlib.hE<gt>\n"
"#include E<lt>sys/ipc.hE<gt>\n"
"#include E<lt>sys/msg.hE<gt>\n"
"#include E<lt>time.hE<gt>\n"
"#include E<lt>unistd.hE<gt>\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"struct msgbuf {\n"
"    long mtype;\n"
"    char mtext[80];\n"
"};\n"
msgstr ""
"struct msgbuf {\n"
"    long mtype;\n"
"    char mtext[80];\n"
"};\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"static void\n"
"usage(char *prog_name, char *msg)\n"
"{\n"
"    if (msg != NULL)\n"
"        fputs(msg, stderr);\n"
msgstr ""
"static void\n"
"usage(char *prog_name, char *msg)\n"
"{\n"
"    if (msg != NULL)\n"
"        fputs(msg, stderr);\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
"    fprintf(stderr, \"Options are:\\en\");\n"
"    fprintf(stderr, \"-s        send message using msgsnd()\\en\");\n"
"    fprintf(stderr, \"-r        read message using msgrcv()\\en\");\n"
"    fprintf(stderr, \"-t        message type (default is 1)\\en\");\n"
"    fprintf(stderr, \"-k        message queue key (default is 1234)\\en\");\n"
"    exit(EXIT_FAILURE);\n"
"}\n"
msgstr ""
"    fprintf(stderr, \"Использование: %s [параметры]\\en\", prog_name);\n"
"    fprintf(stderr, \"Параметры:\\en\");\n"
"    fprintf(stderr, \"-s        отправить сообщение с помощью msgsnd()\\en\");\n"
"    fprintf(stderr, \"-r        прочитать сообщение с помощью msgrcv()\\en\");\n"
"    fprintf(stderr, \"-t        тип сообщения (по умолчанию 1)\\en\");\n"
"    fprintf(stderr, \"-k        ключ очереди сообщения (по умолчанию 1234)\\en\");\n"
"    exit(EXIT_FAILURE);\n"
"}\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"static void\n"
"send_msg(int qid, int msgtype)\n"
"{\n"
"    time_t         t;\n"
"    struct msgbuf  msg;\n"
msgstr ""
"static void\n"
"send_msg(int qid, int msgtype)\n"
"{\n"
"    time_t         t;\n"
"    struct msgbuf  msg;\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "    msg.mtype = msgtype;\n"
msgstr "    msg.mtype = msgtype;\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    time(&t);\n"
"    snprintf(msg.mtext, sizeof(msg.mtext), \"a message at %s\",\n"
"             ctime(&t));\n"
msgstr ""
"    time(&t);\n"
"    snprintf(msg.mtext, sizeof(msg.mtext), \"дата сообщения %s\",\n"
"             ctime(&t));\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    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\\en\", msg.mtext);\n"
"}\n"
msgstr ""
"    if (msgsnd(qid, &msg, sizeof(msg.mtext),\n"
"               IPC_NOWAIT) == -1)\n"
"    {\n"
"        perror(\"msgsnd error\");\n"
"        exit(EXIT_FAILURE);\n"
"    }\n"
"    printf(\"отправка: %s\\en\", msg.mtext);\n"
"}\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"static void\n"
"get_msg(int qid, int msgtype)\n"
"{\n"
"    struct msgbuf msg;\n"
msgstr ""
"static void\n"
"get_msg(int qid, int msgtype)\n"
"{\n"
"    struct msgbuf msg;\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, fuzzy, no-wrap
#| msgid ""
#| "    if (msgrcv(qid, (void *) &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()\\en\");\n"
#| "    } else\n"
#| "        printf(\"message received: %s\\en\", msg.mtext);\n"
#| "}\n"
msgid ""
"    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()\\en\");\n"
"    } else {\n"
"        printf(\"message received: %s\\en\", msg.mtext);\n"
"    }\n"
"}\n"
msgstr ""
"    if (msgrcv(qid, (void *) &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(\"С помощью msgrcv() сообщений не получено\\en\");\n"
"    } else\n"
"        printf(\"приём: %s\\en\", msg.mtext);\n"
"}\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, fuzzy, no-wrap
#| msgid ""
#| "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"
msgid ""
"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"
msgstr ""
"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"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, fuzzy, no-wrap
#| msgid ""
#| "    while ((opt = getopt(argc, argv, \"srt:k:\")) != -1) {\n"
#| "        switch (opt) {\n"
#| "        case \\(aqs\\(aq:\n"
#| "            mode = 1;\n"
#| "            break;\n"
#| "        case \\(aqr\\(aq:\n"
#| "            mode = 2;\n"
#| "            break;\n"
#| "        case \\(aqt\\(aq:\n"
#| "            msgtype = atoi(optarg);\n"
#| "            if (msgtype E<lt>= 0)\n"
#| "                usage(argv[0], \"-t option must be greater than 0\\en\");\n"
#| "            break;\n"
#| "        case \\(aqk\\(aq:\n"
#| "            msgkey = atoi(optarg);\n"
#| "            break;\n"
#| "        default:\n"
#| "            usage(argv[0], \"Unrecognized option\\en\");\n"
#| "        }\n"
#| "    }\n"
msgid ""
"    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<lt>= 0)\n"
"                usage(argv[0], \"-t option must be greater than 0\\en\");\n"
"            break;\n"
"        case \\[aq]k\\[aq]:\n"
"            msgkey = atoi(optarg);\n"
"            break;\n"
"        default:\n"
"            usage(argv[0], \"Unrecognized option\\en\");\n"
"        }\n"
"    }\n"
msgstr ""
"    while ((opt = getopt(argc, argv, \"srt:k:\")) != -1) {\n"
"        switch (opt) {\n"
"        case \\(aqs\\(aq:\n"
"            mode = 1;\n"
"            break;\n"
"        case \\(aqr\\(aq:\n"
"            mode = 2;\n"
"            break;\n"
"        case \\(aqt\\(aq:\n"
"            msgtype = atoi(optarg);\n"
"            if (msgtype E<lt>= 0)\n"
"                usage(argv[0], \"параметр -t должен быть больше 0\\en\");\n"
"            break;\n"
"        case \\(aqk\\(aq:\n"
"            msgkey = atoi(optarg);\n"
"            break;\n"
"        default:\n"
"            usage(argv[0], \"Неизвестный параметр\\en\");\n"
"        }\n"
"    }\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    if (mode == 0)\n"
"        usage(argv[0], \"must use either -s or -r option\\en\");\n"
msgstr ""
"    if (mode == 0)\n"
"        usage(argv[0], \"нужно указать параметр -s или -r\\en\");\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "    qid = msgget(msgkey, IPC_CREAT | 0666);\n"
msgstr "    qid = msgget(msgkey, IPC_CREAT | 0666);\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    if (qid == -1) {\n"
"        perror(\"msgget\");\n"
"        exit(EXIT_FAILURE);\n"
"    }\n"
msgstr ""
"    if (qid == -1) {\n"
"        perror(\"msgget\");\n"
"        exit(EXIT_FAILURE);\n"
"    }\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    if (mode == 2)\n"
"        get_msg(qid, msgtype);\n"
"    else\n"
"        send_msg(qid, msgtype);\n"
msgstr ""
"    if (mode == 2)\n"
"        get_msg(qid, msgtype);\n"
"    else\n"
"        send_msg(qid, msgtype);\n"

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"    exit(EXIT_SUCCESS);\n"
"}\n"
msgstr ""
"    exit(EXIT_SUCCESS);\n"
"}\n"

#. type: TH
#: fedora-40 fedora-rawhide mageia-cauldron
#, no-wrap
msgid "2023-10-31"
msgstr "31 октября 2023 г."

#. type: TH
#: fedora-40 mageia-cauldron
#, no-wrap
msgid "Linux man-pages 6.06"
msgstr "Linux man-pages 6.06"

#. type: TH
#: fedora-rawhide
#, no-wrap
msgid "Linux man-pages 6.7"
msgstr "Linux man-pages 6.7"

#. type: TH
#: opensuse-leap-15-6
#, no-wrap
msgid "2023-03-30"
msgstr "30 марта 2023 г."

#. type: TH
#: opensuse-leap-15-6
#, no-wrap
msgid "Linux man-pages 6.04"
msgstr "Linux man-pages 6.04"

#. type: TH
#: opensuse-tumbleweed
#, fuzzy, no-wrap
#| msgid "Linux man-pages 6.7"
msgid "Linux man-pages (unreleased)"
msgstr "Linux man-pages 6.7"