select.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:33:22 +01:00
parent f14637570d
commit 20cc8fa829
1 changed files with 17 additions and 0 deletions

View File

@ -386,6 +386,23 @@ Moreover, POSIX requires
.I fd
to be a valid file descriptor.
On some other UNIX systems,
.\" Darwin, according to a report by Jeremy Sequoia, relayed by Josh Triplett
.BR select ()
can fail with the error
.B EAGAIN
if the system fails to allocate kernel-internal resources, rather than
.B ENOMEM
as Linux does.
POSIX specifies this error for
.BR poll (2),
but not for
.BR select ().
Portable programs may wish to check for
.B EAGAIN
and loop, just as with
.BR EINTR .
Concerning the types involved, the classical situation is that
the two fields of a
.I timeval