From 83b804797baa7c65acdbcdea25462ff0723d9520 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Sun, 8 Oct 2023 08:26:05 +0400 Subject: Fix PTY being closed on creation The PTY got closed because `OwnedFd` automatically closed it. Fixes: 59c63d37 (Update dependencies) --- alacritty_terminal/src/tty/unix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alacritty_terminal/src/tty/unix.rs b/alacritty_terminal/src/tty/unix.rs index 46073cc9..3fecaef8 100644 --- a/alacritty_terminal/src/tty/unix.rs +++ b/alacritty_terminal/src/tty/unix.rs @@ -280,7 +280,7 @@ pub fn new(config: &PtyConfig, window_size: WindowSize, window_id: u64) -> Resul set_nonblocking(master_fd); } - let mut pty = Pty { child, file: unsafe { File::from_raw_fd(master_fd) }, signals }; + let mut pty = Pty { child, file: File::from(master), signals }; pty.on_resize(window_size); Ok(pty) }, -- cgit v1.2.3-54-g00ecf