syscall select has a limitations
kulti opened this issue · 0 comments
kulti commented
Hi, thank you for useful library!
I've found an issue. The select syscall has a limitations:
select() can monitor only file descriptors numbers that
are less than FD_SETSIZE (1024)—an unreasonably low limit for
many modern applications—and this limitation will not change.
All modern applications should instead use poll(2) or epoll(7),
which do not suffer this limitation.
https://man7.org/linux/man-pages/man2/select.2.html#DESCRIPTION
In practice it looks like, that fd is ready to read, but reads zero bytes.
I've made a PR to use poll (epoll is linux only syscall).