OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.40.
[linuxjm/LDP_man-pages.git] / po4a / epoll / po / epoll.pot
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2012-05-01 04:38+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=CHARSET\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: build/C/man7/epoll.7:21
21 #, no-wrap
22 msgid "EPOLL"
23 msgstr ""
24
25 #. type: TH
26 #: build/C/man7/epoll.7:21 build/C/man2/epoll_wait.2:23
27 #, no-wrap
28 msgid "2012-04-17"
29 msgstr ""
30
31 #. type: TH
32 #: build/C/man7/epoll.7:21 build/C/man2/epoll_create.2:25 build/C/man2/epoll_ctl.2:21 build/C/man2/epoll_wait.2:23 build/C/man2/poll.2:31
33 #, no-wrap
34 msgid "Linux"
35 msgstr ""
36
37 #. type: TH
38 #: build/C/man7/epoll.7:21 build/C/man2/epoll_create.2:25 build/C/man2/epoll_ctl.2:21 build/C/man2/epoll_wait.2:23 build/C/man2/poll.2:31
39 #, no-wrap
40 msgid "Linux Programmer's Manual"
41 msgstr ""
42
43 #. type: SH
44 #: build/C/man7/epoll.7:22 build/C/man2/epoll_create.2:26 build/C/man2/epoll_ctl.2:22 build/C/man2/epoll_wait.2:24 build/C/man2/poll.2:32
45 #, no-wrap
46 msgid "NAME"
47 msgstr ""
48
49 #. type: Plain text
50 #: build/C/man7/epoll.7:24
51 msgid "epoll - I/O event notification facility"
52 msgstr ""
53
54 #. type: SH
55 #: build/C/man7/epoll.7:24 build/C/man2/epoll_create.2:28 build/C/man2/epoll_ctl.2:24 build/C/man2/epoll_wait.2:26 build/C/man2/poll.2:34
56 #, no-wrap
57 msgid "SYNOPSIS"
58 msgstr ""
59
60 #. type: Plain text
61 #: build/C/man7/epoll.7:26 build/C/man2/epoll_ctl.2:26
62 msgid "B<#include E<lt>sys/epoll.hE<gt>>"
63 msgstr ""
64
65 #. type: SH
66 #: build/C/man7/epoll.7:26 build/C/man2/epoll_create.2:35 build/C/man2/epoll_ctl.2:29 build/C/man2/epoll_wait.2:36 build/C/man2/poll.2:46
67 #, no-wrap
68 msgid "DESCRIPTION"
69 msgstr ""
70
71 #. type: Plain text
72 #: build/C/man7/epoll.7:40
73 msgid ""
74 "The B<epoll> API performs a similar task to B<poll>(2): monitoring multiple "
75 "file descriptors to see if I/O is possible on any of them.  The B<epoll> API "
76 "can be used either as an edge-triggered or a level-triggered interface and "
77 "scales well to large numbers of watched file descriptors.  The following "
78 "system calls are provided to create and manage an B<epoll> instance:"
79 msgstr ""
80
81 #. type: IP
82 #: build/C/man7/epoll.7:40 build/C/man7/epoll.7:49 build/C/man7/epoll.7:57
83 #, no-wrap
84 msgid "*"
85 msgstr ""
86
87 #. type: Plain text
88 #: build/C/man7/epoll.7:49
89 msgid ""
90 "B<epoll_create>(2)  creates an B<epoll> instance and returns a file "
91 "descriptor referring to that instance.  (The more recent B<epoll_create1>(2)  "
92 "extends the functionality of B<epoll_create>(2).)"
93 msgstr ""
94
95 #. type: Plain text
96 #: build/C/man7/epoll.7:57
97 msgid ""
98 "Interest in particular file descriptors is then registered via "
99 "B<epoll_ctl>(2).  The set of file descriptors currently registered on an "
100 "B<epoll> instance is sometimes called an I<epoll> set."
101 msgstr ""
102
103 #. type: Plain text
104 #: build/C/man7/epoll.7:61
105 msgid ""
106 "B<epoll_wait>(2)  waits for I/O events, blocking the calling thread if no "
107 "events are currently available."
108 msgstr ""
109
110 #. type: SS
111 #: build/C/man7/epoll.7:61
112 #, no-wrap
113 msgid "Level-Triggered and Edge-Triggered"
114 msgstr ""
115
116 #. type: Plain text
117 #: build/C/man7/epoll.7:70
118 msgid ""
119 "The B<epoll> event distribution interface is able to behave both as "
120 "edge-triggered (ET) and as level-triggered (LT).  The difference between the "
121 "two mechanisms can be described as follows.  Suppose that this scenario "
122 "happens:"
123 msgstr ""
124
125 #. type: IP
126 #: build/C/man7/epoll.7:70
127 #, no-wrap
128 msgid "1."
129 msgstr ""
130
131 #. type: Plain text
132 #: build/C/man7/epoll.7:76
133 msgid ""
134 "The file descriptor that represents the read side of a pipe (I<rfd>)  is "
135 "registered on the B<epoll> instance."
136 msgstr ""
137
138 #. type: IP
139 #: build/C/man7/epoll.7:76
140 #, no-wrap
141 msgid "2."
142 msgstr ""
143
144 #. type: Plain text
145 #: build/C/man7/epoll.7:78
146 msgid "A pipe writer writes 2 kB of data on the write side of the pipe."
147 msgstr ""
148
149 #. type: IP
150 #: build/C/man7/epoll.7:78
151 #, no-wrap
152 msgid "3."
153 msgstr ""
154
155 #. type: Plain text
156 #: build/C/man7/epoll.7:84
157 msgid ""
158 "A call to B<epoll_wait>(2)  is done that will return I<rfd> as a ready file "
159 "descriptor."
160 msgstr ""
161
162 #. type: IP
163 #: build/C/man7/epoll.7:84
164 #, no-wrap
165 msgid "4."
166 msgstr ""
167
168 #. type: Plain text
169 #: build/C/man7/epoll.7:87
170 msgid "The pipe reader reads 1 kB of data from I<rfd>."
171 msgstr ""
172
173 #. type: IP
174 #: build/C/man7/epoll.7:87
175 #, no-wrap
176 msgid "5."
177 msgstr ""
178
179 #. type: Plain text
180 #: build/C/man7/epoll.7:91
181 msgid "A call to B<epoll_wait>(2)  is done."
182 msgstr ""
183
184 #. type: Plain text
185 #: build/C/man7/epoll.7:126
186 msgid ""
187 "If the I<rfd> file descriptor has been added to the B<epoll> interface using "
188 "the B<EPOLLET> (edge-triggered)  flag, the call to B<epoll_wait>(2)  done in "
189 "step B<5> will probably hang despite the available data still present in the "
190 "file input buffer; meanwhile the remote peer might be expecting a response "
191 "based on the data it already sent.  The reason for this is that "
192 "edge-triggered mode only delivers events when changes occur on the monitored "
193 "file descriptor.  So, in step B<5> the caller might end up waiting for some "
194 "data that is already present inside the input buffer.  In the above example, "
195 "an event on I<rfd> will be generated because of the write done in B<2> and "
196 "the event is consumed in B<3>.  Since the read operation done in B<4> does "
197 "not consume the whole buffer data, the call to B<epoll_wait>(2)  done in "
198 "step B<5> might block indefinitely."
199 msgstr ""
200
201 #. type: Plain text
202 #: build/C/man7/epoll.7:136
203 msgid ""
204 "An application that employs the B<EPOLLET> flag should use nonblocking file "
205 "descriptors to avoid having a blocking read or write starve a task that is "
206 "handling multiple file descriptors.  The suggested way to use B<epoll> as an "
207 "edge-triggered (B<EPOLLET>)  interface is as follows:"
208 msgstr ""
209
210 #. type: TP
211 #: build/C/man7/epoll.7:137
212 #, no-wrap
213 msgid "B<i>"
214 msgstr ""
215
216 #. type: Plain text
217 #: build/C/man7/epoll.7:140
218 msgid "with nonblocking file descriptors; and"
219 msgstr ""
220
221 #. type: TP
222 #: build/C/man7/epoll.7:140
223 #, no-wrap
224 msgid "B<ii>"
225 msgstr ""
226
227 #. type: Plain text
228 #: build/C/man7/epoll.7:148
229 msgid ""
230 "by waiting for an event only after B<read>(2)  or B<write>(2)  return "
231 "B<EAGAIN>."
232 msgstr ""
233
234 #. type: Plain text
235 #: build/C/man7/epoll.7:159
236 msgid ""
237 "By contrast, when used as a level-triggered interface (the default, when "
238 "B<EPOLLET> is not specified), B<epoll> is simply a faster B<poll>(2), and "
239 "can be used wherever the latter is used since it shares the same semantics."
240 msgstr ""
241
242 #. type: Plain text
243 #: build/C/man7/epoll.7:176
244 msgid ""
245 "Since even with edge-triggered B<epoll>, multiple events can be generated "
246 "upon receipt of multiple chunks of data, the caller has the option to "
247 "specify the B<EPOLLONESHOT> flag, to tell B<epoll> to disable the associated "
248 "file descriptor after the receipt of an event with B<epoll_wait>(2).  When "
249 "the B<EPOLLONESHOT> flag is specified, it is the caller's responsibility to "
250 "rearm the file descriptor using B<epoll_ctl>(2)  with B<EPOLL_CTL_MOD>."
251 msgstr ""
252
253 #. type: SS
254 #: build/C/man7/epoll.7:176
255 #, no-wrap
256 msgid "/proc interfaces"
257 msgstr ""
258
259 #.  Following was added in 2.6.28, but them removed in 2.6.29
260 #.  .TP
261 #.  .IR /proc/sys/fs/epoll/max_user_instances " (since Linux 2.6.28)"
262 #.  This specifies an upper limit on the number of epoll instances
263 #.  that can be created per real user ID.
264 #. type: Plain text
265 #: build/C/man7/epoll.7:184
266 msgid ""
267 "The following interfaces can be used to limit the amount of kernel memory "
268 "consumed by epoll:"
269 msgstr ""
270
271 #. type: TP
272 #: build/C/man7/epoll.7:184
273 #, no-wrap
274 msgid "I</proc/sys/fs/epoll/max_user_watches> (since Linux 2.6.28)"
275 msgstr ""
276
277 #.  2.6.29 (in 2.6.28, the default was 1/32 of lowmem)
278 #. type: Plain text
279 #: build/C/man7/epoll.7:198
280 msgid ""
281 "This specifies a limit on the total number of file descriptors that a user "
282 "can register across all epoll instances on the system.  The limit is per "
283 "real user ID.  Each registered file descriptor costs roughly 90 bytes on a "
284 "32-bit kernel, and roughly 160 bytes on a 64-bit kernel.  Currently, the "
285 "default value for I<max_user_watches> is 1/25 (4%) of the available low "
286 "memory, divided by the registration cost in bytes."
287 msgstr ""
288
289 #. type: SS
290 #: build/C/man7/epoll.7:198
291 #, no-wrap
292 msgid "Example for Suggested Usage"
293 msgstr ""
294
295 #. type: Plain text
296 #: build/C/man7/epoll.7:227
297 msgid ""
298 "While the usage of B<epoll> when employed as a level-triggered interface "
299 "does have the same semantics as B<poll>(2), the edge-triggered usage "
300 "requires more clarification to avoid stalls in the application event loop.  "
301 "In this example, listener is a nonblocking socket on which B<listen>(2)  has "
302 "been called.  The function I<do_use_fd()> uses the new ready file descriptor "
303 "until B<EAGAIN> is returned by either B<read>(2)  or B<write>(2).  An "
304 "event-driven state machine application should, after having received "
305 "B<EAGAIN>, record its current state so that at the next call to "
306 "I<do_use_fd()> it will continue to B<read>(2)  or B<write>(2)  from where it "
307 "stopped before."
308 msgstr ""
309
310 #. type: Plain text
311 #: build/C/man7/epoll.7:233
312 #, no-wrap
313 msgid ""
314 "#define MAX_EVENTS 10\n"
315 "struct epoll_event ev, events[MAX_EVENTS];\n"
316 "int listen_sock, conn_sock, nfds, epollfd;\n"
317 msgstr ""
318
319 #. type: Plain text
320 #: build/C/man7/epoll.7:236
321 #, no-wrap
322 msgid ""
323 "/* Set up listening socket, \\(aqlisten_sock\\(aq (socket(),\n"
324 "   bind(), listen()) */\n"
325 msgstr ""
326
327 #. type: Plain text
328 #: build/C/man7/epoll.7:242
329 #, no-wrap
330 msgid ""
331 "epollfd = epoll_create(10);\n"
332 "if (epollfd == -1) {\n"
333 "    perror(\"epoll_create\");\n"
334 "    exit(EXIT_FAILURE);\n"
335 "}\n"
336 msgstr ""
337
338 #. type: Plain text
339 #: build/C/man7/epoll.7:249
340 #, no-wrap
341 msgid ""
342 "ev.events = EPOLLIN;\n"
343 "ev.data.fd = listen_sock;\n"
344 "if (epoll_ctl(epollfd, EPOLL_CTL_ADD, listen_sock, &ev) == -1) {\n"
345 "    perror(\"epoll_ctl: listen_sock\");\n"
346 "    exit(EXIT_FAILURE);\n"
347 "}\n"
348 msgstr ""
349
350 #. type: Plain text
351 #: build/C/man7/epoll.7:256
352 #, no-wrap
353 msgid ""
354 "for (;;) {\n"
355 "    nfds = epoll_wait(epollfd, events, MAX_EVENTS, -1);\n"
356 "    if (nfds == -1) {\n"
357 "        perror(\"epoll_pwait\");\n"
358 "        exit(EXIT_FAILURE);\n"
359 "    }\n"
360 msgstr ""
361
362 #. type: Plain text
363 #: build/C/man7/epoll.7:278
364 #, no-wrap
365 msgid ""
366 "    for (n = 0; n E<lt> nfds; ++n) {\n"
367 "        if (events[n].data.fd == listen_sock) {\n"
368 "            conn_sock = accept(listen_sock,\n"
369 "                            (struct sockaddr *) &local, &addrlen);\n"
370 "            if (conn_sock == -1) {\n"
371 "                perror(\"accept\");\n"
372 "                exit(EXIT_FAILURE);\n"
373 "            }\n"
374 "            setnonblocking(conn_sock);\n"
375 "            ev.events = EPOLLIN | EPOLLET;\n"
376 "            ev.data.fd = conn_sock;\n"
377 "            if (epoll_ctl(epollfd, EPOLL_CTL_ADD, conn_sock,\n"
378 "                        &ev) == -1) {\n"
379 "                perror(\"epoll_ctl: conn_sock\");\n"
380 "                exit(EXIT_FAILURE);\n"
381 "            }\n"
382 "        } else {\n"
383 "            do_use_fd(events[n].data.fd);\n"
384 "        }\n"
385 "    }\n"
386 "}\n"
387 msgstr ""
388
389 #. type: Plain text
390 #: build/C/man7/epoll.7:297
391 msgid ""
392 "When used as an edge-triggered interface, for performance reasons, it is "
393 "possible to add the file descriptor inside the B<epoll> interface "
394 "(B<EPOLL_CTL_ADD>)  once by specifying (B<EPOLLIN>|B<EPOLLOUT>).  This "
395 "allows you to avoid continuously switching between B<EPOLLIN> and "
396 "B<EPOLLOUT> calling B<epoll_ctl>(2)  with B<EPOLL_CTL_MOD>."
397 msgstr ""
398
399 #. type: SS
400 #: build/C/man7/epoll.7:297
401 #, no-wrap
402 msgid "Questions and Answers"
403 msgstr ""
404
405 #. type: TP
406 #: build/C/man7/epoll.7:298
407 #, no-wrap
408 msgid "B<Q0>"
409 msgstr ""
410
411 #. type: Plain text
412 #: build/C/man7/epoll.7:303
413 msgid ""
414 "What is the key used to distinguish the file descriptors registered in an "
415 "B<epoll> set?"
416 msgstr ""
417
418 #. type: TP
419 #: build/C/man7/epoll.7:303
420 #, no-wrap
421 msgid "B<A0>"
422 msgstr ""
423
424 #. type: Plain text
425 #: build/C/man7/epoll.7:309
426 msgid ""
427 "The key is the combination of the file descriptor number and the open file "
428 "description (also known as an \"open file handle\", the kernel's internal "
429 "representation of an open file)."
430 msgstr ""
431
432 #. type: TP
433 #: build/C/man7/epoll.7:309
434 #, no-wrap
435 msgid "B<Q1>"
436 msgstr ""
437
438 #. type: Plain text
439 #: build/C/man7/epoll.7:314
440 msgid ""
441 "What happens if you register the same file descriptor on an B<epoll> "
442 "instance twice?"
443 msgstr ""
444
445 #. type: TP
446 #: build/C/man7/epoll.7:314
447 #, no-wrap
448 msgid "B<A1>"
449 msgstr ""
450
451 #.  But a descriptor duplicated by fork(2) can't be added to the
452 #.  set, because the [file *, fd] pair is already in the epoll set.
453 #.  That is a somewhat ugly inconsistency.  On the one hand, a child process
454 #.  cannot add the duplicate file descriptor to the epoll set.  (In every
455 #.  other case that I can think of, descriptors duplicated by fork have
456 #.  similar semantics to descriptors duplicated by dup() and friends.)  On
457 #.  the other hand, the very fact that the child has a duplicate of the
458 #.  descriptor means that even if the parent closes its descriptor, then
459 #.  epoll_wait() in the parent will continue to receive notifications for
460 #.  that descriptor because of the duplicated descriptor in the child.
461 #
462 #.  See http://thread.gmane.org/gmane.linux.kernel/596462/
463 #.  "epoll design problems with common fork/exec patterns"
464 #
465 #.  mtk, Feb 2008
466 #. type: Plain text
467 #: build/C/man7/epoll.7:345
468 msgid ""
469 "You will probably get B<EEXIST>.  However, it is possible to add a duplicate "
470 "(B<dup>(2), B<dup2>(2), B<fcntl>(2)  B<F_DUPFD>)  descriptor to the same "
471 "B<epoll> instance.  This can be a useful technique for filtering events, if "
472 "the duplicate file descriptors are registered with different I<events> "
473 "masks."
474 msgstr ""
475
476 #. type: TP
477 #: build/C/man7/epoll.7:345
478 #, no-wrap
479 msgid "B<Q2>"
480 msgstr ""
481
482 #. type: Plain text
483 #: build/C/man7/epoll.7:353
484 msgid ""
485 "Can two B<epoll> instances wait for the same file descriptor? If so, are "
486 "events reported to both B<epoll> file descriptors?"
487 msgstr ""
488
489 #. type: TP
490 #: build/C/man7/epoll.7:353
491 #, no-wrap
492 msgid "B<A2>"
493 msgstr ""
494
495 #. type: Plain text
496 #: build/C/man7/epoll.7:357
497 msgid ""
498 "Yes, and events would be reported to both.  However, careful programming may "
499 "be needed to do this correctly."
500 msgstr ""
501
502 #. type: TP
503 #: build/C/man7/epoll.7:357
504 #, no-wrap
505 msgid "B<Q3>"
506 msgstr ""
507
508 #. type: Plain text
509 #: build/C/man7/epoll.7:362
510 msgid "Is the B<epoll> file descriptor itself poll/epoll/selectable?"
511 msgstr ""
512
513 #. type: TP
514 #: build/C/man7/epoll.7:362
515 #, no-wrap
516 msgid "B<A3>"
517 msgstr ""
518
519 #. type: Plain text
520 #: build/C/man7/epoll.7:369
521 msgid ""
522 "Yes.  If an B<epoll> file descriptor has events waiting then it will "
523 "indicate as being readable."
524 msgstr ""
525
526 #. type: TP
527 #: build/C/man7/epoll.7:369
528 #, no-wrap
529 msgid "B<Q4>"
530 msgstr ""
531
532 #. type: Plain text
533 #: build/C/man7/epoll.7:374
534 msgid ""
535 "What happens if one attempts to put an B<epoll> file descriptor into its own "
536 "file descriptor set?"
537 msgstr ""
538
539 #. type: TP
540 #: build/C/man7/epoll.7:374
541 #, no-wrap
542 msgid "B<A4>"
543 msgstr ""
544
545 #. type: Plain text
546 #: build/C/man7/epoll.7:385
547 msgid ""
548 "The B<epoll_ctl>(2)  call will fail (B<EINVAL>).  However, you can add an "
549 "B<epoll> file descriptor inside another B<epoll> file descriptor set."
550 msgstr ""
551
552 #. type: TP
553 #: build/C/man7/epoll.7:385
554 #, no-wrap
555 msgid "B<Q5>"
556 msgstr ""
557
558 #. type: Plain text
559 #: build/C/man7/epoll.7:390
560 msgid ""
561 "Can I send an B<epoll> file descriptor over a UNIX domain socket to another "
562 "process?"
563 msgstr ""
564
565 #. type: TP
566 #: build/C/man7/epoll.7:390
567 #, no-wrap
568 msgid "B<A5>"
569 msgstr ""
570
571 #. type: Plain text
572 #: build/C/man7/epoll.7:396
573 msgid ""
574 "Yes, but it does not make sense to do this, since the receiving process "
575 "would not have copies of the file descriptors in the B<epoll> set."
576 msgstr ""
577
578 #. type: TP
579 #: build/C/man7/epoll.7:396
580 #, no-wrap
581 msgid "B<Q6>"
582 msgstr ""
583
584 #. type: Plain text
585 #: build/C/man7/epoll.7:401
586 msgid ""
587 "Will closing a file descriptor cause it to be removed from all B<epoll> sets "
588 "automatically?"
589 msgstr ""
590
591 #. type: TP
592 #: build/C/man7/epoll.7:401
593 #, no-wrap
594 msgid "B<A6>"
595 msgstr ""
596
597 #. type: Plain text
598 #: build/C/man7/epoll.7:429
599 msgid ""
600 "Yes, but be aware of the following point.  A file descriptor is a reference "
601 "to an open file description (see B<open>(2)).  Whenever a descriptor is "
602 "duplicated via B<dup>(2), B<dup2>(2), B<fcntl>(2)  B<F_DUPFD>, or "
603 "B<fork>(2), a new file descriptor referring to the same open file "
604 "description is created.  An open file description continues to exist until "
605 "all file descriptors referring to it have been closed.  A file descriptor is "
606 "removed from an B<epoll> set only after all the file descriptors referring "
607 "to the underlying open file description have been closed (or before if the "
608 "descriptor is explicitly removed using B<epoll_ctl>(2)  B<EPOLL_CTL_DEL>).  "
609 "This means that even after a file descriptor that is part of an B<epoll> set "
610 "has been closed, events may be reported for that file descriptor if other "
611 "file descriptors referring to the same underlying file description remain "
612 "open."
613 msgstr ""
614
615 #. type: TP
616 #: build/C/man7/epoll.7:429
617 #, no-wrap
618 msgid "B<Q7>"
619 msgstr ""
620
621 #. type: Plain text
622 #: build/C/man7/epoll.7:434
623 msgid ""
624 "If more than one event occurs between B<epoll_wait>(2)  calls, are they "
625 "combined or reported separately?"
626 msgstr ""
627
628 #. type: TP
629 #: build/C/man7/epoll.7:434
630 #, no-wrap
631 msgid "B<A7>"
632 msgstr ""
633
634 #. type: Plain text
635 #: build/C/man7/epoll.7:437
636 msgid "They will be combined."
637 msgstr ""
638
639 #. type: TP
640 #: build/C/man7/epoll.7:437
641 #, no-wrap
642 msgid "B<Q8>"
643 msgstr ""
644
645 #. type: Plain text
646 #: build/C/man7/epoll.7:441
647 msgid ""
648 "Does an operation on a file descriptor affect the already collected but not "
649 "yet reported events?"
650 msgstr ""
651
652 #. type: TP
653 #: build/C/man7/epoll.7:441
654 #, no-wrap
655 msgid "B<A8>"
656 msgstr ""
657
658 #. type: Plain text
659 #: build/C/man7/epoll.7:447
660 msgid ""
661 "You can do two operations on an existing file descriptor.  Remove would be "
662 "meaningless for this case.  Modify will reread available I/O."
663 msgstr ""
664
665 #. type: TP
666 #: build/C/man7/epoll.7:447
667 #, no-wrap
668 msgid "B<Q9>"
669 msgstr ""
670
671 #. type: Plain text
672 #: build/C/man7/epoll.7:455
673 msgid ""
674 "Do I need to continuously read/write a file descriptor until B<EAGAIN> when "
675 "using the B<EPOLLET> flag (edge-triggered behavior) ?"
676 msgstr ""
677
678 #. type: TP
679 #: build/C/man7/epoll.7:455
680 #, no-wrap
681 msgid "B<A9>"
682 msgstr ""
683
684 #. type: Plain text
685 #: build/C/man7/epoll.7:465
686 msgid ""
687 "Receiving an event from B<epoll_wait>(2)  should suggest to you that such "
688 "file descriptor is ready for the requested I/O operation.  You must consider "
689 "it ready until the next (nonblocking)  read/write yields B<EAGAIN>.  When "
690 "and how you will use the file descriptor is entirely up to you."
691 msgstr ""
692
693 #. type: Plain text
694 #: build/C/man7/epoll.7:471
695 msgid ""
696 "For packet/token-oriented files (e.g., datagram socket, terminal in "
697 "canonical mode), the only way to detect the end of the read/write I/O space "
698 "is to continue to read/write until B<EAGAIN>."
699 msgstr ""
700
701 #. type: Plain text
702 #: build/C/man7/epoll.7:487
703 msgid ""
704 "For stream-oriented files (e.g., pipe, FIFO, stream socket), the condition "
705 "that the read/write I/O space is exhausted can also be detected by checking "
706 "the amount of data read from / written to the target file descriptor.  For "
707 "example, if you call B<read>(2)  by asking to read a certain amount of data "
708 "and B<read>(2)  returns a lower number of bytes, you can be sure of having "
709 "exhausted the read I/O space for the file descriptor.  The same is true when "
710 "writing using B<write>(2).  (Avoid this latter technique if you cannot "
711 "guarantee that the monitored file descriptor always refers to a "
712 "stream-oriented file.)"
713 msgstr ""
714
715 #. type: SS
716 #: build/C/man7/epoll.7:487
717 #, no-wrap
718 msgid "Possible Pitfalls and Ways to Avoid Them"
719 msgstr ""
720
721 #. type: TP
722 #: build/C/man7/epoll.7:488
723 #, no-wrap
724 msgid "B<o Starvation (edge-triggered)>"
725 msgstr ""
726
727 #. type: Plain text
728 #: build/C/man7/epoll.7:496
729 msgid ""
730 "If there is a large amount of I/O space, it is possible that by trying to "
731 "drain it the other files will not get processed causing starvation.  (This "
732 "problem is not specific to B<epoll>.)"
733 msgstr ""
734
735 #. type: Plain text
736 #: build/C/man7/epoll.7:504
737 msgid ""
738 "The solution is to maintain a ready list and mark the file descriptor as "
739 "ready in its associated data structure, thereby allowing the application to "
740 "remember which files need to be processed but still round robin amongst all "
741 "the ready files.  This also supports ignoring subsequent events you receive "
742 "for file descriptors that are already ready."
743 msgstr ""
744
745 #. type: TP
746 #: build/C/man7/epoll.7:504
747 #, no-wrap
748 msgid "B<o If using an event cache...>"
749 msgstr ""
750
751 #. type: Plain text
752 #: build/C/man7/epoll.7:520
753 msgid ""
754 "If you use an event cache or store all the file descriptors returned from "
755 "B<epoll_wait>(2), then make sure to provide a way to mark its closure "
756 "dynamically (i.e., caused by a previous event's processing).  Suppose you "
757 "receive 100 events from B<epoll_wait>(2), and in event #47 a condition "
758 "causes event #13 to be closed.  If you remove the structure and B<close>(2)  "
759 "the file descriptor for event #13, then your event cache might still say "
760 "there are events waiting for that file descriptor causing confusion."
761 msgstr ""
762
763 #. type: Plain text
764 #: build/C/man7/epoll.7:531
765 msgid ""
766 "One solution for this is to call, during the processing of event 47, "
767 "B<epoll_ctl>(B<EPOLL_CTL_DEL>)  to delete file descriptor 13 and "
768 "B<close>(2), then mark its associated data structure as removed and link it "
769 "to a cleanup list.  If you find another event for file descriptor 13 in your "
770 "batch processing, you will discover the file descriptor had been previously "
771 "removed and there will be no confusion."
772 msgstr ""
773
774 #. type: SH
775 #: build/C/man7/epoll.7:531 build/C/man2/epoll_create.2:110 build/C/man2/epoll_ctl.2:226 build/C/man2/epoll_wait.2:173 build/C/man2/poll.2:304
776 #, no-wrap
777 msgid "VERSIONS"
778 msgstr ""
779
780 #.  Its interface should be finalized in Linux kernel 2.5.66.
781 #. type: Plain text
782 #: build/C/man7/epoll.7:537
783 msgid ""
784 "The B<epoll> API was introduced in Linux kernel 2.5.44.  Support was added "
785 "to glibc in version 2.3.2."
786 msgstr ""
787
788 #. type: SH
789 #: build/C/man7/epoll.7:537 build/C/man2/epoll_create.2:120 build/C/man2/epoll_ctl.2:231 build/C/man2/epoll_wait.2:183 build/C/man2/poll.2:324
790 #, no-wrap
791 msgid "CONFORMING TO"
792 msgstr ""
793
794 #. type: Plain text
795 #: build/C/man7/epoll.7:546
796 msgid ""
797 "The B<epoll> API is Linux-specific.  Some other systems provide similar "
798 "mechanisms, for example, FreeBSD has I<kqueue>, and Solaris has "
799 "I</dev/poll>."
800 msgstr ""
801
802 #. type: SH
803 #: build/C/man7/epoll.7:546 build/C/man2/epoll_create.2:146 build/C/man2/epoll_ctl.2:254 build/C/man2/epoll_wait.2:196 build/C/man2/poll.2:356
804 #, no-wrap
805 msgid "SEE ALSO"
806 msgstr ""
807
808 #. type: Plain text
809 #: build/C/man7/epoll.7:551
810 msgid "B<epoll_create>(2), B<epoll_create1>(2), B<epoll_ctl>(2), B<epoll_wait>(2)"
811 msgstr ""
812
813 #. type: SH
814 #: build/C/man7/epoll.7:551 build/C/man2/epoll_create.2:151 build/C/man2/epoll_ctl.2:259 build/C/man2/epoll_wait.2:200 build/C/man2/poll.2:360
815 #, no-wrap
816 msgid "COLOPHON"
817 msgstr ""
818
819 #. type: Plain text
820 #: build/C/man7/epoll.7:558 build/C/man2/epoll_create.2:158 build/C/man2/epoll_ctl.2:266 build/C/man2/epoll_wait.2:207 build/C/man2/poll.2:367
821 msgid ""
822 "This page is part of release 3.40 of the Linux I<man-pages> project.  A "
823 "description of the project, and information about reporting bugs, can be "
824 "found at http://www.kernel.org/doc/man-pages/."
825 msgstr ""
826
827 #. type: TH
828 #: build/C/man2/epoll_create.2:25
829 #, no-wrap
830 msgid "EPOLL_CREATE"
831 msgstr ""
832
833 #. type: TH
834 #: build/C/man2/epoll_create.2:25 build/C/man2/epoll_ctl.2:21 build/C/man2/poll.2:31
835 #, no-wrap
836 msgid "2012-04-15"
837 msgstr ""
838
839 #. type: Plain text
840 #: build/C/man2/epoll_create.2:28
841 msgid "epoll_create, epoll_create1 - open an epoll file descriptor"
842 msgstr ""
843
844 #. type: Plain text
845 #: build/C/man2/epoll_create.2:31 build/C/man2/epoll_wait.2:29
846 #, no-wrap
847 msgid "B<#include E<lt>sys/epoll.hE<gt>>\n"
848 msgstr ""
849
850 #. type: Plain text
851 #: build/C/man2/epoll_create.2:34
852 #, no-wrap
853 msgid ""
854 "B<int epoll_create(int >I<size>B<);>\n"
855 "B<int epoll_create1(int >I<flags>B<);>\n"
856 msgstr ""
857
858 #. type: Plain text
859 #: build/C/man2/epoll_create.2:43
860 msgid ""
861 "B<epoll_create>()  creates an B<epoll>(7)  instance.  Since Linux 2.6.8, the "
862 "I<size> argument is ignored, but must be greater than zero; see NOTES below."
863 msgstr ""
864
865 #. type: Plain text
866 #: build/C/man2/epoll_create.2:56
867 msgid ""
868 "B<epoll_create>()  returns a file descriptor referring to the new epoll "
869 "instance.  This file descriptor is used for all the subsequent calls to the "
870 "B<epoll> interface.  When no longer required, the file descriptor returned "
871 "by B<epoll_create>()  should be closed by using B<close>(2).  When all file "
872 "descriptors referring to an epoll instance have been closed, the kernel "
873 "destroys the instance and releases the associated resources for reuse."
874 msgstr ""
875
876 #. type: SS
877 #: build/C/man2/epoll_create.2:57
878 #, no-wrap
879 msgid "epoll_create1()"
880 msgstr ""
881
882 #. type: Plain text
883 #: build/C/man2/epoll_create.2:69
884 msgid ""
885 "If I<flags> is 0, then, other than the fact that the obsolete I<size> "
886 "argument is dropped, B<epoll_create1>()  is the same as B<epoll_create>().  "
887 "The following value can be included in I<flags> to obtain different "
888 "behavior:"
889 msgstr ""
890
891 #. type: TP
892 #: build/C/man2/epoll_create.2:69
893 #, no-wrap
894 msgid "B<EPOLL_CLOEXEC>"
895 msgstr ""
896
897 #. type: Plain text
898 #: build/C/man2/epoll_create.2:79
899 msgid ""
900 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the new file descriptor.  See "
901 "the description of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this "
902 "may be useful."
903 msgstr ""
904
905 #. type: SH
906 #: build/C/man2/epoll_create.2:79 build/C/man2/epoll_ctl.2:158 build/C/man2/epoll_wait.2:136 build/C/man2/poll.2:275
907 #, no-wrap
908 msgid "RETURN VALUE"
909 msgstr ""
910
911 #. type: Plain text
912 #: build/C/man2/epoll_create.2:86
913 msgid ""
914 "On success, these system calls return a nonnegative file descriptor.  On "
915 "error, -1 is returned, and I<errno> is set to indicate the error."
916 msgstr ""
917
918 #. type: SH
919 #: build/C/man2/epoll_create.2:86 build/C/man2/epoll_ctl.2:167 build/C/man2/epoll_wait.2:148 build/C/man2/poll.2:285
920 #, no-wrap
921 msgid "ERRORS"
922 msgstr ""
923
924 #. type: TP
925 #: build/C/man2/epoll_create.2:87 build/C/man2/epoll_create.2:91 build/C/man2/epoll_ctl.2:182 build/C/man2/epoll_wait.2:165 build/C/man2/poll.2:294
926 #, no-wrap
927 msgid "B<EINVAL>"
928 msgstr ""
929
930 #. type: Plain text
931 #: build/C/man2/epoll_create.2:91
932 msgid "I<size> is not positive."
933 msgstr ""
934
935 #. type: Plain text
936 #: build/C/man2/epoll_create.2:96
937 msgid "(B<epoll_create1>())  Invalid value specified in I<flags>."
938 msgstr ""
939
940 #. type: TP
941 #: build/C/man2/epoll_create.2:96
942 #, no-wrap
943 msgid "B<EMFILE>"
944 msgstr ""
945
946 #. type: Plain text
947 #: build/C/man2/epoll_create.2:104
948 msgid ""
949 "The per-user limit on the number of epoll instances imposed by "
950 "I</proc/sys/fs/epoll/max_user_instances> was encountered.  See B<epoll>(7)  "
951 "for further details."
952 msgstr ""
953
954 #. type: TP
955 #: build/C/man2/epoll_create.2:104
956 #, no-wrap
957 msgid "B<ENFILE>"
958 msgstr ""
959
960 #. type: Plain text
961 #: build/C/man2/epoll_create.2:107
962 msgid "The system limit on the total number of open files has been reached."
963 msgstr ""
964
965 #. type: TP
966 #: build/C/man2/epoll_create.2:107 build/C/man2/epoll_ctl.2:205 build/C/man2/poll.2:301
967 #, no-wrap
968 msgid "B<ENOMEM>"
969 msgstr ""
970
971 #. type: Plain text
972 #: build/C/man2/epoll_create.2:110
973 msgid "There was insufficient memory to create the kernel object."
974 msgstr ""
975
976 #. type: Plain text
977 #: build/C/man2/epoll_create.2:114
978 msgid ""
979 "B<epoll_create>()  was added to the kernel in version 2.6.  Library support "
980 "is provided in glibc starting with version 2.3.2."
981 msgstr ""
982
983 #.  To be precise: kernel 2.5.44.
984 #.  The interface should be finalized by Linux kernel 2.5.66.
985 #. type: Plain text
986 #: build/C/man2/epoll_create.2:120
987 msgid ""
988 "B<epoll_create1>()  was added to the kernel in version 2.6.27.  Library "
989 "support is provided in glibc starting with version 2.9."
990 msgstr ""
991
992 #. type: Plain text
993 #: build/C/man2/epoll_create.2:123
994 msgid "B<epoll_create>()  is Linux-specific."
995 msgstr ""
996
997 #. type: SH
998 #: build/C/man2/epoll_create.2:123 build/C/man2/epoll_ctl.2:235 build/C/man2/epoll_wait.2:186 build/C/man2/poll.2:330
999 #, no-wrap
1000 msgid "NOTES"
1001 msgstr ""
1002
1003 #. type: Plain text
1004 #: build/C/man2/epoll_create.2:146
1005 msgid ""
1006 "In the initial B<epoll_create>()  implementation, the I<size> argument "
1007 "informed the kernel of the number of file descriptors that the caller "
1008 "expected to add to the B<epoll> instance.  The kernel used this information "
1009 "as a hint for the amount of space to initially allocate in internal data "
1010 "structures describing events.  (If necessary, the kernel would allocate more "
1011 "space if the caller's usage exceeded the hint given in I<size>.)  Nowadays, "
1012 "this hint is no longer required (the kernel dynamically sizes the required "
1013 "data structures without needing the hint), but I<size> must still be greater "
1014 "than zero, in order to ensure backward compatibility when new B<epoll> "
1015 "applications are run on older kernels."
1016 msgstr ""
1017
1018 #. type: Plain text
1019 #: build/C/man2/epoll_create.2:151
1020 msgid "B<close>(2), B<epoll_ctl>(2), B<epoll_wait>(2), B<epoll>(7)"
1021 msgstr ""
1022
1023 #. type: TH
1024 #: build/C/man2/epoll_ctl.2:21
1025 #, no-wrap
1026 msgid "EPOLL_CTL"
1027 msgstr ""
1028
1029 #. type: Plain text
1030 #: build/C/man2/epoll_ctl.2:24
1031 msgid "epoll_ctl - control interface for an epoll descriptor"
1032 msgstr ""
1033
1034 #. type: Plain text
1035 #: build/C/man2/epoll_ctl.2:29
1036 msgid ""
1037 "B<int epoll_ctl(int >I<epfd>B<, int >I<op>B<, int >I<fd>B<, struct "
1038 "epoll_event *>I<event>B<);>"
1039 msgstr ""
1040
1041 #. type: Plain text
1042 #: build/C/man2/epoll_ctl.2:39
1043 msgid ""
1044 "This system call performs control operations on the B<epoll>(7)  instance "
1045 "referred to by the file descriptor I<epfd>.  It requests that the operation "
1046 "I<op> be performed for the target file descriptor, I<fd>."
1047 msgstr ""
1048
1049 #. type: Plain text
1050 #: build/C/man2/epoll_ctl.2:43
1051 msgid "Valid values for the I<op> argument are :"
1052 msgstr ""
1053
1054 #. type: TP
1055 #: build/C/man2/epoll_ctl.2:43
1056 #, no-wrap
1057 msgid "B<EPOLL_CTL_ADD>"
1058 msgstr ""
1059
1060 #. type: Plain text
1061 #: build/C/man2/epoll_ctl.2:55
1062 msgid ""
1063 "Register the target file descriptor I<fd> on the B<epoll> instance referred "
1064 "to by the file descriptor I<epfd> and associate the event I<event> with the "
1065 "internal file linked to I<fd>."
1066 msgstr ""
1067
1068 #. type: TP
1069 #: build/C/man2/epoll_ctl.2:55
1070 #, no-wrap
1071 msgid "B<EPOLL_CTL_MOD>"
1072 msgstr ""
1073
1074 #. type: Plain text
1075 #: build/C/man2/epoll_ctl.2:61
1076 msgid "Change the event I<event> associated with the target file descriptor I<fd>."
1077 msgstr ""
1078
1079 #. type: TP
1080 #: build/C/man2/epoll_ctl.2:61
1081 #, no-wrap
1082 msgid "B<EPOLL_CTL_DEL>"
1083 msgstr ""
1084
1085 #. type: Plain text
1086 #: build/C/man2/epoll_ctl.2:72
1087 msgid ""
1088 "Remove (deregister) the target file descriptor I<fd> from the B<epoll> "
1089 "instance referred to by I<epfd>.  The I<event> is ignored and can be NULL "
1090 "(but see BUGS below)."
1091 msgstr ""
1092
1093 #. type: Plain text
1094 #: build/C/man2/epoll_ctl.2:80
1095 msgid ""
1096 "The I<event> argument describes the object linked to the file descriptor "
1097 "I<fd>.  The I<struct epoll_event> is defined as :"
1098 msgstr ""
1099
1100 #. type: Plain text
1101 #: build/C/man2/epoll_ctl.2:89
1102 #, no-wrap
1103 msgid ""
1104 "typedef union epoll_data {\n"
1105 "    void        *ptr;\n"
1106 "    int          fd;\n"
1107 "    uint32_t     u32;\n"
1108 "    uint64_t     u64;\n"
1109 "} epoll_data_t;\n"
1110 msgstr ""
1111
1112 #. type: Plain text
1113 #: build/C/man2/epoll_ctl.2:94
1114 #, no-wrap
1115 msgid ""
1116 "struct epoll_event {\n"
1117 "    uint32_t     events;      /* Epoll events */\n"
1118 "    epoll_data_t data;        /* User data variable */\n"
1119 "};\n"
1120 msgstr ""
1121
1122 #. type: Plain text
1123 #: build/C/man2/epoll_ctl.2:101
1124 msgid ""
1125 "The I<events> member is a bit set composed using the following available "
1126 "event types:"
1127 msgstr ""
1128
1129 #. type: TP
1130 #: build/C/man2/epoll_ctl.2:101
1131 #, no-wrap
1132 msgid "B<EPOLLIN>"
1133 msgstr ""
1134
1135 #. type: Plain text
1136 #: build/C/man2/epoll_ctl.2:106
1137 msgid "The associated file is available for B<read>(2)  operations."
1138 msgstr ""
1139
1140 #. type: TP
1141 #: build/C/man2/epoll_ctl.2:106
1142 #, no-wrap
1143 msgid "B<EPOLLOUT>"
1144 msgstr ""
1145
1146 #. type: Plain text
1147 #: build/C/man2/epoll_ctl.2:111
1148 msgid "The associated file is available for B<write>(2)  operations."
1149 msgstr ""
1150
1151 #. type: TP
1152 #: build/C/man2/epoll_ctl.2:111
1153 #, no-wrap
1154 msgid "B<EPOLLRDHUP> (since Linux 2.6.17)"
1155 msgstr ""
1156
1157 #. type: Plain text
1158 #: build/C/man2/epoll_ctl.2:117
1159 msgid ""
1160 "Stream socket peer closed connection, or shut down writing half of "
1161 "connection.  (This flag is especially useful for writing simple code to "
1162 "detect peer shutdown when using Edge Triggered monitoring.)"
1163 msgstr ""
1164
1165 #. type: TP
1166 #: build/C/man2/epoll_ctl.2:117
1167 #, no-wrap
1168 msgid "B<EPOLLPRI>"
1169 msgstr ""
1170
1171 #. type: Plain text
1172 #: build/C/man2/epoll_ctl.2:122
1173 msgid "There is urgent data available for B<read>(2)  operations."
1174 msgstr ""
1175
1176 #. type: TP
1177 #: build/C/man2/epoll_ctl.2:122
1178 #, no-wrap
1179 msgid "B<EPOLLERR>"
1180 msgstr ""
1181
1182 #. type: Plain text
1183 #: build/C/man2/epoll_ctl.2:128
1184 msgid ""
1185 "Error condition happened on the associated file descriptor.  "
1186 "B<epoll_wait>(2)  will always wait for this event; it is not necessary to "
1187 "set it in I<events>."
1188 msgstr ""
1189
1190 #. type: TP
1191 #: build/C/man2/epoll_ctl.2:128
1192 #, no-wrap
1193 msgid "B<EPOLLHUP>"
1194 msgstr ""
1195
1196 #. type: Plain text
1197 #: build/C/man2/epoll_ctl.2:134
1198 msgid ""
1199 "Hang up happened on the associated file descriptor.  B<epoll_wait>(2)  will "
1200 "always wait for this event; it is not necessary to set it in I<events>."
1201 msgstr ""
1202
1203 #. type: TP
1204 #: build/C/man2/epoll_ctl.2:134
1205 #, no-wrap
1206 msgid "B<EPOLLET>"
1207 msgstr ""
1208
1209 #. type: Plain text
1210 #: build/C/man2/epoll_ctl.2:144
1211 msgid ""
1212 "Sets the Edge Triggered behavior for the associated file descriptor.  The "
1213 "default behavior for B<epoll> is Level Triggered.  See B<epoll>(7)  for more "
1214 "detailed information about Edge and Level Triggered event distribution "
1215 "architectures."
1216 msgstr ""
1217
1218 #. type: TP
1219 #: build/C/man2/epoll_ctl.2:144
1220 #, no-wrap
1221 msgid "B<EPOLLONESHOT> (since Linux 2.6.2)"
1222 msgstr ""
1223
1224 #. type: Plain text
1225 #: build/C/man2/epoll_ctl.2:158
1226 msgid ""
1227 "Sets the one-shot behavior for the associated file descriptor.  This means "
1228 "that after an event is pulled out with B<epoll_wait>(2)  the associated file "
1229 "descriptor is internally disabled and no other events will be reported by "
1230 "the B<epoll> interface.  The user must call B<epoll_ctl>()  with "
1231 "B<EPOLL_CTL_MOD> to rearm the file descriptor with a new event mask."
1232 msgstr ""
1233
1234 #. type: Plain text
1235 #: build/C/man2/epoll_ctl.2:167
1236 msgid ""
1237 "When successful, B<epoll_ctl>()  returns zero.  When an error occurs, "
1238 "B<epoll_ctl>()  returns -1 and I<errno> is set appropriately."
1239 msgstr ""
1240
1241 #. type: TP
1242 #: build/C/man2/epoll_ctl.2:168 build/C/man2/epoll_wait.2:149
1243 #, no-wrap
1244 msgid "B<EBADF>"
1245 msgstr ""
1246
1247 #. type: Plain text
1248 #: build/C/man2/epoll_ctl.2:174
1249 msgid "I<epfd> or I<fd> is not a valid file descriptor."
1250 msgstr ""
1251
1252 #. type: TP
1253 #: build/C/man2/epoll_ctl.2:174
1254 #, no-wrap
1255 msgid "B<EEXIST>"
1256 msgstr ""
1257
1258 #. type: Plain text
1259 #: build/C/man2/epoll_ctl.2:182
1260 msgid ""
1261 "I<op> was B<EPOLL_CTL_ADD>, and the supplied file descriptor I<fd> is "
1262 "already registered with this epoll instance."
1263 msgstr ""
1264
1265 #. type: Plain text
1266 #: build/C/man2/epoll_ctl.2:195
1267 msgid ""
1268 "I<epfd> is not an B<epoll> file descriptor, or I<fd> is the same as I<epfd>, "
1269 "or the requested operation I<op> is not supported by this interface."
1270 msgstr ""
1271
1272 #. type: TP
1273 #: build/C/man2/epoll_ctl.2:195
1274 #, no-wrap
1275 msgid "B<ENOENT>"
1276 msgstr ""
1277
1278 #. type: Plain text
1279 #: build/C/man2/epoll_ctl.2:205
1280 msgid ""
1281 "I<op> was B<EPOLL_CTL_MOD> or B<EPOLL_CTL_DEL>, and I<fd> is not registered "
1282 "with this epoll instance."
1283 msgstr ""
1284
1285 #. type: Plain text
1286 #: build/C/man2/epoll_ctl.2:210
1287 msgid ""
1288 "There was insufficient memory to handle the requested I<op> control "
1289 "operation."
1290 msgstr ""
1291
1292 #. type: TP
1293 #: build/C/man2/epoll_ctl.2:210
1294 #, no-wrap
1295 msgid "B<ENOSPC>"
1296 msgstr ""
1297
1298 #. type: Plain text
1299 #: build/C/man2/epoll_ctl.2:220
1300 msgid ""
1301 "The limit imposed by I</proc/sys/fs/epoll/max_user_watches> was encountered "
1302 "while trying to register (B<EPOLL_CTL_ADD>)  a new file descriptor on an "
1303 "epoll instance.  See B<epoll>(7)  for further details."
1304 msgstr ""
1305
1306 #. type: TP
1307 #: build/C/man2/epoll_ctl.2:220
1308 #, no-wrap
1309 msgid "B<EPERM>"
1310 msgstr ""
1311
1312 #. type: Plain text
1313 #: build/C/man2/epoll_ctl.2:226
1314 msgid "The target file I<fd> does not support B<epoll>."
1315 msgstr ""
1316
1317 #.  To be precise: kernel 2.5.44.
1318 #.  The interface should be finalized by Linux kernel 2.5.66.
1319 #. type: Plain text
1320 #: build/C/man2/epoll_ctl.2:231
1321 msgid "B<epoll_ctl>()  was added to the kernel in version 2.6."
1322 msgstr ""
1323
1324 #. type: Plain text
1325 #: build/C/man2/epoll_ctl.2:235
1326 msgid ""
1327 "B<epoll_ctl>()  is Linux-specific.  Library support is provided in glibc "
1328 "starting with version 2.3.2."
1329 msgstr ""
1330
1331 #. type: Plain text
1332 #: build/C/man2/epoll_ctl.2:240
1333 msgid ""
1334 "The B<epoll> interface supports all file descriptors that support "
1335 "B<poll>(2)."
1336 msgstr ""
1337
1338 #. type: SH
1339 #: build/C/man2/epoll_ctl.2:240 build/C/man2/poll.2:352
1340 #, no-wrap
1341 msgid "BUGS"
1342 msgstr ""
1343
1344 #. type: Plain text
1345 #: build/C/man2/epoll_ctl.2:254
1346 msgid ""
1347 "In kernel versions before 2.6.9, the B<EPOLL_CTL_DEL> operation required a "
1348 "non-NULL pointer in I<event>, even though this argument is ignored.  Since "
1349 "Linux 2.6.9, I<event> can be specified as NULL when using B<EPOLL_CTL_DEL>.  "
1350 "Applications that need to be portable to kernels before 2.6.9 should specify "
1351 "a non-NULL pointer in I<event>."
1352 msgstr ""
1353
1354 #. type: Plain text
1355 #: build/C/man2/epoll_ctl.2:259
1356 msgid "B<epoll_create>(2), B<epoll_wait>(2), B<poll>(2), B<epoll>(7)"
1357 msgstr ""
1358
1359 #. type: TH
1360 #: build/C/man2/epoll_wait.2:23
1361 #, no-wrap
1362 msgid "EPOLL_WAIT"
1363 msgstr ""
1364
1365 #. type: Plain text
1366 #: build/C/man2/epoll_wait.2:26
1367 msgid "epoll_wait, epoll_pwait - wait for an I/O event on an epoll file descriptor"
1368 msgstr ""
1369
1370 #. type: Plain text
1371 #: build/C/man2/epoll_wait.2:35
1372 #, no-wrap
1373 msgid ""
1374 "B<int epoll_wait(int >I<epfd>B<, struct epoll_event *>I<events>B<,>\n"
1375 "B<               int >I<maxevents>B<, int >I<timeout>B<);>\n"
1376 "B<int epoll_pwait(int >I<epfd>B<, struct epoll_event *>I<events>B<,>\n"
1377 "B<               int >I<maxevents>B<, int >I<timeout>B<,>\n"
1378 "B<               const sigset_t *>I<sigmask>B<);>\n"
1379 msgstr ""
1380
1381 #. type: Plain text
1382 #: build/C/man2/epoll_wait.2:53
1383 msgid ""
1384 "The B<epoll_wait>()  system call waits for events on the B<epoll>(7)  "
1385 "instance referred to by the file descriptor I<epfd>.  The memory area "
1386 "pointed to by I<events> will contain the events that will be available for "
1387 "the caller.  Up to I<maxevents> are returned by B<epoll_wait>().  The "
1388 "I<maxevents> argument must be greater than zero."
1389 msgstr ""
1390
1391 #. type: Plain text
1392 #: build/C/man2/epoll_wait.2:66
1393 msgid ""
1394 "The call blocks the calling thread for a maximum time of I<timeout> "
1395 "milliseconds.  Specifying a I<timeout> of -1 causes B<epoll_wait>()  to "
1396 "block indefinitely, while specifying a I<timeout> equal to zero cause "
1397 "B<epoll_wait>()  to return immediately, even if no events are available."
1398 msgstr ""
1399
1400 #. type: Plain text
1401 #: build/C/man2/epoll_wait.2:70
1402 msgid "The I<struct epoll_event> is defined as :"
1403 msgstr ""
1404
1405 #. type: Plain text
1406 #: build/C/man2/epoll_wait.2:79
1407 #, no-wrap
1408 msgid ""
1409 "typedef union epoll_data {\n"
1410 "    void    *ptr;\n"
1411 "    int      fd;\n"
1412 "    uint32_t u32;\n"
1413 "    uint64_t u64;\n"
1414 "} epoll_data_t;\n"
1415 msgstr ""
1416
1417 #. type: Plain text
1418 #: build/C/man2/epoll_wait.2:84
1419 #, no-wrap
1420 msgid ""
1421 "struct epoll_event {\n"
1422 "    uint32_t     events;    /* Epoll events */\n"
1423 "    epoll_data_t data;      /* User data variable */\n"
1424 "};\n"
1425 msgstr ""
1426
1427 #. type: Plain text
1428 #: build/C/man2/epoll_wait.2:95
1429 msgid ""
1430 "The I<data> of each returned structure will contain the same data the user "
1431 "set with an B<epoll_ctl>(2)  (B<EPOLL_CTL_ADD>,B<EPOLL_CTL_MOD>)  while the "
1432 "I<events> member will contain the returned event bit field."
1433 msgstr ""
1434
1435 #. type: SS
1436 #: build/C/man2/epoll_wait.2:95
1437 #, no-wrap
1438 msgid "epoll_pwait()"
1439 msgstr ""
1440
1441 #. type: Plain text
1442 #: build/C/man2/epoll_wait.2:109
1443 msgid ""
1444 "The relationship between B<epoll_wait>()  and B<epoll_pwait>()  is analogous "
1445 "to the relationship between B<select>(2)  and B<pselect>(2): like "
1446 "B<pselect>(2), B<epoll_pwait>()  allows an application to safely wait until "
1447 "either a file descriptor becomes ready or until a signal is caught."
1448 msgstr ""
1449
1450 #. type: Plain text
1451 #: build/C/man2/epoll_wait.2:113
1452 msgid "The following B<epoll_pwait>()  call:"
1453 msgstr ""
1454
1455 #. type: Plain text
1456 #: build/C/man2/epoll_wait.2:116
1457 #, no-wrap
1458 msgid "    ready = epoll_pwait(epfd, &events, maxevents, timeout, &sigmask);\n"
1459 msgstr ""
1460
1461 #. type: Plain text
1462 #: build/C/man2/epoll_wait.2:121 build/C/man2/poll.2:224
1463 msgid "is equivalent to I<atomically> executing the following calls:"
1464 msgstr ""
1465
1466 #. type: Plain text
1467 #: build/C/man2/epoll_wait.2:124
1468 #, no-wrap
1469 msgid "    sigset_t origmask;\n"
1470 msgstr ""
1471
1472 #. type: Plain text
1473 #: build/C/man2/epoll_wait.2:128
1474 #, no-wrap
1475 msgid ""
1476 "    sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
1477 "    ready = epoll_wait(epfd, &events, maxevents, timeout);\n"
1478 "    sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
1479 msgstr ""
1480
1481 #. type: Plain text
1482 #: build/C/man2/epoll_wait.2:136
1483 msgid ""
1484 "The I<sigmask> argument may be specified as NULL, in which case "
1485 "B<epoll_pwait>()  is equivalent to B<epoll_wait>()."
1486 msgstr ""
1487
1488 #. type: Plain text
1489 #: build/C/man2/epoll_wait.2:148
1490 msgid ""
1491 "When successful, B<epoll_wait>()  returns the number of file descriptors "
1492 "ready for the requested I/O, or zero if no file descriptor became ready "
1493 "during the requested I<timeout> milliseconds.  When an error occurs, "
1494 "B<epoll_wait>()  returns -1 and I<errno> is set appropriately."
1495 msgstr ""
1496
1497 #. type: Plain text
1498 #: build/C/man2/epoll_wait.2:153
1499 msgid "I<epfd> is not a valid file descriptor."
1500 msgstr ""
1501
1502 #. type: TP
1503 #: build/C/man2/epoll_wait.2:153 build/C/man2/poll.2:286
1504 #, no-wrap
1505 msgid "B<EFAULT>"
1506 msgstr ""
1507
1508 #. type: Plain text
1509 #: build/C/man2/epoll_wait.2:158
1510 msgid ""
1511 "The memory area pointed to by I<events> is not accessible with write "
1512 "permissions."
1513 msgstr ""
1514
1515 #. type: TP
1516 #: build/C/man2/epoll_wait.2:158 build/C/man2/poll.2:290
1517 #, no-wrap
1518 msgid "B<EINTR>"
1519 msgstr ""
1520
1521 #. type: Plain text
1522 #: build/C/man2/epoll_wait.2:165
1523 msgid ""
1524 "The call was interrupted by a signal handler before any of the requested "
1525 "events occurred or the I<timeout> expired; see B<signal>(7)."
1526 msgstr ""
1527
1528 #. type: Plain text
1529 #: build/C/man2/epoll_wait.2:173
1530 msgid ""
1531 "I<epfd> is not an B<epoll> file descriptor, or I<maxevents> is less than or "
1532 "equal to zero."
1533 msgstr ""
1534
1535 #.  To be precise: kernel 2.5.44.
1536 #.  The interface should be finalized by Linux kernel 2.5.66.
1537 #. type: Plain text
1538 #: build/C/man2/epoll_wait.2:179
1539 msgid ""
1540 "B<epoll_wait>()  was added to the kernel in version 2.6.  Library support is "
1541 "provided in glibc starting with version 2.3.2."
1542 msgstr ""
1543
1544 #. type: Plain text
1545 #: build/C/man2/epoll_wait.2:183
1546 msgid ""
1547 "B<epoll_pwait>()  was added to Linux in kernel 2.6.19.  Library support is "
1548 "provided in glibc starting with version 2.6."
1549 msgstr ""
1550
1551 #. type: Plain text
1552 #: build/C/man2/epoll_wait.2:186
1553 msgid "B<epoll_wait>()  is Linux-specific."
1554 msgstr ""
1555
1556 #. type: Plain text
1557 #: build/C/man2/epoll_wait.2:196
1558 msgid ""
1559 "While one thread is blocked in a call to B<epoll_pwait>(), it is possible "
1560 "for another thread to add a file descriptor to the waited-upon B<epoll> "
1561 "instance.  If the new file descriptor becomes ready, it will cause the "
1562 "B<epoll_wait>()  call to unblock."
1563 msgstr ""
1564
1565 #. type: Plain text
1566 #: build/C/man2/epoll_wait.2:200
1567 msgid "B<epoll_create>(2), B<epoll_ctl>(2), B<epoll>(7)"
1568 msgstr ""
1569
1570 #. type: TH
1571 #: build/C/man2/poll.2:31
1572 #, no-wrap
1573 msgid "POLL"
1574 msgstr ""
1575
1576 #. type: Plain text
1577 #: build/C/man2/poll.2:34
1578 msgid "poll, ppoll - wait for some event on a file descriptor"
1579 msgstr ""
1580
1581 #. type: Plain text
1582 #: build/C/man2/poll.2:37
1583 #, no-wrap
1584 msgid "B<#include E<lt>poll.hE<gt>>\n"
1585 msgstr ""
1586
1587 #. type: Plain text
1588 #: build/C/man2/poll.2:39
1589 #, no-wrap
1590 msgid ""
1591 "B<int poll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, int "
1592 ">I<timeout>B<);>\n"
1593 msgstr ""
1594
1595 #. type: Plain text
1596 #: build/C/man2/poll.2:42
1597 #, no-wrap
1598 msgid ""
1599 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
1600 "B<#include E<lt>poll.hE<gt>>\n"
1601 msgstr ""
1602
1603 #. type: Plain text
1604 #: build/C/man2/poll.2:45
1605 #, no-wrap
1606 msgid ""
1607 "B<int ppoll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, >\n"
1608 "B<        const struct timespec *>I<timeout_ts>B<, const sigset_t "
1609 "*>I<sigmask>B<);>\n"
1610 msgstr ""
1611
1612 #. type: Plain text
1613 #: build/C/man2/poll.2:52
1614 msgid ""
1615 "B<poll>()  performs a similar task to B<select>(2): it waits for one of a "
1616 "set of file descriptors to become ready to perform I/O."
1617 msgstr ""
1618
1619 #. type: Plain text
1620 #: build/C/man2/poll.2:56
1621 msgid ""
1622 "The set of file descriptors to be monitored is specified in the I<fds> "
1623 "argument, which is an array of structures of the following form:"
1624 msgstr ""
1625
1626 #. type: Plain text
1627 #: build/C/man2/poll.2:64
1628 #, no-wrap
1629 msgid ""
1630 "struct pollfd {\n"
1631 "    int   fd;         /* file descriptor */\n"
1632 "    short events;     /* requested events */\n"
1633 "    short revents;    /* returned events */\n"
1634 "};\n"
1635 msgstr ""
1636
1637 #. type: Plain text
1638 #: build/C/man2/poll.2:71
1639 msgid ""
1640 "The caller should specify the number of items in the I<fds> array in "
1641 "I<nfds>."
1642 msgstr ""
1643
1644 #. type: Plain text
1645 #: build/C/man2/poll.2:86
1646 msgid ""
1647 "The field I<fd> contains a file descriptor for an open file.  If this field "
1648 "is negative, then the corresponding I<events> field is ignored and the "
1649 "I<revents> field returns zero.  (This provides an easy way of ignoring a "
1650 "file descriptor for a single B<poll>()  call: simply negate the I<fd> "
1651 "field.)"
1652 msgstr ""
1653
1654 #. type: Plain text
1655 #: build/C/man2/poll.2:98
1656 msgid ""
1657 "The field I<events> is an input parameter, a bit mask specifying the events "
1658 "the application is interested in for the file descriptor I<fd>.  If this "
1659 "field is specified as zero, then all events are ignored for I<fd> and "
1660 "I<revents> returns zero."
1661 msgstr ""
1662
1663 #. type: Plain text
1664 #: build/C/man2/poll.2:117
1665 msgid ""
1666 "The field I<revents> is an output parameter, filled by the kernel with the "
1667 "events that actually occurred.  The bits returned in I<revents> can include "
1668 "any of those specified in I<events>, or one of the values B<POLLERR>, "
1669 "B<POLLHUP>, or B<POLLNVAL>.  (These three bits are meaningless in the "
1670 "I<events> field, and will be set in the I<revents> field whenever the "
1671 "corresponding condition is true.)"
1672 msgstr ""
1673
1674 #. type: Plain text
1675 #: build/C/man2/poll.2:122
1676 msgid ""
1677 "If none of the events requested (and no error) has occurred for any of the "
1678 "file descriptors, then B<poll>()  blocks until one of the events occurs."
1679 msgstr ""
1680
1681 #. type: Plain text
1682 #: build/C/man2/poll.2:131
1683 msgid ""
1684 "The I<timeout> argument specifies an upper limit on the time for which "
1685 "B<poll>()  will block, in milliseconds.  Specifying a negative value in "
1686 "I<timeout> means an infinite timeout."
1687 msgstr ""
1688
1689 #. type: Plain text
1690 #: build/C/man2/poll.2:137
1691 msgid ""
1692 "The bits that may be set/returned in I<events> and I<revents> are defined in "
1693 "I<E<lt>poll.hE<gt>>:"
1694 msgstr ""
1695
1696 #. type: TP
1697 #: build/C/man2/poll.2:138
1698 #, no-wrap
1699 msgid "B<POLLIN>"
1700 msgstr ""
1701
1702 #. type: Plain text
1703 #: build/C/man2/poll.2:141
1704 msgid "There is data to read."
1705 msgstr ""
1706
1707 #. type: TP
1708 #: build/C/man2/poll.2:141
1709 #, no-wrap
1710 msgid "B<POLLPRI>"
1711 msgstr ""
1712
1713 #. type: Plain text
1714 #: build/C/man2/poll.2:145
1715 msgid ""
1716 "There is urgent data to read (e.g., out-of-band data on TCP socket; "
1717 "pseudoterminal master in packet mode has seen state change in slave)."
1718 msgstr ""
1719
1720 #. type: TP
1721 #: build/C/man2/poll.2:145
1722 #, no-wrap
1723 msgid "B<POLLOUT>"
1724 msgstr ""
1725
1726 #. type: Plain text
1727 #: build/C/man2/poll.2:148
1728 msgid "Writing now will not block."
1729 msgstr ""
1730
1731 #. type: TP
1732 #: build/C/man2/poll.2:148
1733 #, no-wrap
1734 msgid "B<POLLRDHUP> (since Linux 2.6.17)"
1735 msgstr ""
1736
1737 #. type: Plain text
1738 #: build/C/man2/poll.2:159
1739 msgid ""
1740 "Stream socket peer closed connection, or shut down writing half of "
1741 "connection.  The B<_GNU_SOURCE> feature test macro must be defined (before "
1742 "including I<any> header files)  in order to obtain this definition."
1743 msgstr ""
1744
1745 #. type: TP
1746 #: build/C/man2/poll.2:159
1747 #, no-wrap
1748 msgid "B<POLLERR>"
1749 msgstr ""
1750
1751 #. type: Plain text
1752 #: build/C/man2/poll.2:162
1753 msgid "Error condition (output only)."
1754 msgstr ""
1755
1756 #. type: TP
1757 #: build/C/man2/poll.2:162
1758 #, no-wrap
1759 msgid "B<POLLHUP>"
1760 msgstr ""
1761
1762 #. type: Plain text
1763 #: build/C/man2/poll.2:165
1764 msgid "Hang up (output only)."
1765 msgstr ""
1766
1767 #. type: TP
1768 #: build/C/man2/poll.2:165
1769 #, no-wrap
1770 msgid "B<POLLNVAL>"
1771 msgstr ""
1772
1773 #. type: Plain text
1774 #: build/C/man2/poll.2:170
1775 msgid "Invalid request: I<fd> not open (output only)."
1776 msgstr ""
1777
1778 #. type: Plain text
1779 #: build/C/man2/poll.2:176
1780 msgid ""
1781 "When compiling with B<_XOPEN_SOURCE> defined, one also has the following, "
1782 "which convey no further information beyond the bits listed above:"
1783 msgstr ""
1784
1785 #. type: TP
1786 #: build/C/man2/poll.2:177
1787 #, no-wrap
1788 msgid "B<POLLRDNORM>"
1789 msgstr ""
1790
1791 #. type: Plain text
1792 #: build/C/man2/poll.2:181
1793 msgid "Equivalent to B<POLLIN>."
1794 msgstr ""
1795
1796 #. type: TP
1797 #: build/C/man2/poll.2:181
1798 #, no-wrap
1799 msgid "B<POLLRDBAND>"
1800 msgstr ""
1801
1802 #.  POLLRDBAND is used in the DECnet protocol.
1803 #. type: Plain text
1804 #: build/C/man2/poll.2:185
1805 msgid "Priority band data can be read (generally unused on Linux)."
1806 msgstr ""
1807
1808 #. type: TP
1809 #: build/C/man2/poll.2:185
1810 #, no-wrap
1811 msgid "B<POLLWRNORM>"
1812 msgstr ""
1813
1814 #. type: Plain text
1815 #: build/C/man2/poll.2:189
1816 msgid "Equivalent to B<POLLOUT>."
1817 msgstr ""
1818
1819 #. type: TP
1820 #: build/C/man2/poll.2:189
1821 #, no-wrap
1822 msgid "B<POLLWRBAND>"
1823 msgstr ""
1824
1825 #. type: Plain text
1826 #: build/C/man2/poll.2:192
1827 msgid "Priority data may be written."
1828 msgstr ""
1829
1830 #. type: Plain text
1831 #: build/C/man2/poll.2:196
1832 msgid "Linux also knows about, but does not use B<POLLMSG>."
1833 msgstr ""
1834
1835 #. type: SS
1836 #: build/C/man2/poll.2:196
1837 #, no-wrap
1838 msgid "ppoll()"
1839 msgstr ""
1840
1841 #. type: Plain text
1842 #: build/C/man2/poll.2:210
1843 msgid ""
1844 "The relationship between B<poll>()  and B<ppoll>()  is analogous to the "
1845 "relationship between B<select>(2)  and B<pselect>(2): like B<pselect>(2), "
1846 "B<ppoll>()  allows an application to safely wait until either a file "
1847 "descriptor becomes ready or until a signal is caught."
1848 msgstr ""
1849
1850 #. type: Plain text
1851 #: build/C/man2/poll.2:216
1852 msgid ""
1853 "Other than the difference in the precision of the I<timeout> argument, the "
1854 "following B<ppoll>()  call:"
1855 msgstr ""
1856
1857 #. type: Plain text
1858 #: build/C/man2/poll.2:219
1859 #, no-wrap
1860 msgid "    ready = ppoll(&fds, nfds, timeout_ts, &sigmask);\n"
1861 msgstr ""
1862
1863 #. type: Plain text
1864 #: build/C/man2/poll.2:228
1865 #, no-wrap
1866 msgid ""
1867 "    sigset_t origmask;\n"
1868 "    int timeout;\n"
1869 msgstr ""
1870
1871 #. type: Plain text
1872 #: build/C/man2/poll.2:234
1873 #, no-wrap
1874 msgid ""
1875 "    timeout = (timeout_ts == NULL) ? -1 :\n"
1876 "              (timeout_ts.tv_sec * 1000 + timeout_ts.tv_nsec / 1000000);\n"
1877 "    sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
1878 "    ready = poll(&fds, nfds, timeout);\n"
1879 "    sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
1880 msgstr ""
1881
1882 #. type: Plain text
1883 #: build/C/man2/poll.2:241
1884 msgid ""
1885 "See the description of B<pselect>(2)  for an explanation of why B<ppoll>()  "
1886 "is necessary."
1887 msgstr ""
1888
1889 #. type: Plain text
1890 #: build/C/man2/poll.2:253
1891 msgid ""
1892 "If the I<sigmask> argument is specified as NULL, then no signal mask "
1893 "manipulation is performed (and thus B<ppoll>()  differs from B<poll>()  only "
1894 "in the precision of the I<timeout> argument)."
1895 msgstr ""
1896
1897 #. type: Plain text
1898 #: build/C/man2/poll.2:260
1899 msgid ""
1900 "The I<timeout_ts> argument specifies an upper limit on the amount of time "
1901 "that B<ppoll>()  will block.  This argument is a pointer to a structure of "
1902 "the following form:"
1903 msgstr ""
1904
1905 #. type: Plain text
1906 #: build/C/man2/poll.2:267
1907 #, no-wrap
1908 msgid ""
1909 "struct timespec {\n"
1910 "    long    tv_sec;         /* seconds */\n"
1911 "    long    tv_nsec;        /* nanoseconds */\n"
1912 "};\n"
1913 msgstr ""
1914
1915 #. type: Plain text
1916 #: build/C/man2/poll.2:275
1917 msgid ""
1918 "If I<timeout_ts> is specified as NULL, then B<ppoll>()  can block "
1919 "indefinitely."
1920 msgstr ""
1921
1922 #. type: Plain text
1923 #: build/C/man2/poll.2:285
1924 msgid ""
1925 "On success, a positive number is returned; this is the number of structures "
1926 "which have nonzero I<revents> fields (in other words, those descriptors with "
1927 "events or errors reported).  A value of 0 indicates that the call timed out "
1928 "and no file descriptors were ready.  On error, -1 is returned, and I<errno> "
1929 "is set appropriately."
1930 msgstr ""
1931
1932 #. type: Plain text
1933 #: build/C/man2/poll.2:290
1934 msgid ""
1935 "The array given as argument was not contained in the calling program's "
1936 "address space."
1937 msgstr ""
1938
1939 #. type: Plain text
1940 #: build/C/man2/poll.2:294
1941 msgid "A signal occurred before any requested event; see B<signal>(7)."
1942 msgstr ""
1943
1944 #. type: Plain text
1945 #: build/C/man2/poll.2:301
1946 msgid "The I<nfds> value exceeds the B<RLIMIT_NOFILE> value."
1947 msgstr ""
1948
1949 #. type: Plain text
1950 #: build/C/man2/poll.2:304
1951 msgid "There was no space to allocate file descriptor tables."
1952 msgstr ""
1953
1954 #. type: Plain text
1955 #: build/C/man2/poll.2:317
1956 msgid ""
1957 "The B<poll>()  system call was introduced in Linux 2.1.23.  The B<poll>()  "
1958 "library call was introduced in libc 5.4.28 (and provides emulation using "
1959 "B<select>(2)  if your kernel does not have a B<poll>()  system call)."
1960 msgstr ""
1961
1962 #. type: Plain text
1963 #: build/C/man2/poll.2:324
1964 msgid ""
1965 "The B<ppoll>()  system call was added to Linux in kernel 2.6.16.  The "
1966 "B<ppoll>()  library call was added in glibc 2.4."
1967 msgstr ""
1968
1969 #.  NetBSD 3.0 has a pollts() which is like Linux ppoll().
1970 #. type: Plain text
1971 #: build/C/man2/poll.2:330
1972 msgid "B<poll>()  conforms to POSIX.1-2001.  B<ppoll>()  is Linux-specific."
1973 msgstr ""
1974
1975 #. type: Plain text
1976 #: build/C/man2/poll.2:338
1977 msgid ""
1978 "Some implementations define the nonstandard constant B<INFTIM> with the "
1979 "value -1 for use as a I<timeout> for B<poll>().  This constant is not "
1980 "provided in glibc."
1981 msgstr ""
1982
1983 #. type: SS
1984 #: build/C/man2/poll.2:338
1985 #, no-wrap
1986 msgid "Linux Notes"
1987 msgstr ""
1988
1989 #. type: Plain text
1990 #: build/C/man2/poll.2:352
1991 msgid ""
1992 "The Linux B<ppoll>()  system call modifies its I<timeout_ts> argument.  "
1993 "However, the glibc wrapper function hides this behavior by using a local "
1994 "variable for the timeout argument that is passed to the system call.  Thus, "
1995 "the glibc B<ppoll>()  function does not modify its I<timeout_ts> argument."
1996 msgstr ""
1997
1998 #. type: Plain text
1999 #: build/C/man2/poll.2:356
2000 msgid ""
2001 "See the discussion of spurious readiness notifications under the BUGS "
2002 "section of B<select>(2)."
2003 msgstr ""
2004
2005 #. type: Plain text
2006 #: build/C/man2/poll.2:360
2007 msgid "B<select>(2), B<select_tut>(2), B<time>(7)"
2008 msgstr ""