select() doesn't work with file-descriptiors > FD_SETSIZE, which is 1024
per default.
In long-running processes that use a lot of FDs, this limit can be
reached quickly, causing the calls to select() to fail.
poll() doesn't have this restriction, while it is available on most
systems. Therefore, it is used over select() if possible.
On systems where it isn't available (esp. older versions of windows),
the code falls back to utilize select().
select() doesn't work with file-descriptiors > FD_SETSIZE, which is 1024 per default. In long-running processes that use a lot of FDs, this limit can be reached quickly, causing the calls to select() to fail.
poll() doesn't have this restriction, while it is available on most systems. Therefore, it is used over select() if possible. On systems where it isn't available (esp. older versions of windows), the code falls back to utilize select().