синхронное мультиплексирование ввода / вывода (synchronous I/O multiplexing)
Возвращаемое значение (Return value)
On success, select
() and pselect
() return the number of file
descriptors contained in the three returned descriptor sets (that
is, the total number of bits that are set in readfds, writefds,
exceptfds). The return value may be zero if the timeout expired
before any file descriptors became ready.
On error, -1 is returned, and errno is set to indicate the error;
the file descriptor sets are unmodified, and timeout becomes
undefined.