select ¶POSIX specification:
https://pubs.opengroup.org/onlinepubs/9799919799/functions/select.html
Portability problems fixed by Gnulib:
<winsock2.h>
instead of <sys/select.h>
on some platforms:
mingw, MSVC 14.
select can only be
called on descriptors created by the socket function, not on regular
file descriptors.
errno, and WSAGetLastError must be used
instead.
Portability problems not fixed by Gnulib:
select with a timeout, some implementations modify the
timeout parameter so that upon return from the function, it contains the
amount of time not slept. Other implementations leave the timeout parameter
unmodified.
select replacement might
return 0 even before the timeout has passed. Programs using it with pipes can
thus busy wait.
select
may fail, setting errno to EBADF.
FD_SETSIZE
but FD_SETSIZE / 2.