diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/ops/tty.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/ops/tty.rs b/runtime/ops/tty.rs index 5b49e3a24..77e1330b5 100644 --- a/runtime/ops/tty.rs +++ b/runtime/ops/tty.rs @@ -244,7 +244,8 @@ fn op_set_raw( let tty_mode_store = state.borrow::<TtyModeStore>().clone(); let previous_mode = tty_mode_store.get(rid); - let raw_fd = handle_or_fd; + // SAFETY: Nix crate requires value to implement the AsFd trait + let raw_fd = unsafe { std::os::fd::BorrowedFd::borrow_raw(handle_or_fd) }; if is_raw { let mut raw = match previous_mode { |