We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab53025 commit 2e292c1Copy full SHA for 2e292c1
src/process.rs
@@ -127,9 +127,17 @@ impl PtyProcess {
127
128
// set echo off
129
let mut flags = termios::tcgetattr(STDIN_FILENO)?;
130
- flags.local_flags &= !termios::LocalFlags::ECHO;
+ flags.local_flags.remove(termios::LocalFlags::ECHO);
131
termios::tcsetattr(STDIN_FILENO, termios::SetArg::TCSANOW, &flags)?;
132
133
+ loop {
134
+ flags = termios::tcgetattr(STDIN_FILENO)?;
135
+ if !flags.local_flags.contains(termios::LocalFlags::ECHO) {
136
+ break;
137
+ }
138
+ std::thread::sleep(std::time::Duration::from_millis(100));
139
140
+
141
command.exec();
142
Err(Error::Nix(nix::Error::last()))
143
}
0 commit comments