From f14637570df2a2c7eae119d9c6c6e1a9d86776ef Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Thu, 4 Feb 2016 12:26:49 +0100 Subject: [PATCH] poll.2: Document spurious EAGAIN error that can occur on other systems Light reworking of text proposed by Josh Triplett. Reported-by: Josh Triplett Signed-off-by: Michael Kerrisk --- man2/poll.2 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/man2/poll.2 b/man2/poll.2 index c58c72d89..bb1dba169 100644 --- a/man2/poll.2 +++ b/man2/poll.2 @@ -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