We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a4d7320 commit b6df365Copy full SHA for b6df365
1 file changed
crates/sandchest-agent/src/session.rs
@@ -215,6 +215,17 @@ fn spawn_shell(
215
let pty = nix::pty::openpty(None, None)
216
.map_err(|e| Status::internal(format!("openpty failed: {e}")))?;
217
218
+ #[cfg(unix)]
219
+ {
220
+ use nix::sys::termios::{LocalFlags, SetArg, tcgetattr, tcsetattr};
221
+
222
+ let mut termios = tcgetattr(&pty.slave)
223
+ .map_err(|e| Status::internal(format!("tcgetattr failed: {e}")))?;
224
+ termios.local_flags.remove(LocalFlags::ECHO);
225
+ tcsetattr(&pty.slave, SetArg::TCSANOW, &termios)
226
+ .map_err(|e| Status::internal(format!("tcsetattr failed: {e}")))?;
227
+ }
228
229
let slave_raw = pty.slave.as_raw_fd();
230
231
let mut cmd = Command::new(shell);
0 commit comments