-
Notifications
You must be signed in to change notification settings - Fork 115
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
On Linux if program exits when read_char() is blocking, the terminal will stay in raw mode #172
Comments
This reproes for me using Windows Subsystem for Linux, exactly as described by OP. |
To work around an issue in the console crate (console-rs/console#172), use stdin-nochar mode on Unix-based systems by default. Users can still opt in to the more interactive mode if they want.
Unfortunately the only way to prevent this would be to hook ctrl+c and i'm not sure if that is something that should be done. Potentially there needs to be an API that can be called in your own ctrl+c handler. |
@mitsuhiko The same issue with How to reproduce: Seems like |
Problem
Run the following code on Linux with
console v0.15.7
:After the program exits, the terminal will stay in raw mode. Anything I type in shell does not display on screen.
Related issues
The text was updated successfully, but these errors were encountered: