From 6deb274b8283b1d5afe0666d21d6093c89a0835d Mon Sep 17 00:00:00 2001 From: David Hewitt <1939362+davidhewitt@users.noreply.github.com> Date: Thu, 12 Dec 2019 15:01:23 +0000 Subject: Fix deadlock when closing on Windows using Conpty Fixes #3042. --- alacritty_terminal/src/tty/windows/mod.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'alacritty_terminal/src/tty/windows/mod.rs') diff --git a/alacritty_terminal/src/tty/windows/mod.rs b/alacritty_terminal/src/tty/windows/mod.rs index c9c0be73..e112d305 100644 --- a/alacritty_terminal/src/tty/windows/mod.rs +++ b/alacritty_terminal/src/tty/windows/mod.rs @@ -45,6 +45,8 @@ pub enum PtyHandle { } pub struct Pty { + // XXX: Handle is required to be the first field, to ensure correct drop order. Dropping + // `conout` before `handle` will cause a deadlock. handle: PtyHandle, // TODO: It's on the roadmap for the Conpty API to support Overlapped I/O. // See https://github.com/Microsoft/console/issues/262 -- cgit