Debian Codegraph @

po/ru/man2/poll.2.po

raw
1 # Russian translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Alexey, 2016.
5 # Azamat Hackimov <[email protected]>, 2014-2017.
6 # kogamatranslator49 <[email protected]>, 2015.
7 # Darima Kogan <[email protected]>, 2014.
8 # Max Is <[email protected]>, 2016.
9 # Yuri Kozlov <[email protected]>, 2011-2019.
10 # Иван Павлов <[email protected]>, 2017.
11 msgid ""
12 msgstr ""
13 "Project-Id-Version: manpages-l10n\n"
14 "POT-Creation-Date: 2026-06-05 06:35+0200\n"
15 "PO-Revision-Date: 2024-12-21 19:49+0300\n"
16 "Last-Translator: Yuri Kozlov <[email protected]>\n"
17 "Language-Team: Russian <[email protected]>\n"
18 "Language: ru\n"
19 "MIME-Version: 1.0\n"
20 "Content-Type: text/plain; charset=UTF-8\n"
21 "Content-Transfer-Encoding: 8bit\n"
22 "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
23 "n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || "
24 "(n%100>=11 && n%100<=14)? 2 : 3);\n"
25 "X-Generator: Lokalize 2.0\n"
26
27 #. type: TH
28 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
29 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
30 #, no-wrap
31 msgid "poll"
32 msgstr "poll"
33
34 #. type: TH
35 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
36 #: opensuse-tumbleweed
37 #, no-wrap
38 msgid "2026-02-08"
39 msgstr "8 февраля 2026 г."
40
41 #. type: TH
42 #: archlinux debian-unstable
43 #, fuzzy, no-wrap
44 #| msgid "Linux man-pages 6.17"
45 msgid "Linux man-pages 6.18"
46 msgstr "Справочные страницы Linux 6.17"
47
48 #. type: SH
49 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
50 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
51 #, no-wrap
52 msgid "NAME"
53 msgstr "НАИМЕНОВАНИЕ"
54
55 #. type: Plain text
56 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
57 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
58 msgid "poll, ppoll - wait for some event on a file descriptor"
59 msgstr "poll, ppoll - ожидает некоторое событие над файловым дескриптором"
60
61 #. type: SH
62 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
63 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
64 #, no-wrap
65 msgid "LIBRARY"
66 msgstr "БИБЛИОТЕКА"
67
68 #. type: Plain text
69 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
70 #: opensuse-leap-16-1 opensuse-tumbleweed
71 msgid "Standard C library (I<libc>,\\ I<-lc>)"
72 msgstr "Стандартная библиотека языка C (I<libc>,\\ I<-lc>)"
73
74 #. type: SH
75 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
76 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
77 #, no-wrap
78 msgid "SYNOPSIS"
79 msgstr "СИНТАКСИС"
80
81 #. type: Plain text
82 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
83 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
84 #, no-wrap
85 msgid "B<#include E<lt>poll.hE<gt>>\n"
86 msgstr "B<#include E<lt>poll.hE<gt>>\n"
87
88 #. type: Plain text
89 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
90 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
91 #, no-wrap
92 msgid "B<int poll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, int >I<timeout>B<);>\n"
93 msgstr "B<int poll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, int >I<timeout>B<);>\n"
94
95 #. type: Plain text
96 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
97 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
98 #, no-wrap
99 msgid ""
100 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
101 "B<#include E<lt>poll.hE<gt>>\n"
102 msgstr ""
103 "B<#define _GNU_SOURCE> /* см. feature_test_macros(7) */\n"
104 "B<#include E<lt>poll.hE<gt>>\n"
105
106 #. type: Plain text
107 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
108 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
109 #, fuzzy, no-wrap
110 #| msgid ""
111 #| "B<int ppoll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<,>\n"
112 #| "B< const struct timespec *>I<tmo_p>B<, const sigset_t *>I<sigmask>B<);>\n"
113 msgid ""
114 "B<int ppoll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<,>\n"
115 "B< const struct timespec *_Nullable >I<tmo_p>B<,>\n"
116 "B< const sigset_t *_Nullable >I<sigmask>B<);>\n"
117 msgstr ""
118 "B<int ppoll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<,>\n"
119 "B< const struct timespec *>I<tmo_p>B<, const sigset_t *>I<sigmask>B<);>\n"
120
121 #. type: SH
122 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
123 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
124 #, no-wrap
125 msgid "DESCRIPTION"
126 msgstr "ОПИСАНИЕ"
127
128 #. type: Plain text
129 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
130 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
131 #, fuzzy
132 #| msgid ""
133 #| "B<poll>() performs a similar task to B<select>(2): it waits for one of a "
134 #| "set of file descriptors to become ready to perform I/O."
135 msgid ""
136 "B<poll>() performs a similar task to B<select>(2): it waits for one of a "
137 "set of file descriptors to become ready to perform I/O. The Linux-specific "
138 "B<epoll>(7) API performs a similar task, but offers features beyond those "
139 "found in B<poll>()."
140 msgstr ""
141 "Вызов B<poll>() выполняет сходную с B<select>(2) задачу: он ждёт пока один "
142 "дескриптор из набора файловых дескрипторов не станет готов выполнить "
143 "операцию ввода-вывода."
144
145 #. type: Plain text
146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
148 msgid ""
149 "The set of file descriptors to be monitored is specified in the I<fds> "
150 "argument, which is an array of structures of the following form:"
151 msgstr ""
152 "Отслеживаемый набор файловых дескрипторов задаётся в аргументе I<fds>, "
153 "который представляет собой массив структур:"
154
155 #. type: Plain text
156 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
157 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
158 #, no-wrap
159 msgid ""
160 "struct pollfd {\n"
161 " int fd; /* file descriptor */\n"
162 " short events; /* requested events */\n"
163 " short revents; /* returned events */\n"
164 "};\n"
165 msgstr ""
166 "struct pollfd {\n"
167 " int fd; /* файловый дескриптор */\n"
168 " short events; /* запрашиваемые события */\n"
169 " short revents; /* возвращённые события */\n"
170 "};\n"
171
172 #. type: Plain text
173 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
174 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
175 msgid ""
176 "The caller should specify the number of items in the I<fds> array in I<nfds>."
177 msgstr ""
178 "Вызывающий должен указать количество элементов в массиве I<fds> в аргументе "
179 "I<nfds>."
180
181 #. type: Plain text
182 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
183 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
184 #, fuzzy
185 #| msgid ""
186 #| "The field I<fd> contains a file descriptor for an open file. If this "
187 #| "field is negative, then the corresponding I<events> field is ignored and "
188 #| "the I<revents> field returns zero. (This provides an easy way of "
189 #| "ignoring a file descriptor for a single B<poll>() call: simply negate "
190 #| "the I<fd> field. Note, however, that this technique can't be used to "
191 #| "ignore file descriptor 0.)"
192 msgid ""
193 "The field I<fd> contains a file descriptor for an open file. If this field "
194 "is negative, then the corresponding I<events> field is ignored and the "
195 "I<revents> field returns zero. (This provides an easy way of ignoring a "
196 "file descriptor for a single B<poll>() call: simply set the I<fd> field to "
197 "its bitwise complement.)"
198 msgstr ""
199 "В поле I<fd> содержится файловый дескриптор открытого файла. Если значение "
200 "поля отрицательно, то соответствующее поле I<events> игнорируется, а полю "
201 "I<revents> возвращает ноль (простой способ игнорирования файлового "
202 "дескриптора в одиночном вызове B<poll>(): просто сделать значение поля I<fd> "
203 "отрицательным. Заметим, что это нельзя использовать для игнорирования "
204 "файлового дескриптора 0)."
205
206 #. type: Plain text
207 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
208 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
209 msgid ""
210 "The field I<events> is an input parameter, a bit mask specifying the events "
211 "the application is interested in for the file descriptor I<fd>. This field "
212 "may be specified as zero, in which case the only events that can be returned "
213 "in I<revents> are B<POLLHUP>, B<POLLERR>, and B<POLLNVAL> (see below)."
214 msgstr ""
215 "Поле I<events> представляет собой входной параметр — битовую маску, "
216 "указывающую на события, происходящие с файловым дескриптором I<fd>, которые "
217 "важны для приложения. Если это поле равно нулю, то возвращаемыми событиями в "
218 "I<revents> могут быть B<POLLHUP>, B<POLLERR> и B<POLLNVAL> (смотрите ниже)."
219
220 #. type: Plain text
221 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
222 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
223 msgid ""
224 "The field I<revents> is an output parameter, filled by the kernel with the "
225 "events that actually occurred. The bits returned in I<revents> can include "
226 "any of those specified in I<events>, or one of the values B<POLLERR>, "
227 "B<POLLHUP>, or B<POLLNVAL>. (These three bits are meaningless in the "
228 "I<events> field, and will be set in the I<revents> field whenever the "
229 "corresponding condition is true.)"
230 msgstr ""
231 "Поле I<revents> представляет собой параметр-результат, в который ядро "
232 "помещает информацию о произошедших событиях. В I<revents> могут содержаться "
233 "любые битовые флаги из задаваемых в I<events>, или там может быть одно из "
234 "значений: B<POLLERR>, B<POLLHUP> или B<POLLNVAL>. Эти три битовых флага не "
235 "имеют смысла в поле I<events>, но будут установлены в поле I<revents>, если "
236 "соответствующее условие истинно."
237
238 #. type: Plain text
239 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
240 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
241 msgid ""
242 "If none of the events requested (and no error) has occurred for any of the "
243 "file descriptors, then B<poll>() blocks until one of the events occurs."
244 msgstr ""
245 "Если ни одно из запрошенных событий с файловыми дескрипторами не произошло "
246 "или не возникло ошибок, то B<poll>() блокируется до их появления."
247
248 #. type: Plain text
249 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
250 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
251 msgid ""
252 "The I<timeout> argument specifies the number of milliseconds that B<poll>() "
253 "should block waiting for a file descriptor to become ready. The call will "
254 "block until either:"
255 msgstr ""
256 "В аргументе I<timeout> указывается количество миллисекунд, на которые будет "
257 "блокироваться B<poll>() в ожидании готовности файлового дескриптора. Вызов "
258 "будет заблокирован пока:"
259
260 #. type: IP
261 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
262 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
263 #, no-wrap
264 msgid "\\[bu]"
265 msgstr "\\[bu]"
266
267 #. type: Plain text
268 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
269 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
270 msgid "a file descriptor becomes ready;"
271 msgstr "файловый дескриптор не станет готов;"
272
273 #. type: Plain text
274 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
275 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
276 msgid "the call is interrupted by a signal handler; or"
277 msgstr "вызов не прервётся обработчиком сигнала;"
278
279 #. type: Plain text
280 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
281 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
282 msgid "the timeout expires."
283 msgstr "не истечёт время ожидания."
284
285 #. type: Plain text
286 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
287 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
288 msgid ""
289 "Being \"ready\" means that the requested operation will not block; thus, "
290 "B<poll>()ing regular files, block devices, and other files with no "
291 "reasonable polling semantic I<always> returns instantly as ready to read and "
292 "write."
293 msgstr ""
294
295 #. type: Plain text
296 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
297 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
298 msgid ""
299 "Note that the I<timeout> interval will be rounded up to the system clock "
300 "granularity, and kernel scheduling delays mean that the blocking interval "
301 "may overrun by a small amount. Specifying a negative value in I<timeout> "
302 "means an infinite timeout. Specifying a I<timeout> of zero causes "
303 "B<poll>() to return immediately, even if no file descriptors are ready."
304 msgstr ""
305 "Заметим, что интервал I<timeout> будет округлён с точностью системных часов, "
306 "а из-за задержки при планировании в ядре блокирующий интервал будет немного "
307 "больше. Отрицательное значение в I<timeout> означает бесконечное ожидание. "
308 "Значение I<timeout>, равное нулю, приводит к немедленному завершению "
309 "B<poll>(), даже если ни один файловый дескриптор не готов."
310
311 #. type: Plain text
312 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
313 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
314 msgid ""
315 "The bits that may be set/returned in I<events> and I<revents> are defined in "
316 "I<E<lt>poll.hE<gt>>:"
317 msgstr ""
318 "Вот возможные биты, описанные в I<E<lt>poll.hE<gt>>, которые могут быть "
319 "установлены/получены в I<events> и I<revents>:"
320
321 #. type: TP
322 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
323 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
324 #, no-wrap
325 msgid "B<POLLIN>"
326 msgstr "B<POLLIN>"
327
328 #. type: Plain text
329 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
330 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
331 msgid "There is data to read."
332 msgstr "Есть данные для чтения."
333
334 #. type: TP
335 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
336 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
337 #, no-wrap
338 msgid "B<POLLPRI>"
339 msgstr "B<POLLPRI>"
340
341 #. type: Plain text
342 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
343 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
344 msgid ""
345 "There is some exceptional condition on the file descriptor. Possibilities "
346 "include:"
347 msgstr "Исключительное состояние файлового дескриптора. Может быть из-за:"
348
349 #. type: Plain text
350 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
351 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
352 msgid "There is out-of-band data on a TCP socket (see B<tcp>(7))."
353 msgstr "Внеполосные данные в сокете TCP (смотрите B<tcp>(7))."
354
355 #. type: Plain text
356 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
357 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
358 msgid ""
359 "A pseudoterminal master in packet mode has seen a state change on the slave "
360 "(see B<ioctl_tty>(2))."
361 msgstr ""
362 "Мастер псевдо-терминала в пакетном режиме увидел изменение состояния "
363 "подчинённого терминала (смотрите B<ioctl_tty>(2))."
364
365 #. type: Plain text
366 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
367 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
368 msgid "A I<cgroup.events> file has been modified (see B<cgroups>(7))."
369 msgstr "Изменился файл I<cgroup.events> (смотрите B<cgroups>(7))."
370
371 #. type: TP
372 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
373 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
374 #, no-wrap
375 msgid "B<POLLOUT>"
376 msgstr "B<POLLOUT>"
377
378 #. type: Plain text
379 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
380 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
381 msgid ""
382 "Writing is now possible, though a write larger than the available space in a "
383 "socket or pipe will still block (unless B<O_NONBLOCK> is set)."
384 msgstr ""
385 "Теперь запись возможна, но запись данных больше, чем доступно места в сокете "
386 "или канале, по-прежнему приводит к блокировке (если не указан B<O_NONBLOCK>)."
387
388 #. type: TP
389 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
390 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
391 #, no-wrap
392 msgid "B<POLLRDHUP> (since Linux 2.6.17)"
393 msgstr "B<POLLRDHUP> (начиная с Linux 2.6.17)"
394
395 #. type: Plain text
396 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
397 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
398 msgid ""
399 "Stream socket peer closed connection, or shut down writing half of "
400 "connection. The B<_GNU_SOURCE> feature test macro must be defined (before "
401 "including I<any> header files) in order to obtain this definition."
402 msgstr ""
403 "Удалённая сторона потокового сокета закрыла соединение, или отключила запись "
404 "в одну сторону. Для использования данного определения должен быть определён "
405 "макрос тестирования свойств B<_GNU_SOURCE> (до включения I<каких-либо> "
406 "заголовочных файлов)."
407
408 #. type: TP
409 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
410 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
411 #, no-wrap
412 msgid "B<POLLERR>"
413 msgstr "B<POLLERR>"
414
415 #. type: Plain text
416 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
417 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
418 msgid ""
419 "Error condition (only returned in I<revents>; ignored in I<events>). This "
420 "bit is also set for a file descriptor referring to the write end of a pipe "
421 "when the read end has been closed."
422 msgstr ""
423 "Состояние ошибки (возвращается только в I<revents>; игнорируется в "
424 "I<events>). Также этот бит устанавливается для файлового дескриптора, "
425 "указывающего в пишущий конец канала при закрытом читающем конце."
426
427 #. type: TP
428 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
429 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
430 #, no-wrap
431 msgid "B<POLLHUP>"
432 msgstr "B<POLLHUP>"
433
434 #. type: Plain text
435 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
436 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
437 msgid ""
438 "Hang up (only returned in I<revents>; ignored in I<events>). Note that when "
439 "reading from a channel such as a pipe or a stream socket, this event merely "
440 "indicates that the peer closed its end of the channel. Subsequent reads "
441 "from the channel will return 0 (end of file) only after all outstanding "
442 "data in the channel has been consumed."
443 msgstr ""
444 "Зависание (hang up, возвращается только в I<revents>; игнорируется в "
445 "I<events>). Заметим, что при чтении из канала, такого как канал (pipe) или "
446 "потоковый сокет, это событие всего-навсего показывает, что партнёр закрыл "
447 "канал со своего конца. Дальнейшее чтение из канала будет возвращать 0 (конец "
448 "файла) только после потребления всех неполученных данных в канале."
449
450 #. type: TP
451 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
452 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
453 #, no-wrap
454 msgid "B<POLLNVAL>"
455 msgstr "B<POLLNVAL>"
456
457 #. type: Plain text
458 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
459 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
460 msgid ""
461 "Invalid request: I<fd> not open (only returned in I<revents>; ignored in "
462 "I<events>)."
463 msgstr ""
464 "Неверный запрос: I<fd> не открыт (возвращается только в I<revents>; "
465 "игнорируется в I<events>)."
466
467 #. type: Plain text
468 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
469 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
470 msgid ""
471 "When compiling with B<_XOPEN_SOURCE> defined, one also has the following, "
472 "which convey no further information beyond the bits listed above:"
473 msgstr ""
474 "При компилировании с установленным B<_XOPEN_SOURCE> также определены "
475 "следующие значения, которые не передают дополнительной информации вне "
476 "упомянутых выше битов:"
477
478 #. type: TP
479 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
480 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
481 #, no-wrap
482 msgid "B<POLLRDNORM>"
483 msgstr "B<POLLRDNORM>"
484
485 #. type: Plain text
486 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
487 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
488 msgid "Equivalent to B<POLLIN>."
489 msgstr "Эквивалентно B<POLLIN>."
490
491 #. type: TP
492 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
493 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
494 #, no-wrap
495 msgid "B<POLLRDBAND>"
496 msgstr "B<POLLRDBAND>"
497
498 #. POLLRDBAND is used in the DECnet protocol.
499 #. type: Plain text
500 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
501 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
502 msgid "Priority band data can be read (generally unused on Linux)."
503 msgstr ""
504 "Доступны для чтения приоритетные внутриполосные данные (в Linux, обычно, не "
505 "используется)."
506
507 #. type: TP
508 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
509 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
510 #, no-wrap
511 msgid "B<POLLWRNORM>"
512 msgstr "B<POLLWRNORM>"
513
514 #. type: Plain text
515 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
516 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
517 msgid "Equivalent to B<POLLOUT>."
518 msgstr "Эквивалентно B<POLLOUT>."
519
520 #. type: TP
521 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
522 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
523 #, no-wrap
524 msgid "B<POLLWRBAND>"
525 msgstr "B<POLLWRBAND>"
526
527 #. type: Plain text
528 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
529 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
530 msgid "Priority data may be written."
531 msgstr "Можно писать приоритетные данные."
532
533 #. type: Plain text
534 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
535 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
536 msgid "Linux also knows about, but does not use B<POLLMSG>."
537 msgstr "В Linux также есть B<POLLMSG>, но он не используется."
538
539 #. type: SS
540 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
541 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
542 #, no-wrap
543 msgid "ppoll()"
544 msgstr "ppoll()"
545
546 #. type: Plain text
547 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
548 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
549 msgid ""
550 "The relationship between B<poll>() and B<ppoll>() is analogous to the "
551 "relationship between B<select>(2) and B<pselect>(2): like B<pselect>(2), "
552 "B<ppoll>() allows an application to safely wait until either a file "
553 "descriptor becomes ready or until a signal is caught."
554 msgstr ""
555 "Отношения между B<poll>() и B<ppoll>() аналогичны родству B<select>(2) и "
556 "B<pselect>(2): как B<pselect>(2), B<ppoll>() позволяет приложению безопасно "
557 "ждать, пока файловый дескриптор не станет готов или пока не будет получен "
558 "сигнал."
559
560 #. type: Plain text
561 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
562 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
563 msgid ""
564 "Other than the difference in the precision of the I<timeout> argument, the "
565 "following B<ppoll>() call:"
566 msgstr "Кроме различия в точности аргумента I<timeout> вызов B<ppoll>()"
567
568 #. type: Plain text
569 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
570 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
571 #, no-wrap
572 msgid "ready = ppoll(&fds, nfds, tmo_p, &sigmask);\n"
573 msgstr "ready = ppoll(&fds, nfds, tmo_p, &sigmask);\n"
574
575 #. type: Plain text
576 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
577 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
578 msgid "is nearly equivalent to I<atomically> executing the following calls:"
579 msgstr "почти эквивалентен I<атомарному> выполнению следующих вызовов:"
580
581 #. type: Plain text
582 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
583 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
584 #, fuzzy, no-wrap
585 #| msgid ""
586 #| "timeout = (tmo_p == NULL) ? -1 :\n"
587 #| " (tmo_p-E<gt>tv_sec * 1000 + tmo_p-E<gt>tv_nsec / 1000000);\n"
588 #| "pthread_sigmask(SIG_SETMASK, &sigmask, &origmask);\n"
589 #| "ready = poll(&fds, nfds, timeout);\n"
590 #| "pthread_sigmask(SIG_SETMASK, &origmask, NULL);\n"
591 msgid ""
592 "sigset_t origmask;\n"
593 "int timeout;\n"
594 "\\&\n"
595 "timeout = (tmo_p == NULL) ? -1 :\n"
596 " (tmo_p-E<gt>tv_sec * 1000 + tmo_p-E<gt>tv_nsec / 1000000);\n"
597 "pthread_sigmask(SIG_SETMASK, &sigmask, &origmask);\n"
598 "ready = poll(&fds, nfds, timeout);\n"
599 "pthread_sigmask(SIG_SETMASK, &origmask, NULL);\n"
600 msgstr ""
601 "timeout = (tmo_p == NULL) ? -1 :\n"
602 " (tmo_p-E<gt>tv_sec * 1000 + tmo_p-E<gt>tv_nsec / 1000000);\n"
603 "pthread_sigmask(SIG_SETMASK, &sigmask, &origmask);\n"
604 "ready = poll(&fds, nfds, timeout);\n"
605 "pthread_sigmask(SIG_SETMASK, &origmask, NULL);\n"
606
607 #. type: Plain text
608 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
609 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
610 msgid ""
611 "The above code segment is described as I<nearly> equivalent because whereas "
612 "a negative I<timeout> value for B<poll>() is interpreted as an infinite "
613 "timeout, a negative value expressed in I<*tmo_p> results in an error from "
614 "B<ppoll>()."
615 msgstr ""
616 "Приведённый выше сегмент кода показывает I<ближайший> эквивалент, так как "
617 "отрицательное значение I<timeout> в B<poll>() рассматривается как "
618 "бесконечное ожидание, а отрицательное значение в I<*tmo_p> привело бы к "
619 "ошибке B<ppoll>()."
620
621 #. type: Plain text
622 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
623 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
624 msgid ""
625 "See the description of B<pselect>(2) for an explanation of why B<ppoll>() "
626 "is necessary."
627 msgstr "Смотрите в B<pselect>(2) пояснения о необходимости B<ppoll>()."
628
629 #. type: Plain text
630 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
631 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
632 msgid ""
633 "If the I<sigmask> argument is specified as NULL, then no signal mask "
634 "manipulation is performed (and thus B<ppoll>() differs from B<poll>() only "
635 "in the precision of the I<timeout> argument)."
636 msgstr ""
637 "Если значение аргумента I<sigmask> равно NULL, то изменение маски сигналов "
638 "не происходит (и поэтому B<ppoll>() отличается от B<poll>() только в "
639 "точности аргумента I<timeout>)."
640
641 #. type: Plain text
642 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
643 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
644 #, fuzzy
645 #| msgid ""
646 #| "The I<tmo_p> argument specifies an upper limit on the amount of time that "
647 #| "B<ppoll>() will block. This argument is a pointer to a structure of the "
648 #| "following form:"
649 msgid ""
650 "The I<tmo_p> argument specifies an upper limit on the amount of time that "
651 "B<ppoll>() will block. This argument is a pointer to a B<timespec>(3) "
652 "structure."
653 msgstr ""
654 "В аргументе I<tmo_p> указывается верхняя граница промежутка времени, на "
655 "который будет заблокирован B<ppoll>(). Этот аргумент представляет собой "
656 "указатель на структуру следующего вида:"
657
658 #. type: Plain text
659 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
660 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
661 msgid ""
662 "If I<tmo_p> is specified as NULL, then B<ppoll>() can block indefinitely."
663 msgstr ""
664 "Если значение I<tmo_p> равно NULL, то B<ppoll>() может оставаться "
665 "заблокированным бесконечно."
666
667 #. type: SH
668 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
669 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
670 #, no-wrap
671 msgid "RETURN VALUE"
672 msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ"
673
674 #. type: Plain text
675 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
676 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
677 msgid ""
678 "On success, B<poll>() returns a nonnegative value which is the number of "
679 "elements in the I<pollfds> whose I<revents> fields have been set to a "
680 "nonzero value (indicating an event or an error). A return value of zero "
681 "indicates that the system call timed out before any file descriptors became "
682 "ready."
683 msgstr ""
684
685 #. type: Plain text
686 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
687 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
688 msgid "On error, -1 is returned, and I<errno> is set to indicate the error."
689 msgstr ""
690 "В случае ошибки возвращается -1, а I<errno> устанавливается в значение "
691 "ошибки."
692
693 #. type: SH
694 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
695 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
696 #, no-wrap
697 msgid "ERRORS"
698 msgstr "ОШИБКИ"
699
700 #. type: TP
701 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
702 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
703 #, no-wrap
704 msgid "B<EFAULT>"
705 msgstr "B<EFAULT>"
706
707 #. type: Plain text
708 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
709 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
710 #, fuzzy
711 #| msgid ""
712 #| "The array given as argument was not contained in the calling program's "
713 #| "address space."
714 msgid ""
715 "I<fds> points outside the process's accessible address space. The array "
716 "given as argument was not contained in the calling program's address space."
717 msgstr ""
718 "Указанный аргументом массив содержится вне адресного пространства вызывающей "
719 "программы."
720
721 #. type: TP
722 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
723 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
724 #, no-wrap
725 msgid "B<EINTR>"
726 msgstr "B<EINTR>"
727
728 #. type: Plain text
729 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
730 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
731 msgid "A signal occurred before any requested event; see B<signal>(7)."
732 msgstr ""
733 "Получен сигнал раньше какого-либо запрашиваемого события; смотрите "
734 "B<signal>(7)."
735
736 #. type: TP
737 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
738 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
739 #, no-wrap
740 msgid "B<EINVAL>"
741 msgstr "B<EINVAL>"
742
743 #. type: Plain text
744 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
745 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
746 msgid "The I<nfds> value exceeds the B<RLIMIT_NOFILE> value."
747 msgstr "Значение I<nfds> превышает значение B<RLIMIT_NOFILE>."
748
749 #. type: Plain text
750 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
751 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
752 msgid ""
753 "(B<ppoll>()) The timeout value expressed in I<*tmo_p> is invalid (negative)."
754 msgstr "(B<ppoll>()) Время ожидания в I<*tmo_p> некорректно (отрицательное)."
755
756 #. type: TP
757 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
758 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
759 #, no-wrap
760 msgid "B<ENOMEM>"
761 msgstr "B<ENOMEM>"
762
763 #. type: Plain text
764 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
765 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
766 #, fuzzy
767 #| msgid ""
768 #| "Could not allocate memory for internal copies of the I<iovec> structures."
769 msgid "Unable to allocate memory for kernel data structures."
770 msgstr "Невозможно выделить память для внутренних копий структур I<iovec>."
771
772 #. type: SH
773 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
774 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
775 #, no-wrap
776 msgid "VERSIONS"
777 msgstr "ВЕРСИИ"
778
779 #. Darwin, according to a report by Jeremy Sequoia, relayed by Josh Triplett
780 #. type: Plain text
781 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
782 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
783 msgid ""
784 "On some other UNIX systems, B<poll>() can fail with the error B<EAGAIN> if "
785 "the system fails to allocate kernel-internal resources, rather than "
786 "B<ENOMEM> as Linux does. POSIX permits this behavior. Portable programs "
787 "may wish to check for B<EAGAIN> and loop, just as with B<EINTR>."
788 msgstr ""
789 "В некоторых системах UNIX вызов B<poll>() может завершаться с ошибкой "
790 "B<EAGAIN>, если системе не удаётся выделить внутренние ресурсы ядра, вместо "
791 "ошибки B<ENOMEM> как это происходит в Linux. В POSIX допускается такое "
792 "поведение. Переносимые программы должны ожидать B<EAGAIN> в цикле, как для "
793 "B<EINTR>."
794
795 #. type: Plain text
796 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
797 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
798 msgid ""
799 "Some implementations define the nonstandard constant B<INFTIM> with the "
800 "value -1 for use as a I<timeout> for B<poll>(). This constant is not "
801 "provided in glibc."
802 msgstr ""
803 "В некоторых реализациях определена нестандартная константа B<INFTIM> со "
804 "значением -1 для использования в качестве значения I<timeout> в B<poll>(). "
805 "Эта константа отсутствует в glibc."
806
807 #. type: SS
808 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
809 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
810 #, no-wrap
811 msgid "C library/kernel differences"
812 msgstr "Отличия между библиотекой C и ядром"
813
814 #. type: Plain text
815 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
816 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
817 msgid ""
818 "The Linux B<ppoll>() system call modifies its I<tmo_p> argument. However, "
819 "the glibc wrapper function hides this behavior by using a local variable for "
820 "the timeout argument that is passed to the system call. Thus, the glibc "
821 "B<ppoll>() function does not modify its I<tmo_p> argument."
822 msgstr ""
823 "В Linux системный вызов B<ppoll>() изменяет свой аргумент I<tmo_p>. Однако, "
824 "обёрточная функция glibc скрывает это поведение с помощью локальной "
825 "переменной для аргумента timeout, которая передаётся в системный вызов. "
826 "Поэтому glibc функция B<ppoll>() не изменяет свой аргумент I<tmo_p>."
827
828 #. type: Plain text
829 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
830 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
831 msgid ""
832 "The raw B<ppoll>() system call has a fifth argument, I<size_t sigsetsize>, "
833 "which specifies the size in bytes of the I<sigmask> argument. The glibc "
834 "B<ppoll>() wrapper function specifies this argument as a fixed value (equal "
835 "to I<sizeof(kernel_sigset_t)>). See B<sigprocmask>(2) for a discussion on "
836 "the differences between the kernel and the libc notion of the sigset."
837 msgstr ""
838 "Ядерный системный вызов B<ppoll>() имеет пятый аргумент, I<size_t "
839 "sigsetsize>, в котором указывается размер аргумента I<sigmask> в байтах. В "
840 "обёрточной функции glibc B<ppoll>() в этом аргументе передаётся постоянная "
841 "величина (равная I<sizeof(kernel_sigset_t)>). Описание различий sigset между "
842 "ядерным и библиотечным вызовом смотрите в B<sigprocmask>(2)."
843
844 #. type: SH
845 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
846 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
847 #, no-wrap
848 msgid "STANDARDS"
849 msgstr "СТАНДАРТЫ"
850
851 #. type: Plain text
852 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
853 #: opensuse-tumbleweed
854 msgid "POSIX.1-2024."
855 msgstr "POSIX.1-2024."
856
857 #. type: SH
858 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
859 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
860 #, no-wrap
861 msgid "HISTORY"
862 msgstr "ИСТОРИЯ"
863
864 #. type: TP
865 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
866 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
867 #, fuzzy, no-wrap
868 #| msgid "B<poll>(2)"
869 msgid "B<poll>()"
870 msgstr "B<poll>(2)"
871
872 #. type: Plain text
873 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
874 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
875 #, fuzzy
876 #| msgid "POSIX.1-2001."
877 msgid "POSIX.1-2001. Linux 2.1.23."
878 msgstr "POSIX.1-2001."
879
880 #. type: Plain text
881 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
882 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
883 #, fuzzy
884 #| msgid ""
885 #| "The B<poll>() system call was introduced in Linux 2.1.23. On older "
886 #| "kernels that lack this system call, the glibc B<poll>() wrapper function "
887 #| "provides emulation using B<select>(2)."
888 msgid ""
889 "On older kernels that lack this system call, the glibc B<poll>() wrapper "
890 "function provides emulation using B<select>(2)."
891 msgstr ""
892 "Системный вызов B<poll>() появился в Linux 2.1.23. Для старых ядер, в "
893 "которых этот вызов отсутствует, glibc предоставляет обёрточную функцию "
894 "B<poll>(), которая эмулируется с помощью B<select>(2)."
895
896 #. type: TP
897 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
898 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
899 #, fuzzy, no-wrap
900 #| msgid "B<poll>(2)"
901 msgid "B<ppoll>()"
902 msgstr "B<poll>(2)"
903
904 #. type: Plain text
905 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
906 #: opensuse-tumbleweed
907 #, fuzzy
908 #| msgid "POSIX.1-2008. Linux 2.6.16, glibc 2.4."
909 msgid "POSIX.1-2024. Linux 2.6.16, glibc 2.4."
910 msgstr "POSIX.1-2008. Linux 2.6.16, glibc 2.4."
911
912 #. type: SH
913 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
914 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
915 #, no-wrap
916 msgid "NOTES"
917 msgstr "ПРИМЕЧАНИЯ"
918
919 #. type: Plain text
920 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
921 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
922 msgid ""
923 "The operation of B<poll>() and B<ppoll>() is not affected by the "
924 "B<O_NONBLOCK> flag."
925 msgstr "На операции B<poll>() и B<ppoll>() флаг B<O_NONBLOCK> не влияет."
926
927 #. type: Plain text
928 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
929 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
930 msgid ""
931 "For a discussion of what may happen if a file descriptor being monitored by "
932 "B<poll>() is closed in another thread, see B<select>(2)."
933 msgstr ""
934 "Обсуждение того, что может случиться, если файловый дескриптор отслеживается "
935 "B<poll>() и при этом закрывается в другой нити, смотрите в B<select>(2)."
936
937 #. type: SH
938 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
939 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
940 #, no-wrap
941 msgid "BUGS"
942 msgstr "ПРОГРАММНЫЕ ОШИБКИ"
943
944 #. type: Plain text
945 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
946 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
947 msgid ""
948 "See the discussion of spurious readiness notifications under the BUGS "
949 "section of B<select>(2)."
950 msgstr ""
951 "Смотрите описание ложных уведомлений о готовности в разделе ДЕФЕКТЫ "
952 "справочной страницы B<select>(2)."
953
954 #. type: SH
955 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
956 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
957 #, no-wrap
958 msgid "EXAMPLES"
959 msgstr "ПРИМЕРЫ"
960
961 #. type: Plain text
962 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
963 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
964 msgid ""
965 "The program below opens each of the files named in its command-line "
966 "arguments and monitors the resulting file descriptors for readiness to read "
967 "(B<POLLIN>). The program loops, repeatedly using B<poll>() to monitor the "
968 "file descriptors, printing the number of ready file descriptors on return. "
969 "For each ready file descriptor, the program:"
970 msgstr ""
971
972 #. type: Plain text
973 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
974 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
975 msgid "displays the returned I<revents> field in a human-readable form;"
976 msgstr ""
977
978 #. type: Plain text
979 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
980 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
981 msgid ""
982 "if the file descriptor is readable, reads some data from it, and displays "
983 "that data on standard output; and"
984 msgstr ""
985
986 #. type: Plain text
987 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
988 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
989 msgid ""
990 "if the file descriptor was not readable, but some other event occurred "
991 "(presumably B<POLLHUP>), closes the file descriptor."
992 msgstr ""
993
994 #. type: Plain text
995 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
996 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
997 msgid "Suppose we run the program in one terminal, asking it to open a FIFO:"
998 msgstr ""
999
1000 #. type: Plain text
1001 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1002 #: opensuse-tumbleweed
1003 #, fuzzy, no-wrap
1004 #| msgid ""
1005 #| "$ B<mkfifo myfifo>\n"
1006 #| "$ B<./poll_input myfifo>\n"
1007 msgid ""
1008 "$B< mkfifo myfifo>;\n"
1009 "$B< ./poll_input myfifo>;\n"
1010 msgstr ""
1011 "$ B<mkfifo myfifo>\n"
1012 "$ B<./poll_input myfifo>\n"
1013
1014 #. type: Plain text
1015 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1016 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1017 msgid ""
1018 "In a second terminal window, we then open the FIFO for writing, write some "
1019 "data to it, and close the FIFO:"
1020 msgstr ""
1021
1022 #. type: Plain text
1023 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1024 #: opensuse-tumbleweed
1025 #, fuzzy, no-wrap
1026 #| msgid "$ B<echo aaaaabbbbbccccc E<gt> myfifo>\n"
1027 msgid "$B< echo aaaaabbbbbccccc E<gt> myfifo>;\n"
1028 msgstr "$ B<echo aaaaabbbbbccccc E<gt> myfifo>\n"
1029
1030 #. type: Plain text
1031 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1032 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1033 msgid "In the terminal where we are running the program, we would then see:"
1034 msgstr ""
1035
1036 #. type: Plain text
1037 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1038 #: opensuse-tumbleweed
1039 #, no-wrap
1040 msgid ""
1041 "Opened \"myfifo\" on fd 3\n"
1042 "About to poll()\n"
1043 "Ready: 1\n"
1044 " fd=3; events: POLLIN POLLHUP\n"
1045 " read 10 bytes: aaaaabbbbb\n"
1046 "About to poll()\n"
1047 "Ready: 1\n"
1048 " fd=3; events: POLLIN POLLHUP\n"
1049 " read 6 bytes: ccccc\n"
1050 "\\&\n"
1051 "About to poll()\n"
1052 "Ready: 1\n"
1053 " fd=3; events: POLLHUP\n"
1054 " closing fd 3\n"
1055 "All file descriptors closed. Bye.\n"
1056 msgstr ""
1057
1058 #. type: Plain text
1059 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1060 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1061 msgid "In the above output, we see that B<poll>() returned three times:"
1062 msgstr ""
1063
1064 #. type: Plain text
1065 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1066 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1067 msgid ""
1068 "On the first return, the bits returned in the I<revents> field were "
1069 "B<POLLIN>, indicating that the file descriptor is readable, and B<POLLHUP>, "
1070 "indicating that the other end of the FIFO has been closed. The program then "
1071 "consumed some of the available input."
1072 msgstr ""
1073
1074 #. type: Plain text
1075 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1076 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1077 msgid ""
1078 "The second return from B<poll>() also indicated B<POLLIN> and B<POLLHUP>; "
1079 "the program then consumed the last of the available input."
1080 msgstr ""
1081
1082 #. type: Plain text
1083 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1084 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1085 msgid ""
1086 "On the final return, B<poll>() indicated only B<POLLHUP> on the FIFO, at "
1087 "which point the file descriptor was closed and the program terminated."
1088 msgstr ""
1089
1090 #. type: SS
1091 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1092 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1093 #, no-wrap
1094 msgid "Program source"
1095 msgstr "Исходный код программы"
1096
1097 #. type: Plain text
1098 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1099 #: opensuse-tumbleweed
1100 #, no-wrap
1101 msgid ""
1102 "/* poll_input.c\n"
1103 "\\&\n"
1104 " Licensed under GNU General Public License v2 or later.\n"
1105 "*/\n"
1106 "#include E<lt>err.hE<gt>\n"
1107 "#include E<lt>fcntl.hE<gt>\n"
1108 "#include E<lt>poll.hE<gt>\n"
1109 "#include E<lt>stdio.hE<gt>\n"
1110 "#include E<lt>stdlib.hE<gt>\n"
1111 "#include E<lt>sys/types.hE<gt>\n"
1112 "#include E<lt>unistd.hE<gt>\n"
1113 "\\&\n"
1114 "int\n"
1115 "main(int argc, char *argv[])\n"
1116 "{\n"
1117 " int ready;\n"
1118 " char buf[10];\n"
1119 " nfds_t num_open_fds, nfds;\n"
1120 " ssize_t s;\n"
1121 " struct pollfd *pfds;\n"
1122 "\\&\n"
1123 " if (argc E<lt> 2) {\n"
1124 " fprintf(stderr, \"Usage: %s file...\\[rs]n\", argv[0]);\n"
1125 " exit(EXIT_FAILURE);\n"
1126 " }\n"
1127 "\\&\n"
1128 " num_open_fds = nfds = argc - 1;\n"
1129 " pfds = calloc(nfds, sizeof(struct pollfd));\n"
1130 " if (pfds == NULL)\n"
1131 " err(EXIT_FAILURE, \"malloc\");\n"
1132 "\\&\n"
1133 " /* Open each file on command line, and add it to \\[aq]pfds\\[aq] array. */\n"
1134 "\\&\n"
1135 " for (nfds_t j = 0; j E<lt> nfds; j++) {\n"
1136 " pfds[j].fd = open(argv[j + 1], O_RDONLY);\n"
1137 " if (pfds[j].fd == -1)\n"
1138 " err(EXIT_FAILURE, \"open\");\n"
1139 "\\&\n"
1140 " printf(\"Opened \\[rs]\"%s\\[rs]\" on fd %d\\[rs]n\", argv[j + 1], pfds[j].fd);\n"
1141 "\\&\n"
1142 " pfds[j].events = POLLIN;\n"
1143 " }\n"
1144 "\\&\n"
1145 " /* Keep calling poll() as long as at least one file descriptor is\n"
1146 " open. */\n"
1147 "\\&\n"
1148 " while (num_open_fds E<gt> 0) {\n"
1149 " printf(\"About to poll()\\[rs]n\");\n"
1150 " ready = poll(pfds, nfds, -1);\n"
1151 " if (ready == -1)\n"
1152 " err(EXIT_FAILURE, \"poll\");\n"
1153 "\\&\n"
1154 " printf(\"Ready: %d\\[rs]n\", ready);\n"
1155 "\\&\n"
1156 " /* Deal with array returned by poll(). */\n"
1157 "\\&\n"
1158 " for (nfds_t j = 0; j E<lt> nfds; j++) {\n"
1159 " if (pfds[j].revents != 0) {\n"
1160 " printf(\" fd=%d; events: %s%s%s\\[rs]n\", pfds[j].fd,\n"
1161 " (pfds[j].revents & POLLIN) ? \"POLLIN \" : \"\",\n"
1162 " (pfds[j].revents & POLLHUP) ? \"POLLHUP \" : \"\",\n"
1163 " (pfds[j].revents & POLLERR) ? \"POLLERR \" : \"\");\n"
1164 "\\&\n"
1165 " if (pfds[j].revents & POLLIN) {\n"
1166 " s = read(pfds[j].fd, buf, sizeof(buf));\n"
1167 " if (s == -1)\n"
1168 " err(EXIT_FAILURE, \"read\");\n"
1169 " printf(\" read %zd bytes: %.*s\\[rs]n\",\n"
1170 " s, (int) s, buf);\n"
1171 " } else { /* POLLERR | POLLHUP */\n"
1172 " printf(\" closing fd %d\\[rs]n\", pfds[j].fd);\n"
1173 " if (close(pfds[j].fd) == -1)\n"
1174 " err(EXIT_FAILURE, \"close\");\n"
1175 " num_open_fds--;\n"
1176 " }\n"
1177 " }\n"
1178 " }\n"
1179 " }\n"
1180 "\\&\n"
1181 " printf(\"All file descriptors closed. Bye.\\[rs]n\");\n"
1182 " exit(EXIT_SUCCESS);\n"
1183 "}\n"
1184 msgstr ""
1185
1186 #. SRC END
1187 #. type: SH
1188 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1189 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1190 #, no-wrap
1191 msgid "SEE ALSO"
1192 msgstr "СМОТРИТЕ ТАКЖЕ"
1193
1194 #. type: Plain text
1195 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1196 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1197 msgid ""
1198 "B<restart_syscall>(2), B<select>(2), B<select_tut>(2), B<timespec>(3), "
1199 "B<epoll>(7), B<time>(7)"
1200 msgstr ""
1201 "B<restart_syscall>(2), B<select>(2), B<select_tut>(2), B<timespec>(3), "
1202 "B<epoll>(7), B<time>(7)"
1203
1204 #. type: TH
1205 #: debian-trixie
1206 #, no-wrap
1207 msgid "2024-06-15"
1208 msgstr "15 июня 2024 г."
1209
1210 #. type: TH
1211 #: debian-trixie
1212 #, no-wrap
1213 msgid "Linux man-pages 6.9.1"
1214 msgstr "Страницы руководства Linux 6.9.1"
1215
1216 #. type: Plain text
1217 #: debian-trixie
1218 msgid "Standard C library (I<libc>, I<-lc>)"
1219 msgstr "Стандартная библиотека языка C (I<libc>, I<-lc>)"
1220
1221 #. type: Plain text
1222 #: debian-trixie fedora-44 fedora-rawhide
1223 msgid "POSIX.1-2008."
1224 msgstr "POSIX.1-2008."
1225
1226 #. FIXME .
1227 #. ppoll() is proposed for inclusion in POSIX:
1228 #. https://www.austingroupbugs.net/view.php?id=1263
1229 #. NetBSD 3.0 has a pollts() which is like Linux ppoll().
1230 #. type: Plain text
1231 #: debian-trixie fedora-44 fedora-rawhide
1232 msgid "Linux."
1233 msgstr "Linux."
1234
1235 #. type: Plain text
1236 #: debian-trixie fedora-44 fedora-rawhide
1237 msgid "Linux 2.6.16, glibc 2.4."
1238 msgstr "Linux 2.6.16, glibc 2.4."
1239
1240 #. type: Plain text
1241 #: debian-trixie fedora-44 fedora-rawhide
1242 #, no-wrap
1243 msgid ""
1244 "$ B<mkfifo myfifo>\n"
1245 "$ B<./poll_input myfifo>\n"
1246 msgstr ""
1247 "$ B<mkfifo myfifo>\n"
1248 "$ B<./poll_input myfifo>\n"
1249
1250 #. type: Plain text
1251 #: debian-trixie fedora-44 fedora-rawhide
1252 #, no-wrap
1253 msgid "$ B<echo aaaaabbbbbccccc E<gt> myfifo>\n"
1254 msgstr "$ B<echo aaaaabbbbbccccc E<gt> myfifo>\n"
1255
1256 #. type: Plain text
1257 #: debian-trixie fedora-44 fedora-rawhide
1258 #, no-wrap
1259 msgid ""
1260 "Opened \"myfifo\" on fd 3\n"
1261 "About to poll()\n"
1262 "Ready: 1\n"
1263 " fd=3; events: POLLIN POLLHUP\n"
1264 " read 10 bytes: aaaaabbbbb\n"
1265 "About to poll()\n"
1266 "Ready: 1\n"
1267 " fd=3; events: POLLIN POLLHUP\n"
1268 " read 6 bytes: ccccc\n"
1269 "\\&\n"
1270 "About to poll()\n"
1271 "Ready: 1\n"
1272 " fd=3; events: POLLHUP\n"
1273 " closing fd 3\n"
1274 "All file descriptors closed; bye\n"
1275 msgstr ""
1276
1277 #. type: Plain text
1278 #: debian-trixie fedora-44 fedora-rawhide
1279 #, no-wrap
1280 msgid ""
1281 "/* poll_input.c\n"
1282 "\\&\n"
1283 " Licensed under GNU General Public License v2 or later.\n"
1284 "*/\n"
1285 "#include E<lt>fcntl.hE<gt>\n"
1286 "#include E<lt>poll.hE<gt>\n"
1287 "#include E<lt>stdio.hE<gt>\n"
1288 "#include E<lt>stdlib.hE<gt>\n"
1289 "#include E<lt>sys/types.hE<gt>\n"
1290 "#include E<lt>unistd.hE<gt>\n"
1291 "\\&\n"
1292 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n"
1293 " } while (0)\n"
1294 "\\&\n"
1295 "int\n"
1296 "main(int argc, char *argv[])\n"
1297 "{\n"
1298 " int ready;\n"
1299 " char buf[10];\n"
1300 " nfds_t num_open_fds, nfds;\n"
1301 " ssize_t s;\n"
1302 " struct pollfd *pfds;\n"
1303 "\\&\n"
1304 " if (argc E<lt> 2) {\n"
1305 " fprintf(stderr, \"Usage: %s file...\\[rs]n\", argv[0]);\n"
1306 " exit(EXIT_FAILURE);\n"
1307 " }\n"
1308 "\\&\n"
1309 " num_open_fds = nfds = argc - 1;\n"
1310 " pfds = calloc(nfds, sizeof(struct pollfd));\n"
1311 " if (pfds == NULL)\n"
1312 " errExit(\"malloc\");\n"
1313 "\\&\n"
1314 " /* Open each file on command line, and add it to \\[aq]pfds\\[aq] array. */\n"
1315 "\\&\n"
1316 " for (nfds_t j = 0; j E<lt> nfds; j++) {\n"
1317 " pfds[j].fd = open(argv[j + 1], O_RDONLY);\n"
1318 " if (pfds[j].fd == -1)\n"
1319 " errExit(\"open\");\n"
1320 "\\&\n"
1321 " printf(\"Opened \\[rs]\"%s\\[rs]\" on fd %d\\[rs]n\", argv[j + 1], pfds[j].fd);\n"
1322 "\\&\n"
1323 " pfds[j].events = POLLIN;\n"
1324 " }\n"
1325 "\\&\n"
1326 " /* Keep calling poll() as long as at least one file descriptor is\n"
1327 " open. */\n"
1328 "\\&\n"
1329 " while (num_open_fds E<gt> 0) {\n"
1330 " printf(\"About to poll()\\[rs]n\");\n"
1331 " ready = poll(pfds, nfds, -1);\n"
1332 " if (ready == -1)\n"
1333 " errExit(\"poll\");\n"
1334 "\\&\n"
1335 " printf(\"Ready: %d\\[rs]n\", ready);\n"
1336 "\\&\n"
1337 " /* Deal with array returned by poll(). */\n"
1338 "\\&\n"
1339 " for (nfds_t j = 0; j E<lt> nfds; j++) {\n"
1340 " if (pfds[j].revents != 0) {\n"
1341 " printf(\" fd=%d; events: %s%s%s\\[rs]n\", pfds[j].fd,\n"
1342 " (pfds[j].revents & POLLIN) ? \"POLLIN \" : \"\",\n"
1343 " (pfds[j].revents & POLLHUP) ? \"POLLHUP \" : \"\",\n"
1344 " (pfds[j].revents & POLLERR) ? \"POLLERR \" : \"\");\n"
1345 "\\&\n"
1346 " if (pfds[j].revents & POLLIN) {\n"
1347 " s = read(pfds[j].fd, buf, sizeof(buf));\n"
1348 " if (s == -1)\n"
1349 " errExit(\"read\");\n"
1350 " printf(\" read %zd bytes: %.*s\\[rs]n\",\n"
1351 " s, (int) s, buf);\n"
1352 " } else { /* POLLERR | POLLHUP */\n"
1353 " printf(\" closing fd %d\\[rs]n\", pfds[j].fd);\n"
1354 " if (close(pfds[j].fd) == -1)\n"
1355 " errExit(\"close\");\n"
1356 " num_open_fds--;\n"
1357 " }\n"
1358 " }\n"
1359 " }\n"
1360 " }\n"
1361 "\\&\n"
1362 " printf(\"All file descriptors closed; bye\\[rs]n\");\n"
1363 " exit(EXIT_SUCCESS);\n"
1364 "}\n"
1365 msgstr ""
1366
1367 #. type: TH
1368 #: fedora-44 fedora-rawhide
1369 #, no-wrap
1370 msgid "2024-07-23"
1371 msgstr "23 июля 2024 г."
1372
1373 #. type: TH
1374 #: fedora-44 fedora-rawhide
1375 #, no-wrap
1376 msgid "Linux man-pages 6.13"
1377 msgstr "Страницы руководства Linux 6.13"
1378
1379 #. type: TH
1380 #: mageia-cauldron
1381 #, no-wrap
1382 msgid "Linux man-pages 6.17"
1383 msgstr "Страницы руководства Linux 6.17"
1384
1385 #. type: TH
1386 #: opensuse-leap-16-1 opensuse-tumbleweed
1387 #, no-wrap
1388 msgid "Linux man-pages (unreleased)"
1389 msgstr "Страницы руководства Linux (не выпущены)"