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 limitations #128

Open
kulti opened this issue Dec 27, 2021 · 2 comments
Open

syscall select has limitations #128

kulti opened this issue Dec 27, 2021 · 2 comments

Comments

@kulti
Copy link

kulti commented Dec 27, 2021

Hi, 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 found this issue using another library. At first, I try to find alternative implementations for serial and found your library with similar issue. I did not try to reproduce it with your library, but is should not make sense, because the problem in using the syscall select. You can look at my PR https://github.com/goburrow/serial/pull/20/files for reference of syscall poll usage.

@12bchl
Copy link

12bchl commented Nov 3, 2022

Any update on the status of this?

@cmaglie
Copy link
Member

cmaglie commented Nov 25, 2022

I'm not planning to do it. At least in the short term...
If anyone is willing to give it a try I may review a PR (or at least it will be available to others to try).

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

No branches or pull requests

3 participants