I don't think we should encourage or even mention the possibility of the
use of poll(2) to effect millisecond timeouts.  Even if the standard library
lacks such an interface.

I'm pretty sure you can't use this hack portably, either.

But mostly I just think it's a misuse of the interface and potentially
confusing to a reader of such code:

ok?

--
Scott Cheloha

Index: lib/libc/sys/poll.2
===================================================================
RCS file: /cvs/src/lib/libc/sys/poll.2,v
retrieving revision 1.35
diff -u -p -r1.35 poll.2
--- lib/libc/sys/poll.2 14 Feb 2017 17:51:14 -0000      1.35
+++ lib/libc/sys/poll.2 17 Aug 2018 14:55:48 -0000
@@ -183,12 +183,6 @@ and
 flags may be used to detect when out-of-band socket data may be read
 without blocking.
 .Pp
-In addition to I/O multiplexing,
-.Fn poll
-can be used to generate simple timeouts.
-This functionality may be achieved by passing a null pointer for
-.Fa fds .
-.Pp
 The
 .Fn ppoll
 function is similar to

Reply via email to