aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2023-10-08 08:26:05 +0400
committerGitHub <noreply@github.com>2023-10-08 08:26:05 +0400
commit83b804797baa7c65acdbcdea25462ff0723d9520 (patch)
treedd4a2989d84d62b0afa7b5ad9986cdc957fda3cc /alacritty_terminal
parent59c63d373804fe9d00d92d2dd47174d4e1637333 (diff)
downloadalacritty-83b804797baa7c65acdbcdea25462ff0723d9520.tar.gz
alacritty-83b804797baa7c65acdbcdea25462ff0723d9520.zip
Fix PTY being closed on creation
The PTY got closed because `OwnedFd` automatically closed it. Fixes: 59c63d37 (Update dependencies)
Diffstat (limited to 'alacritty_terminal')
-rw-r--r--alacritty_terminal/src/tty/unix.rs2
1 files changed, 1 insertions, 1 deletions
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)
},