# 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: 2026-06-05 06:42+0200\n" "PO-Revision-Date: 2024-12-21 19:49+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-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "select" msgstr "select" #. 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 #, fuzzy, no-wrap #| msgid "Linux man-pages 6.17" msgid "Linux man-pages 6.18" msgstr "Справочные страницы Linux 6.17" #. 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 "" "select, pselect, FD_CLR, FD_ISSET, FD_SET, FD_ZERO, fd_set - synchronous I/O " "multiplexing" msgstr "" "select, pselect, FD_CLR, FD_ISSET, FD_SET, FD_ZERO, fd_set - многопоточный " "синхронный ввод-вывод" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "БИБЛИОТЕКА" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "Standard C library (I,\\ I<-lc>)" msgstr "Стандартная библиотека языка C (I,\\ I<-lc>)" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "СИНТАКСИС" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B<#include Esys/select.hE>\n" msgstr "B<#include Esys/select.hE>\n" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "B /* ... */ B\n" msgid "B /* .\\|.\\|.\\& */ B\n" msgstr "B /* ... */ B\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "" #| "BIB<, fd_set *restrict >IB<,>\n" #| "B< fd_set *restrict >IB<, fd_set *restrict >IB<,>\n" #| "B< struct timeval *restrict >IB<);>\n" msgid "" "BIB<, fd_set *_Nullable restrict >IB<,>\n" "B< fd_set *_Nullable restrict >IB<,>\n" "B< fd_set *_Nullable restrict >IB<,>\n" "B< struct timeval *_Nullable restrict >IB<);>\n" msgstr "" "BIB<, fd_set *restrict >IB<,>\n" "B< fd_set *restrict >IB<, fd_set *restrict >IB<,>\n" "B< struct timeval *restrict >IB<);>\n" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "" #| "BIB<, fd_set *>IB<);>\n" #| "BIB<, fd_set *>IB<);>\n" #| "BIB<, fd_set *>IB<);>\n" #| "BIB<);>\n" msgid "" "BIB<, fd_set *>IB<);>\n" "BIB<, const fd_set *>IB<);>\n" "BIB<, fd_set *>IB<);>\n" "BIB<);>\n" msgstr "" "BIB<, fd_set *>IB<);>\n" "BIB<, fd_set *>IB<);>\n" "BIB<, fd_set *>IB<);>\n" "BIB<);>\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "" #| "BIB<, fd_set *restrict >IB<,>\n" #| "B< fd_set *restrict >IB<, fd_set *restrict >IB<,>\n" #| "B< const struct timespec *restrict >IB<,>\n" #| "B< const sigset_t *restrict >IB<);>\n" msgid "" "BIB<, fd_set *_Nullable restrict >IB<,>\n" "B< fd_set *_Nullable restrict >IB<,>\n" "B< fd_set *_Nullable restrict >IB<,>\n" "B< const struct timespec *_Nullable restrict >IB<,>\n" "B< const sigset_t *_Nullable restrict >IB<);>\n" msgstr "" "BIB<, fd_set *restrict >IB<,>\n" "B< fd_set *restrict >IB<, fd_set *restrict >IB<,>\n" "B< const struct timespec *restrict >IB<,>\n" "B< const sigset_t *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: B() and B() allow a program to monitor multiple file " #| "descriptors, waiting until one or more of the file descriptors become " #| "\"ready\" for some class of I/O operation (e.g., input possible). A file " #| "descriptor is considered ready if it is possible to perform a " #| "corresponding I/O operation (e.g., B(2), or a sufficiently small " #| "B(2)) without blocking." msgid "" "B() и B() позволяют программам отслеживать изменения " "нескольких файловых дескрипторов ожидая, когда один или более файловых " "дескрипторов станут «готовы» для операции ввода-вывода определённого типа " "(например, ввода). Файловый дескриптор считается готовым, если к нему " "возможно применить соответствующую операцию ввода-вывода (например, " "B(2) или очень маленький B(2)) без блокировки." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "fd_set" msgstr "fd_set" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "A structure type that can represent a set of file descriptors. According to " "POSIX, the maximum number of file descriptors in an I structure is " "the value of the macro B." msgstr "" #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "By file descriptor" msgid "File descriptor sets" msgstr "По файловому дескриптору" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The principal arguments of B() within a loop, the sets must be reinitialized before each " #| "call.)" msgid "" "B: Upon return, each of the file descriptor sets is modified in " "place to indicate which file descriptors are currently \"ready\". Thus, if " "using B() в цикле, то наборы должны переинициализироваться " "перед каждым вызовом)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The contents of a file descriptor set can be manipulated using the following " "macros:" 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 "" "This macro clears (removes all file descriptors from) I. It should be " "employed as the first step in initializing a file descriptor set." 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 "" "This macro adds the file descriptor I to I. Adding a file " "descriptor that is already present in the set is a no-op, and does not " "produce an error." 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 "" "This macro removes the file descriptor I from I. Removing a file " "descriptor that is not present in the set is a no-op, and does not produce " "an error." 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 B() macro can be " "used to test if a file descriptor is still present in a set. B() " "returns nonzero if the file descriptor I is present in I, and zero " "if it is not." msgstr "" #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Arguments" msgstr "Аргументы" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, fuzzy #| msgid "The elements of this structure are as follows:" msgid "The arguments of B() has returned, I will " #| "be cleared of all file descriptors except for those that are immediately " #| "available for reading." msgid "" "After B() в I " "остаются только те дескрипторы файлов, из которых возможно немедленное " "чтение." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "I" msgstr "I" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The file descriptors in this set are watched to see if they are ready for " "writing. A file descriptor is ready for writing if a write operation will " "not block. However, even if a file descriptor indicates as writable, a " "large write may still block." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, fuzzy #| msgid "" #| "This set is watched to see if there is space to write data to any of its " #| "file descriptors. After B() has returned, I will be cleared of all file " "descriptors except for those that are ready for writing." msgstr "" "Этот набор служит для слежения за появлением места для записи данных в любой " "из файловых дескрипторов набора. После возврата из B() has returned, I will be cleared of all file " "descriptors except for those for which an exceptional condition has occurred." msgstr "" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "I" msgstr "I" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, fuzzy #| msgid "" #| "I should be set to the highest-numbered file descriptor in any of " #| "the three sets, plus 1. The indicated file descriptors in each set are " #| "checked, up to this limit (but see BUGS)." msgid "" "This argument should be set to the highest-numbered file descriptor in any " "of the three sets, plus 1. The indicated file descriptors in each set are " "checked, up to this limit (but see BUGS)." msgstr "" "Значение I должно быть на единицу больше самого большого номера " "файлового дескриптора из всех трёх наборов плюс 1. Указанные файловые " "дескрипторы в каждом наборе проверяются до этого порога (но смотрите " "ДЕФЕКТЫ)." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "I" msgstr "I" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, fuzzy #| msgid "" #| "The I argument specifies the interval that B() should block waiting for a file " "descriptor to become ready. The call will block until either:" msgstr "" "В аргументе I указывается интервал, на который должен " "заблокироваться B() returns immediately. (This is " #| "useful for polling.) If I is NULL (no timeout), B() " "завершится немедленно (полезно при опросе (polling)). Если значение " "I равно NULL (время ожидания не задано), то B() " "returns immediately. (This is useful for polling.)" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, fuzzy #| msgid "" #| "The I argument specifies the interval that B() blocks indefinitely waiting " "for a file descriptor to become ready." msgstr "" "В аргументе I указывается интервал, на который должен " "заблокироваться B() and B() is identical, other than " "these three differences:" msgstr "" "Работа B() uses a timeout that is a I (with seconds and " "microseconds), while B() uses a I (with seconds " "and nanoseconds)." msgstr "" "В вызове B() may update the I argument to indicate how much time " "was left. B() does not change this argument." msgstr "" "Вызов B() has no I argument, and behaves as B() called " "with NULL I." msgstr "" "Вызов B() could hang indefinitely if the signal arrived just " "after the test but just before the call. By contrast, B() allows " "one to first block signals, handle the signals that have come in, then call " "B() with the desired I, avoiding the race.)" msgstr "" "Причина необходимости B() в том, что если нужно ждать какого-то " "сигнала или готовности файлового дескриптора, то необходимо атомарное " "тестирование для избежания состязательности. (Предположим, что обработчик " "сигнала устанавливает глобальный флаг и завершается. В этом случае тест " "этого глобального флага после вызова B() is a structure of the following " "type:" msgstr "Метки времени файла хранятся в структуре следующего вида:" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "struct timeval {\n" " time_t tv_sec; /* seconds */\n" " suseconds_t tv_usec; /* microseconds */\n" "};\n" msgstr "" "struct timeval {\n" " time_t tv_sec; /* секунды */\n" " suseconds_t tv_usec; /* микросекунды */\n" "};\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The corresponding argument for B() is a B(3) structure." msgstr "" #. .P - it is rumored that: #. On BSD, when a timeout occurs, the file descriptor bits are not changed. #. - it is certainly true that: #. Linux follows SUSv2 and sets the bit masks to zero upon a timeout. #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, fuzzy #| msgid "" #| "On Linux, B()s in a " #| "loop without reinitializing it. Consider I to be undefined " #| "after B() modifies I to reflect the amount of time not " "slept; most other implementations do not do this. (POSIX.1 permits either " "behavior.) This causes problems both when Linux code which reads I " "is ported to other operating systems, and when code is ported to Linux that " "reuses a I for multiple B() " "returns." msgstr "" "В Linux вызов B() в цикле без его " "переинициализации. Во избежание этого следует считать, что значение " "I не определено после возврата из B() and B() return the number of file " #| "descriptors contained in the three returned descriptor sets (that is, the " #| "total number of bits that are set in I, I, " #| "I) which may be zero if the timeout expires before anything " #| "interesting happens. On error, -1 is returned, and I is set to " #| "indicate the error; the file descriptor sets are unmodified, and " #| "I becomes undefined." msgid "" "On success, B() и B() возвращают количество " "файловых дескрипторов, находящихся в трёх возвращаемых наборах (то есть, " "общее количество бит, установленных в I, I, " "I), при чём это количество может быть нулевым, если время " "ожидания истекло, а интересующие события так и не произошли. При ошибке " "возвращается значение -1, а переменной I присваивается " "соответствующий номер ошибки; наборы файловых дескрипторов не изменяются и " "значение I становится неопределённым." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, fuzzy #| msgid "" #| "On error, -1 is returned and I is set to indicate the cause of the " #| "error (for example, B, indicating that I is invalid)." msgid "" "On error, -1 is returned, and I is set to indicate the error; the " "file descriptor sets are unmodified, and I becomes undefined." msgstr "" "При ошибке возвращается -1, а в I содержится код ошибки (например, " "B означает, что некорректно I)." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "ERRORS" msgstr "ОШИБКИ" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "An invalid file descriptor was given in one of the sets. (Perhaps a file " "descriptor that was already closed, or one on which an error has occurred.) " "However, see BUGS." 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 "A signal was caught; 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 negative or exceeds the B resource limit (see " "B(2))." msgstr "" "Значение I отрицательно или превышает ограничение ресурса " "B (смотрите B(2))." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "The value contained within I is invalid." msgstr "Значение, содержащееся внутри I, некорректно." #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "Unable to allocate memory for internal tables." msgstr "Не удалось выделить память для внутренних таблиц." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "VERSIONS" msgstr "ВЕРСИИ" #. Darwin, according to a report by Jeremy Sequoia, relayed by Josh Triplett #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "On some other UNIX systems, B(). Portable programs may wish to check for B and " "loop, just as with B." msgstr "" "В некоторых системах UNIX вызов B(). В переносимых программах лучше ожидать " "B в цикле, как для B." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "СТАНДАРТЫ" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "POSIX.1-2024." msgstr "POSIX.1-2024." #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "ИСТОРИЯ" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "B()" msgstr "B() conforms to POSIX.1-2001, POSIX.1-2008, and 4.4BSD " #| "(B() соответствует POSIX.1-2001, POSIX.1-2008 и 4.4BSD (впервые " "B() and B() is not affected by the " "B flag." msgstr "На операции B() in the main program. (To avoid possibly blocking when writing " "to a pipe that may be full or reading from a pipe that may be empty, " "nonblocking I/O is used when reading from and writing to the pipe.)" msgstr "" "В системах без B(), надёжного (и более переносимого) перехвата " "сигнала можно достичь с помощью трюка с каналом в самого себя. В этом методе " "обработчик сигнала пишет байт в канал, чей второй конец отслеживается " "B() with all three sets empty, I zero, and " #| "a non-NULL I as a fairly portable way to sleep with subsecond " #| "precision." msgid "" "Before the advent of B(3), some code employed a call to B() вызывается с пустыми наборами (всеми тремя), I " "равным нулю и непустым I для переносимой реализации перехода в " "режим ожидания (sleep) на периоды с точностью менее секунды." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Correspondence between select() and poll() notifications" msgstr "Соотношение между уведомлениями select() и poll()" #. fs/select.c #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Within the Linux kernel source, we find the following definitions which show " "the correspondence between the readable, writable, and exceptional condition " "notifications of B() и уведомляющими событиями, предоставляемыми B(2) и " "B(7):" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "" #| "#define POLLIN_SET (POLLRDNORM | POLLRDBAND | POLLIN | POLLHUP |\n" #| " POLLERR)\n" #| " /* Ready for reading */\n" #| "#define POLLOUT_SET (POLLWRBAND | POLLWRNORM | POLLOUT | POLLERR)\n" #| " /* Ready for writing */\n" #| "#define POLLEX_SET (POLLPRI)\n" #| " /* Exceptional condition */\n" msgid "" "#define POLLIN_SET (EPOLLRDNORM | EPOLLRDBAND | EPOLLIN |\n" " EPOLLHUP | EPOLLERR)\n" " /* Ready for reading */\n" "#define POLLOUT_SET (EPOLLWRBAND | EPOLLWRNORM | EPOLLOUT |\n" " EPOLLERR)\n" " /* Ready for writing */\n" "#define POLLEX_SET (EPOLLPRI)\n" " /* Exceptional condition */\n" msgstr "" "#define POLLIN_SET (POLLRDNORM | POLLRDBAND | POLLIN | POLLHUP |\n" " POLLERR)\n" " /* готов для чтения */\n" "#define POLLOUT_SET (POLLWRBAND | POLLWRNORM | POLLOUT | POLLERR)\n" " /* готов для записи */\n" "#define POLLEX_SET (POLLPRI)\n" " /* исключительное условие */\n" #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Multithreaded applications" msgstr "Многонитевые приложения" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If a file descriptor being monitored by B() " "unblocks and returns, with an indication that the file descriptor is ready " "(a subsequent I/O operation will likely fail with an error, unless another " "process reopens the file descriptor between the time B(). " "In summary, any application that relies on a particular behavior in this " "scenario must be considered buggy." msgstr "" "Если файловой дескриптор, отслеживаемый B() " "разблокируется и возвращает выполнение с указанием того, что файловый " "дескриптор готов (последующая операция ввода-вывода, вероятно, завершится с " "ошибкой, если другой процесс не переоткроет файловый дескриптор между " "возвратом B(). Резюмируя, любое приложение, которое полагается на " "определённое поведение в таком сценарии, должно считаться ошибочным." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "C library/kernel differences" msgstr "Отличия между библиотекой C и ядром" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The Linux kernel allows file descriptor sets of arbitrary size, determining " "the length of the sets to be checked from the value of I. However, in " "the glibc implementation, the I type is fixed in size. See also " "BUGS." msgstr "" "Ядро Linux разрешает наборы файловых дескрипторов любого размера, определяя " "длину набора по значению I. Однако в реализации glibc тип I " "имеет фиксированный размер. Смотрите также ДЕФЕКТЫ." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() interface described in this page is implemented by glibc. " "The underlying Linux system call is named B(). This system call " "has somewhat different behavior from the glibc wrapper function." msgstr "" "Интерфейс B(), описанный в этой странице, реализован в glibc. Для " "этого используется системный вызов B(). Поведение данного " "системного вызова несколько отличается от обёрточной функции glibc." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The Linux B() system call modifies its I argument. " "However, the glibc wrapper function hides this behavior by using a local " "variable for the timeout argument that is passed to the system call. Thus, " "the glibc B() function does not modify its I argument; " "this is the behavior required by POSIX.1-2001." msgstr "" "В Linux системный вызов B() изменяет содержимое своего аргумента " "I. Однако, обёрточная функция glibc скрывает это поведение " "используя локальную переменную для аргумента timeout при передаче в " "системный вызов. Таким образом, функция B() в glibc не изменяет " "свой аргумент I; это поведение требуется в POSIX.1-2001." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The final argument of the B() system call is not a I pointer, but is instead a structure of the form:" msgstr "" "Последний аргумент системного вызова B() не является указателем " "I, он представляет собой структуру в виде:" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "" #| "struct {\n" #| " const kernel_sigset_t *ss; /* Pointer to signal set */\n" #| " size_t ss_len; /* Size (in bytes) of object\n" #| " pointed to by \\(aqss\\(aq */\n" #| "};\n" msgid "" "struct {\n" " const kernel_sigset_t *ss; /* Pointer to signal set */\n" " size_t ss_len; /* Size (in bytes) of object\n" " pointed to by \\[aq]ss\\[aq] */\n" "};\n" msgstr "" "struct {\n" " const kernel_sigset_t *ss; /* указатель на набор сигналов */\n" " size_t ss_len; /* размер (в байтах) объекта,\n" " на который указывает \\(aqss\\(aq */\n" "};\n" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "This allows the system call to obtain both a pointer to the signal set and " "its size, while allowing for the fact that most architectures support a " "maximum of 6 arguments to a system call. See B(2) for a " "discussion of the difference between the kernel and libc notion of the " "signal set." msgstr "" "Это позволяет системному вызову получить указатель на набор сигналов и его " "размер, так как в большинстве архитектур системным вызовам можно передать " "максимум 6 аргументов. В B(2) смотрите описание различий между " "обозначением набора сигналов в ядре и libc." #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "Historical details" msgid "Historical glibc details" msgstr "Историческая справка" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, fuzzy #| msgid "" #| "Glibc 2.0 provided a version of B() that did not take a " #| "I argument." msgid "" "glibc 2.0 provided an incorrect version of B() that did not take a " "I argument." msgstr "" "Glibc 2.0 предоставляет версию B(), которая не принимает аргумент " "I." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "From glibc 2.1 to glibc 2.2.1, one must define B<_GNU_SOURCE> in order to " "obtain the declaration of B() from Isys/select.hE>." msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "BUGS" msgstr "ПРОГРАММНЫЕ ОШИБКИ" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, fuzzy #| msgid "" #| "POSIX allows an implementation to define an upper limit, advertised via " #| "the constant B, on the range of file descriptors that can be " #| "specified in a file descriptor set. The Linux kernel imposes no fixed " #| "limit, but the glibc implementation makes I a fixed-size type, " #| "with B defined as 1024, and the B() macros operating " #| "according to that limit. To monitor file descriptors greater than 1023, " #| "use B(2) instead." msgid "" "POSIX allows an implementation to define an upper limit, advertised via the " "constant B, on the range of file descriptors that can be " "specified in a file descriptor set. The Linux kernel imposes no fixed " "limit, but the glibc implementation makes I a fixed-size type, with " "B defined as 1024, and the B() macros operating according " "to that limit. To monitor file descriptors greater than 1023, use " "B(2) or B(7) instead." msgstr "" "В POSIX разрешено в реализации определять верхнее ограничение, объявляемое " "через константу B, для диапазона файловых дескрипторов, который " "можно задать в наборе файловых дескрипторов. Ядро Linux не имеет " "фиксированного ограничения, но реализация glibc использует тип I " "постоянного размера, определяет B равным 1024, а также " "предоставляет набор макросов операций B(), учитывающих это " "ограничение. Для слежения за файловыми дескрипторами большими чем 1023 " "используйте вызов B(2)." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, fuzzy #| msgid "" #| "The implementation of the I arguments as value-result arguments " #| "means that they must be reinitialized on each call to B(). Такой ошибки проектирования избежали в B(2), где " "используется отдельные поля структуры для входных и выходных параметров " "вызова." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "According to POSIX, B() должен проверять все файловые дескрипторы, " "указанные в трёх наборах файловых дескрипторов до верхнего порога I. " "Однако текущая реализация игнорирует любой файловый дескриптор в этих " "наборах, значение которого больше максимального номера файлового " "дескриптора, который в настоящий момент открыт процессом. Согласно POSIX, " "такой файловый дескриптор, указанный в любом наборе, должен приводить к " "ошибке B." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, fuzzy #| msgid "" #| "Starting with version 2.1, glibc provided an emulation of B() " #| "that was implemented using B(2) and B(). This " "implementation remained vulnerable to the very race condition that " "B() was designed to prevent. Modern versions of glibc use the " "(race-free) B() system call on kernels where it is provided." msgstr "" "Начиная с версии 2.1, glibc предоставляет эмуляцию B(), которая " "реализована с помощью B(2) и B() may report a socket file descriptor as \"ready " #| "for reading\", while nevertheless a subsequent read blocks. This could " #| "for example happen when data has arrived but upon examination has wrong " #| "checksum and is discarded. There may be other circumstances in which a " #| "file descriptor is spuriously reported as ready. Thus it may be safer to " #| "use B on sockets that should not block." msgid "" "On Linux, B() может сообщать о файловом дескрипторе сокета как " "о «готовом для чтения», хотя при последующем чтении произойдёт блокировка. " "Это может случиться, например, когда данные прибыли, но при анализе их " "контрольная сумма не совпала и они были отброшены. Также могут быть другие " "обстоятельства, при которых файловый дескриптор ошибочно считается готовым. " "Поэтому, возможно безопасней будет использовать для сокетов B, " "которые не должны блокироваться." #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "On Linux, B() также изменяет I, если он прерван " "обработчиком сигнала (т. е., возвращается ошибка B). Согласно POSIX.1 " "это не разрешено. В Linux системный вызов B() действует также, но " "обёртка glibc скрывает это поведение копируя перед вызовом I в " "локальную переменную и передавая её в системный вызов." #. 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-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/select.hE\n" "#include Esys/time.hE\n" "\\&\n" "int\n" "main(void)\n" "{\n" " int retval;\n" " fd_set rfds;\n" " struct timeval tv;\n" "\\&\n" " /* Watch stdin (fd 0) to see when it has input. */\n" "\\&\n" " FD_ZERO(&rfds);\n" " FD_SET(0, &rfds);\n" "\\&\n" " /* Wait up to five seconds. */\n" "\\&\n" " tv.tv_sec = 5;\n" " tv.tv_usec = 0;\n" "\\&\n" " retval = select(1, &rfds, NULL, NULL, &tv);\n" " /* Don\\[aq]t rely on the value of tv now! */\n" "\\&\n" " if (retval == -1)\n" " perror(\"select()\");\n" " else if (retval)\n" " printf(\"Data is available now.\\[rs]n\");\n" " /* FD_ISSET(0, &rfds) will be true. */\n" " else\n" " printf(\"No data within five seconds.\\[rs]n\");\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" #. SRC END #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "СМОТРИТЕ ТАКЖЕ" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B(2), B(2), B(2), B(2), B(2), " "B(2), B(2), B(2), B(2), " "B(3), B(7), B