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

fix(unix): restore terminal mode #724

Merged
merged 2 commits into from
Aug 19, 2023

Conversation

miraclx
Copy link
Contributor

@miraclx miraclx commented Aug 19, 2023

#717 migrated to the use of the termios crate for handling terminal modes.

Small oversight in the patch made it so the raw mode patch needed for this crate leaks into the terminal.

Repro (on master 35ea49a):

$ stty
speed 38400 baud;
lflags: echoe echok echoke echoctl pendin
oflags: -oxtabs
cflags: cs8 -parenb
$
$ # let's pick any example to run
$
$ cargo run --features derive --example example
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
     Running `target/debug/examples/example`
1> ^C
Interrupted
$
$ # now, we can clearly see the leak
$
$ stty
speed 38400 baud;
lflags: -icanon -isig -iexten -echo echoe echok echoke echoctl
iflags: -icrnl -ixon -brkint
oflags: -oxtabs
cflags: cs8 -parenb

@gwenn gwenn merged commit 1c4091a into kkawakam:master Aug 19, 2023
@miraclx miraclx deleted the miraclx/restore-terminal-mode branch August 19, 2023 14:24
@gwenn
Copy link
Collaborator

gwenn commented Aug 19, 2023

Many thanks

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 this pull request may close these issues.

2 participants