go-serial
go-serial copied to clipboard
syscall select has limitations
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.
Any update on the status of this?
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).