From e7d8220788b4fa7c266a1e4457591b694478771c Mon Sep 17 00:00:00 2001 From: Can Celik Date: Mon, 7 Sep 2026 16:14:46 +0300 Subject: fix: preserve sessions after interrupted pane exits (#3418) * fix: preserve sessions when pane shells are signaled refs #3415 * fix: preserve shutdown checkpoints across platforms refs #3415 --------- Co-authored-by: Jonathan Liebig --- src/platform/windows.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/platform/windows.rs') diff --git a/src/platform/windows.rs b/src/platform/windows.rs index ce0afedb..4deb1864 100644 --- a/src/platform/windows.rs +++ b/src/platform/windows.rs @@ -15,6 +15,15 @@ use std::{ mod clipboard_image; +pub(crate) fn classify_child_exit(status: &portable_pty::ExitStatus) -> super::ChildExitReason { + // STATUS_CONTROL_C_EXIT is reported without a Unix signal by portable-pty. + if status.exit_code() == 0xC000013A { + super::ChildExitReason::Interrupted + } else { + super::ChildExitReason::Exited + } +} + pub(crate) fn wait_client_stream_readable( _stream: &crate::ipc::LocalStream, ) -> std::io::Result<()> { -- cgit v1.2.3