Commit 8f468fe0 authored by Niklas Hambüchen's avatar Niklas Hambüchen Committed by Ben Gamari

base: fdReady(): Add note about O_NONBLOCK requirement

Reviewers: bgamari, austin, hvr

Reviewed By: bgamari

Subscribers: rwbarton, thomie

Differential Revision:
parent 1825cbdb
......@@ -32,7 +32,11 @@
* inputReady(fd) checks to see whether input is available on the file
* descriptor 'fd' within 'msecs' milliseconds (or indefinitely if 'msecs' is
* negative). "Input is available" is defined as 'can I safely read at least a
* *character* from this file object without blocking?'
* *character* from this file object without blocking?' (this does not work
* reliably on Linux when the fd is a not-O_NONBLOCK socket, so if you pass
* socket fds to this function, ensure they have O_NONBLOCK;
* see `man 2 poll` and `man 2 select`, and
* This function blocks until either `msecs` have passed, or input is
* available.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment