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.
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"
16 "Content-Type: text/plain; charset=CHARSET\n"
17 "Content-Transfer-Encoding: 8bit\n"
20 #: build/C/man7/epoll.7:21
26 #: build/C/man7/epoll.7:21 build/C/man2/epoll_wait.2:23
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
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
40 msgid "Linux Programmer's Manual"
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
50 #: build/C/man7/epoll.7:24
51 msgid "epoll - I/O event notification facility"
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
61 #: build/C/man7/epoll.7:26 build/C/man2/epoll_ctl.2:26
62 msgid "B<#include E<lt>sys/epoll.hE<gt>>"
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
72 #: build/C/man7/epoll.7:40
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:"
82 #: build/C/man7/epoll.7:40 build/C/man7/epoll.7:49 build/C/man7/epoll.7:57
88 #: build/C/man7/epoll.7:49
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).)"
96 #: build/C/man7/epoll.7:57
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."
104 #: build/C/man7/epoll.7:61
106 "B<epoll_wait>(2) waits for I/O events, blocking the calling thread if no "
107 "events are currently available."
111 #: build/C/man7/epoll.7:61
113 msgid "Level-Triggered and Edge-Triggered"
117 #: build/C/man7/epoll.7:70
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 "
126 #: build/C/man7/epoll.7:70
132 #: build/C/man7/epoll.7:76
134 "The file descriptor that represents the read side of a pipe (I<rfd>) is "
135 "registered on the B<epoll> instance."
139 #: build/C/man7/epoll.7:76
145 #: build/C/man7/epoll.7:78
146 msgid "A pipe writer writes 2 kB of data on the write side of the pipe."
150 #: build/C/man7/epoll.7:78
156 #: build/C/man7/epoll.7:84
158 "A call to B<epoll_wait>(2) is done that will return I<rfd> as a ready file "
163 #: build/C/man7/epoll.7:84
169 #: build/C/man7/epoll.7:87
170 msgid "The pipe reader reads 1 kB of data from I<rfd>."
174 #: build/C/man7/epoll.7:87
180 #: build/C/man7/epoll.7:91
181 msgid "A call to B<epoll_wait>(2) is done."
185 #: build/C/man7/epoll.7:126
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."
202 #: build/C/man7/epoll.7:136
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:"
211 #: build/C/man7/epoll.7:137
217 #: build/C/man7/epoll.7:140
218 msgid "with nonblocking file descriptors; and"
222 #: build/C/man7/epoll.7:140
228 #: build/C/man7/epoll.7:148
230 "by waiting for an event only after B<read>(2) or B<write>(2) return "
235 #: build/C/man7/epoll.7:159
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."
243 #: build/C/man7/epoll.7:176
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>."
254 #: build/C/man7/epoll.7:176
256 msgid "/proc interfaces"
259 #. Following was added in 2.6.28, but them removed in 2.6.29
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.
265 #: build/C/man7/epoll.7:184
267 "The following interfaces can be used to limit the amount of kernel memory "
272 #: build/C/man7/epoll.7:184
274 msgid "I</proc/sys/fs/epoll/max_user_watches> (since Linux 2.6.28)"
277 #. 2.6.29 (in 2.6.28, the default was 1/32 of lowmem)
279 #: build/C/man7/epoll.7:198
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."
290 #: build/C/man7/epoll.7:198
292 msgid "Example for Suggested Usage"
296 #: build/C/man7/epoll.7:227
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 "
311 #: build/C/man7/epoll.7:233
314 "#define MAX_EVENTS 10\n"
315 "struct epoll_event ev, events[MAX_EVENTS];\n"
316 "int listen_sock, conn_sock, nfds, epollfd;\n"
320 #: build/C/man7/epoll.7:236
323 "/* Set up listening socket, \\(aqlisten_sock\\(aq (socket(),\n"
324 " bind(), listen()) */\n"
328 #: build/C/man7/epoll.7:242
331 "epollfd = epoll_create(10);\n"
332 "if (epollfd == -1) {\n"
333 " perror(\"epoll_create\");\n"
334 " exit(EXIT_FAILURE);\n"
339 #: build/C/man7/epoll.7:249
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"
351 #: build/C/man7/epoll.7:256
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"
363 #: build/C/man7/epoll.7:278
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"
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"
379 " perror(\"epoll_ctl: conn_sock\");\n"
380 " exit(EXIT_FAILURE);\n"
383 " do_use_fd(events[n].data.fd);\n"
390 #: build/C/man7/epoll.7:297
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>."
400 #: build/C/man7/epoll.7:297
402 msgid "Questions and Answers"
406 #: build/C/man7/epoll.7:298
412 #: build/C/man7/epoll.7:303
414 "What is the key used to distinguish the file descriptors registered in an "
419 #: build/C/man7/epoll.7:303
425 #: build/C/man7/epoll.7:309
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)."
433 #: build/C/man7/epoll.7:309
439 #: build/C/man7/epoll.7:314
441 "What happens if you register the same file descriptor on an B<epoll> "
446 #: build/C/man7/epoll.7:314
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.
462 #. See http://thread.gmane.org/gmane.linux.kernel/596462/
463 #. "epoll design problems with common fork/exec patterns"
467 #: build/C/man7/epoll.7:345
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> "
477 #: build/C/man7/epoll.7:345
483 #: build/C/man7/epoll.7:353
485 "Can two B<epoll> instances wait for the same file descriptor? If so, are "
486 "events reported to both B<epoll> file descriptors?"
490 #: build/C/man7/epoll.7:353
496 #: build/C/man7/epoll.7:357
498 "Yes, and events would be reported to both. However, careful programming may "
499 "be needed to do this correctly."
503 #: build/C/man7/epoll.7:357
509 #: build/C/man7/epoll.7:362
510 msgid "Is the B<epoll> file descriptor itself poll/epoll/selectable?"
514 #: build/C/man7/epoll.7:362
520 #: build/C/man7/epoll.7:369
522 "Yes. If an B<epoll> file descriptor has events waiting then it will "
523 "indicate as being readable."
527 #: build/C/man7/epoll.7:369
533 #: build/C/man7/epoll.7:374
535 "What happens if one attempts to put an B<epoll> file descriptor into its own "
536 "file descriptor set?"
540 #: build/C/man7/epoll.7:374
546 #: build/C/man7/epoll.7:385
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."
553 #: build/C/man7/epoll.7:385
559 #: build/C/man7/epoll.7:390
561 "Can I send an B<epoll> file descriptor over a UNIX domain socket to another "
566 #: build/C/man7/epoll.7:390
572 #: build/C/man7/epoll.7:396
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."
579 #: build/C/man7/epoll.7:396
585 #: build/C/man7/epoll.7:401
587 "Will closing a file descriptor cause it to be removed from all B<epoll> sets "
592 #: build/C/man7/epoll.7:401
598 #: build/C/man7/epoll.7:429
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 "
616 #: build/C/man7/epoll.7:429
622 #: build/C/man7/epoll.7:434
624 "If more than one event occurs between B<epoll_wait>(2) calls, are they "
625 "combined or reported separately?"
629 #: build/C/man7/epoll.7:434
635 #: build/C/man7/epoll.7:437
636 msgid "They will be combined."
640 #: build/C/man7/epoll.7:437
646 #: build/C/man7/epoll.7:441
648 "Does an operation on a file descriptor affect the already collected but not "
649 "yet reported events?"
653 #: build/C/man7/epoll.7:441
659 #: build/C/man7/epoll.7:447
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."
666 #: build/C/man7/epoll.7:447
672 #: build/C/man7/epoll.7:455
674 "Do I need to continuously read/write a file descriptor until B<EAGAIN> when "
675 "using the B<EPOLLET> flag (edge-triggered behavior) ?"
679 #: build/C/man7/epoll.7:455
685 #: build/C/man7/epoll.7:465
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."
694 #: build/C/man7/epoll.7:471
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>."
702 #: build/C/man7/epoll.7:487
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.)"
716 #: build/C/man7/epoll.7:487
718 msgid "Possible Pitfalls and Ways to Avoid Them"
722 #: build/C/man7/epoll.7:488
724 msgid "B<o Starvation (edge-triggered)>"
728 #: build/C/man7/epoll.7:496
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>.)"
736 #: build/C/man7/epoll.7:504
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."
746 #: build/C/man7/epoll.7:504
748 msgid "B<o If using an event cache...>"
752 #: build/C/man7/epoll.7:520
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."
764 #: build/C/man7/epoll.7:531
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."
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
780 #. Its interface should be finalized in Linux kernel 2.5.66.
782 #: build/C/man7/epoll.7:537
784 "The B<epoll> API was introduced in Linux kernel 2.5.44. Support was added "
785 "to glibc in version 2.3.2."
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
791 msgid "CONFORMING TO"
795 #: build/C/man7/epoll.7:546
797 "The B<epoll> API is Linux-specific. Some other systems provide similar "
798 "mechanisms, for example, FreeBSD has I<kqueue>, and Solaris has "
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
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)"
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
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
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/."
828 #: build/C/man2/epoll_create.2:25
834 #: build/C/man2/epoll_create.2:25 build/C/man2/epoll_ctl.2:21 build/C/man2/poll.2:31
840 #: build/C/man2/epoll_create.2:28
841 msgid "epoll_create, epoll_create1 - open an epoll file descriptor"
845 #: build/C/man2/epoll_create.2:31 build/C/man2/epoll_wait.2:29
847 msgid "B<#include E<lt>sys/epoll.hE<gt>>\n"
851 #: build/C/man2/epoll_create.2:34
854 "B<int epoll_create(int >I<size>B<);>\n"
855 "B<int epoll_create1(int >I<flags>B<);>\n"
859 #: build/C/man2/epoll_create.2:43
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."
866 #: build/C/man2/epoll_create.2:56
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."
877 #: build/C/man2/epoll_create.2:57
879 msgid "epoll_create1()"
883 #: build/C/man2/epoll_create.2:69
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 "
892 #: build/C/man2/epoll_create.2:69
894 msgid "B<EPOLL_CLOEXEC>"
898 #: build/C/man2/epoll_create.2:79
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 "
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
912 #: build/C/man2/epoll_create.2:86
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."
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
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
931 #: build/C/man2/epoll_create.2:91
932 msgid "I<size> is not positive."
936 #: build/C/man2/epoll_create.2:96
937 msgid "(B<epoll_create1>()) Invalid value specified in I<flags>."
941 #: build/C/man2/epoll_create.2:96
947 #: build/C/man2/epoll_create.2:104
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."
955 #: build/C/man2/epoll_create.2:104
961 #: build/C/man2/epoll_create.2:107
962 msgid "The system limit on the total number of open files has been reached."
966 #: build/C/man2/epoll_create.2:107 build/C/man2/epoll_ctl.2:205 build/C/man2/poll.2:301
972 #: build/C/man2/epoll_create.2:110
973 msgid "There was insufficient memory to create the kernel object."
977 #: build/C/man2/epoll_create.2:114
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."
983 #. To be precise: kernel 2.5.44.
984 #. The interface should be finalized by Linux kernel 2.5.66.
986 #: build/C/man2/epoll_create.2:120
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."
993 #: build/C/man2/epoll_create.2:123
994 msgid "B<epoll_create>() is Linux-specific."
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
1004 #: build/C/man2/epoll_create.2:146
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."
1019 #: build/C/man2/epoll_create.2:151
1020 msgid "B<close>(2), B<epoll_ctl>(2), B<epoll_wait>(2), B<epoll>(7)"
1024 #: build/C/man2/epoll_ctl.2:21
1030 #: build/C/man2/epoll_ctl.2:24
1031 msgid "epoll_ctl - control interface for an epoll descriptor"
1035 #: build/C/man2/epoll_ctl.2:29
1037 "B<int epoll_ctl(int >I<epfd>B<, int >I<op>B<, int >I<fd>B<, struct "
1038 "epoll_event *>I<event>B<);>"
1042 #: build/C/man2/epoll_ctl.2:39
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>."
1050 #: build/C/man2/epoll_ctl.2:43
1051 msgid "Valid values for the I<op> argument are :"
1055 #: build/C/man2/epoll_ctl.2:43
1057 msgid "B<EPOLL_CTL_ADD>"
1061 #: build/C/man2/epoll_ctl.2:55
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>."
1069 #: build/C/man2/epoll_ctl.2:55
1071 msgid "B<EPOLL_CTL_MOD>"
1075 #: build/C/man2/epoll_ctl.2:61
1076 msgid "Change the event I<event> associated with the target file descriptor I<fd>."
1080 #: build/C/man2/epoll_ctl.2:61
1082 msgid "B<EPOLL_CTL_DEL>"
1086 #: build/C/man2/epoll_ctl.2:72
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)."
1094 #: build/C/man2/epoll_ctl.2:80
1096 "The I<event> argument describes the object linked to the file descriptor "
1097 "I<fd>. The I<struct epoll_event> is defined as :"
1101 #: build/C/man2/epoll_ctl.2:89
1104 "typedef union epoll_data {\n"
1113 #: build/C/man2/epoll_ctl.2:94
1116 "struct epoll_event {\n"
1117 " uint32_t events; /* Epoll events */\n"
1118 " epoll_data_t data; /* User data variable */\n"
1123 #: build/C/man2/epoll_ctl.2:101
1125 "The I<events> member is a bit set composed using the following available "
1130 #: build/C/man2/epoll_ctl.2:101
1136 #: build/C/man2/epoll_ctl.2:106
1137 msgid "The associated file is available for B<read>(2) operations."
1141 #: build/C/man2/epoll_ctl.2:106
1147 #: build/C/man2/epoll_ctl.2:111
1148 msgid "The associated file is available for B<write>(2) operations."
1152 #: build/C/man2/epoll_ctl.2:111
1154 msgid "B<EPOLLRDHUP> (since Linux 2.6.17)"
1158 #: build/C/man2/epoll_ctl.2:117
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.)"
1166 #: build/C/man2/epoll_ctl.2:117
1172 #: build/C/man2/epoll_ctl.2:122
1173 msgid "There is urgent data available for B<read>(2) operations."
1177 #: build/C/man2/epoll_ctl.2:122
1183 #: build/C/man2/epoll_ctl.2:128
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>."
1191 #: build/C/man2/epoll_ctl.2:128
1197 #: build/C/man2/epoll_ctl.2:134
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>."
1204 #: build/C/man2/epoll_ctl.2:134
1210 #: build/C/man2/epoll_ctl.2:144
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 "
1219 #: build/C/man2/epoll_ctl.2:144
1221 msgid "B<EPOLLONESHOT> (since Linux 2.6.2)"
1225 #: build/C/man2/epoll_ctl.2:158
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."
1235 #: build/C/man2/epoll_ctl.2:167
1237 "When successful, B<epoll_ctl>() returns zero. When an error occurs, "
1238 "B<epoll_ctl>() returns -1 and I<errno> is set appropriately."
1242 #: build/C/man2/epoll_ctl.2:168 build/C/man2/epoll_wait.2:149
1248 #: build/C/man2/epoll_ctl.2:174
1249 msgid "I<epfd> or I<fd> is not a valid file descriptor."
1253 #: build/C/man2/epoll_ctl.2:174
1259 #: build/C/man2/epoll_ctl.2:182
1261 "I<op> was B<EPOLL_CTL_ADD>, and the supplied file descriptor I<fd> is "
1262 "already registered with this epoll instance."
1266 #: build/C/man2/epoll_ctl.2:195
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."
1273 #: build/C/man2/epoll_ctl.2:195
1279 #: build/C/man2/epoll_ctl.2:205
1281 "I<op> was B<EPOLL_CTL_MOD> or B<EPOLL_CTL_DEL>, and I<fd> is not registered "
1282 "with this epoll instance."
1286 #: build/C/man2/epoll_ctl.2:210
1288 "There was insufficient memory to handle the requested I<op> control "
1293 #: build/C/man2/epoll_ctl.2:210
1299 #: build/C/man2/epoll_ctl.2:220
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."
1307 #: build/C/man2/epoll_ctl.2:220
1313 #: build/C/man2/epoll_ctl.2:226
1314 msgid "The target file I<fd> does not support B<epoll>."
1317 #. To be precise: kernel 2.5.44.
1318 #. The interface should be finalized by Linux kernel 2.5.66.
1320 #: build/C/man2/epoll_ctl.2:231
1321 msgid "B<epoll_ctl>() was added to the kernel in version 2.6."
1325 #: build/C/man2/epoll_ctl.2:235
1327 "B<epoll_ctl>() is Linux-specific. Library support is provided in glibc "
1328 "starting with version 2.3.2."
1332 #: build/C/man2/epoll_ctl.2:240
1334 "The B<epoll> interface supports all file descriptors that support "
1339 #: build/C/man2/epoll_ctl.2:240 build/C/man2/poll.2:352
1345 #: build/C/man2/epoll_ctl.2:254
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>."
1355 #: build/C/man2/epoll_ctl.2:259
1356 msgid "B<epoll_create>(2), B<epoll_wait>(2), B<poll>(2), B<epoll>(7)"
1360 #: build/C/man2/epoll_wait.2:23
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"
1371 #: build/C/man2/epoll_wait.2:35
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"
1382 #: build/C/man2/epoll_wait.2:53
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."
1392 #: build/C/man2/epoll_wait.2:66
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."
1401 #: build/C/man2/epoll_wait.2:70
1402 msgid "The I<struct epoll_event> is defined as :"
1406 #: build/C/man2/epoll_wait.2:79
1409 "typedef union epoll_data {\n"
1418 #: build/C/man2/epoll_wait.2:84
1421 "struct epoll_event {\n"
1422 " uint32_t events; /* Epoll events */\n"
1423 " epoll_data_t data; /* User data variable */\n"
1428 #: build/C/man2/epoll_wait.2:95
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."
1436 #: build/C/man2/epoll_wait.2:95
1438 msgid "epoll_pwait()"
1442 #: build/C/man2/epoll_wait.2:109
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."
1451 #: build/C/man2/epoll_wait.2:113
1452 msgid "The following B<epoll_pwait>() call:"
1456 #: build/C/man2/epoll_wait.2:116
1458 msgid " ready = epoll_pwait(epfd, &events, maxevents, timeout, &sigmask);\n"
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:"
1467 #: build/C/man2/epoll_wait.2:124
1469 msgid " sigset_t origmask;\n"
1473 #: build/C/man2/epoll_wait.2:128
1476 " sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
1477 " ready = epoll_wait(epfd, &events, maxevents, timeout);\n"
1478 " sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
1482 #: build/C/man2/epoll_wait.2:136
1484 "The I<sigmask> argument may be specified as NULL, in which case "
1485 "B<epoll_pwait>() is equivalent to B<epoll_wait>()."
1489 #: build/C/man2/epoll_wait.2:148
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."
1498 #: build/C/man2/epoll_wait.2:153
1499 msgid "I<epfd> is not a valid file descriptor."
1503 #: build/C/man2/epoll_wait.2:153 build/C/man2/poll.2:286
1509 #: build/C/man2/epoll_wait.2:158
1511 "The memory area pointed to by I<events> is not accessible with write "
1516 #: build/C/man2/epoll_wait.2:158 build/C/man2/poll.2:290
1522 #: build/C/man2/epoll_wait.2:165
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)."
1529 #: build/C/man2/epoll_wait.2:173
1531 "I<epfd> is not an B<epoll> file descriptor, or I<maxevents> is less than or "
1535 #. To be precise: kernel 2.5.44.
1536 #. The interface should be finalized by Linux kernel 2.5.66.
1538 #: build/C/man2/epoll_wait.2:179
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."
1545 #: build/C/man2/epoll_wait.2:183
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."
1552 #: build/C/man2/epoll_wait.2:186
1553 msgid "B<epoll_wait>() is Linux-specific."
1557 #: build/C/man2/epoll_wait.2:196
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."
1566 #: build/C/man2/epoll_wait.2:200
1567 msgid "B<epoll_create>(2), B<epoll_ctl>(2), B<epoll>(7)"
1571 #: build/C/man2/poll.2:31
1577 #: build/C/man2/poll.2:34
1578 msgid "poll, ppoll - wait for some event on a file descriptor"
1582 #: build/C/man2/poll.2:37
1584 msgid "B<#include E<lt>poll.hE<gt>>\n"
1588 #: build/C/man2/poll.2:39
1591 "B<int poll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, int "
1592 ">I<timeout>B<);>\n"
1596 #: build/C/man2/poll.2:42
1599 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
1600 "B<#include E<lt>poll.hE<gt>>\n"
1604 #: build/C/man2/poll.2:45
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"
1613 #: build/C/man2/poll.2:52
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."
1620 #: build/C/man2/poll.2:56
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:"
1627 #: build/C/man2/poll.2:64
1631 " int fd; /* file descriptor */\n"
1632 " short events; /* requested events */\n"
1633 " short revents; /* returned events */\n"
1638 #: build/C/man2/poll.2:71
1640 "The caller should specify the number of items in the I<fds> array in "
1645 #: build/C/man2/poll.2:86
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> "
1655 #: build/C/man2/poll.2:98
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."
1664 #: build/C/man2/poll.2:117
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.)"
1675 #: build/C/man2/poll.2:122
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."
1682 #: build/C/man2/poll.2:131
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."
1690 #: build/C/man2/poll.2:137
1692 "The bits that may be set/returned in I<events> and I<revents> are defined in "
1693 "I<E<lt>poll.hE<gt>>:"
1697 #: build/C/man2/poll.2:138
1703 #: build/C/man2/poll.2:141
1704 msgid "There is data to read."
1708 #: build/C/man2/poll.2:141
1714 #: build/C/man2/poll.2:145
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)."
1721 #: build/C/man2/poll.2:145
1727 #: build/C/man2/poll.2:148
1728 msgid "Writing now will not block."
1732 #: build/C/man2/poll.2:148
1734 msgid "B<POLLRDHUP> (since Linux 2.6.17)"
1738 #: build/C/man2/poll.2:159
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."
1746 #: build/C/man2/poll.2:159
1752 #: build/C/man2/poll.2:162
1753 msgid "Error condition (output only)."
1757 #: build/C/man2/poll.2:162
1763 #: build/C/man2/poll.2:165
1764 msgid "Hang up (output only)."
1768 #: build/C/man2/poll.2:165
1774 #: build/C/man2/poll.2:170
1775 msgid "Invalid request: I<fd> not open (output only)."
1779 #: build/C/man2/poll.2:176
1781 "When compiling with B<_XOPEN_SOURCE> defined, one also has the following, "
1782 "which convey no further information beyond the bits listed above:"
1786 #: build/C/man2/poll.2:177
1788 msgid "B<POLLRDNORM>"
1792 #: build/C/man2/poll.2:181
1793 msgid "Equivalent to B<POLLIN>."
1797 #: build/C/man2/poll.2:181
1799 msgid "B<POLLRDBAND>"
1802 #. POLLRDBAND is used in the DECnet protocol.
1804 #: build/C/man2/poll.2:185
1805 msgid "Priority band data can be read (generally unused on Linux)."
1809 #: build/C/man2/poll.2:185
1811 msgid "B<POLLWRNORM>"
1815 #: build/C/man2/poll.2:189
1816 msgid "Equivalent to B<POLLOUT>."
1820 #: build/C/man2/poll.2:189
1822 msgid "B<POLLWRBAND>"
1826 #: build/C/man2/poll.2:192
1827 msgid "Priority data may be written."
1831 #: build/C/man2/poll.2:196
1832 msgid "Linux also knows about, but does not use B<POLLMSG>."
1836 #: build/C/man2/poll.2:196
1842 #: build/C/man2/poll.2:210
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."
1851 #: build/C/man2/poll.2:216
1853 "Other than the difference in the precision of the I<timeout> argument, the "
1854 "following B<ppoll>() call:"
1858 #: build/C/man2/poll.2:219
1860 msgid " ready = ppoll(&fds, nfds, timeout_ts, &sigmask);\n"
1864 #: build/C/man2/poll.2:228
1867 " sigset_t origmask;\n"
1872 #: build/C/man2/poll.2:234
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"
1883 #: build/C/man2/poll.2:241
1885 "See the description of B<pselect>(2) for an explanation of why B<ppoll>() "
1890 #: build/C/man2/poll.2:253
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)."
1898 #: build/C/man2/poll.2:260
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:"
1906 #: build/C/man2/poll.2:267
1909 "struct timespec {\n"
1910 " long tv_sec; /* seconds */\n"
1911 " long tv_nsec; /* nanoseconds */\n"
1916 #: build/C/man2/poll.2:275
1918 "If I<timeout_ts> is specified as NULL, then B<ppoll>() can block "
1923 #: build/C/man2/poll.2:285
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."
1933 #: build/C/man2/poll.2:290
1935 "The array given as argument was not contained in the calling program's "
1940 #: build/C/man2/poll.2:294
1941 msgid "A signal occurred before any requested event; see B<signal>(7)."
1945 #: build/C/man2/poll.2:301
1946 msgid "The I<nfds> value exceeds the B<RLIMIT_NOFILE> value."
1950 #: build/C/man2/poll.2:304
1951 msgid "There was no space to allocate file descriptor tables."
1955 #: build/C/man2/poll.2:317
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)."
1963 #: build/C/man2/poll.2:324
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."
1969 #. NetBSD 3.0 has a pollts() which is like Linux ppoll().
1971 #: build/C/man2/poll.2:330
1972 msgid "B<poll>() conforms to POSIX.1-2001. B<ppoll>() is Linux-specific."
1976 #: build/C/man2/poll.2:338
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."
1984 #: build/C/man2/poll.2:338
1990 #: build/C/man2/poll.2:352
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."
1999 #: build/C/man2/poll.2:356
2001 "See the discussion of spurious readiness notifications under the BUGS "
2002 "section of B<select>(2)."
2006 #: build/C/man2/poll.2:360
2007 msgid "B<select>(2), B<select_tut>(2), B<time>(7)"