Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syscall select has a limitations #19

Open
kulti opened this issue Dec 27, 2021 · 0 comments · May be fixed by #20
Open

syscall select has a limitations #19

kulti opened this issue Dec 27, 2021 · 0 comments · May be fixed by #20

Comments

@kulti
Copy link

kulti commented Dec 27, 2021

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant