poll.2: Document spurious EAGAIN error that can occur on other systems

Light reworking of text proposed by Josh Triplett.

Reported-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-02-04 12:26:49 +01:00
parent f5d65b55d0
commit f14637570d
1 changed files with 14 additions and 0 deletions

View File

@ -364,6 +364,20 @@ conforms to POSIX.1-2001 and POSIX.1-2008.
is Linux-specific.
.\" NetBSD 3.0 has a pollts() which is like Linux ppoll().
.SH NOTES
On some other UNIX systems,
.\" Darwin, according to a report by Jeremy Sequoia, relayed by Josh Triplett
.BR poll ()
can fail with the error
.B EAGAIN
if the system fails to allocate kernel-internal resources, rather than
.B ENOMEM
as Linux does.
POSIX permits this behavior.
Portable programs may wish to check for
.B EAGAIN
and loop, just as with
.BR EINTR .
Some implementations define the nonstandard constant
.B INFTIM
with the value \-1 for use as a