Skip to content

Commit

Permalink
check result from termios
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonkaliski committed Jan 24, 2024
1 parent 09a11d5 commit f6e080c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ impl Pty {

if let Ok(mut termios) = termios::tcgetattr(&pty_pair.controller) {
termios.input_modes.set(InputModes::IUTF8, true);
let _ = termios::tcsetattr(&pty_pair.controller, OptionalActions::Now, &termios);
termios::tcsetattr(&pty_pair.controller, OptionalActions::Now, &termios)
.map_err(|err| NAPI_ERROR::new(napi::Status::GenericFailure, err))?;
}

cmd.stdin(unsafe { Stdio::from_raw_fd(fd_user) });
Expand Down

0 comments on commit f6e080c

Please sign in to comment.