-
Notifications
You must be signed in to change notification settings - Fork 743
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
Polling from /dev/tty on macOS #1377
Comments
I don't really see how Mio can cleanly support polling from both If you do think of something please discuss it here first, because it seems it would become rather involved rather quickly. |
What about having a separate |
If its going to be a completely separate type/implementation it might as well live outside of Mio, at least for now. |
The advantage of having it inside Mio would be the interoperability with other Mio types (e.g. |
I don't what the tty equivalent is for Windows, but I doubt that IOCP supports it. In any case, I'm willing to review a change you propose, but I'm not yet convinced it belongs in Mio. I rather not add much more code (> 500 lines) or make the current implementation more complex. |
Closing this as there is little Mio can do here. It's up to macOS to support tty in kqueue. |
On MacOS, `poll` and `kqueue` are not supported for tty[1]. So let's ditch mio completely and directly call `select` ourselves. It's not a lot of work anyway. [1]: tokio-rs/mio#1377
On MacOS, `poll` and `kqueue` are not supported for tty[1]. So let's ditch mio completely and directly call `select` ourselves. It's not a lot of work anyway. This fixes MacOS support. [1]: tokio-rs/mio#1377
On MacOS, `poll` and `kqueue` are not supported for tty[1]. So let's ditch mio completely and directly call `select` ourselves. On non-MacOS, we use `poll` to avoid limitation of `select` that is limited to FDs below 1024. If the process has a lot of open FDs, we could end up with an FD higher than 1023 and get an error. This fixes MacOS support. [1]: tokio-rs/mio#1377
On MacOS, `poll` and `kqueue` are not supported for tty[1]. So let's ditch mio completely and directly call `select` ourselves. On non-MacOS, we use `poll` to avoid limitation of `select` that is limited to FDs below 1024. If the process has a lot of open FDs, we could end up with an FD higher than 1023 and get an error. This fixes MacOS support. [1]: tokio-rs/mio#1377
On MacOS, `poll` and `kqueue` are not supported for tty[1]. So let's ditch mio completely and directly call `select` ourselves. On non-MacOS, we use `poll` to avoid limitation of `select` that is limited to FDs below 1024. If the process has a lot of open FDs, we could end up with an FD higher than 1023 and get an error. This fixes MacOS support. [1]: tokio-rs/mio#1377
Polling on
/dev/tty
on macOS usingkqueue
is not supported and results inEINVAL
.results into
The same problem has been tackled in cpjreynolds/rustty#14 or in libuv/libuv@731adac with
select
.I'd be open to contribute to a fix, any suggestion?
The text was updated successfully, but these errors were encountered: