From 53a0075e03acde59578833ad06d24341e0587e31 Mon Sep 17 00:00:00 2001 From: Smit Barmase Date: Tue, 10 Feb 2026 20:11:20 +0530 Subject: [PATCH] terminal: Fix Spawn Task and Agent terminal hangs on macOS (#48877) Follow-up to #47420 and #44193. #47420 fixed child-exit status handling via upstream alacritty change (https://github.com/alacritty/alacritty/pull/8825). However, stable/preview/nightly builds still reproduced hangs that dev builds did not. The root cause matches #44193: spawned children inherit crash-handler Mach exception ports and hang. We already reset exception ports in `util::command::new_smol_command` and `util::set_pre_exec_to_start_new_session`, but PTY child spawning in `alacritty_terminal` was not covered. This PR updates `alacritty_terminal` to include PTY `pre_exec` exception-port reset: https://github.com/zed-industries/alacritty/commit/9d9640d4e56d67a09d049f9c0a300aae08d4f61e Upstream: - https://github.com/alacritty/alacritty/pull/8835 Release Notes: - Fixed terminal tasks hanging on macOS when a spawned process is killed by a signal. --- Cargo.lock | 3 ++- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d48114ad87c1e489536ccab42157161e12001e44..427a0750b8b6f1b54a814878d27a22e2d61fa33a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -514,13 +514,14 @@ dependencies = [ [[package]] name = "alacritty_terminal" version = "0.25.1" -source = "git+https://github.com/zed-industries/alacritty?rev=936aee8761a17affc84ab418ae21306c27c26221#936aee8761a17affc84ab418ae21306c27c26221" +source = "git+https://github.com/zed-industries/alacritty?rev=9d9640d4#9d9640d4e56d67a09d049f9c0a300aae08d4f61e" dependencies = [ "base64 0.22.1", "bitflags 2.10.0", "home", "libc", "log", + "mach2 0.5.0", "miow", "parking_lot", "piper", diff --git a/Cargo.toml b/Cargo.toml index 8f0e0f8823f0ad4028380eec6c02869bd01e0c7a..b5397ddf73470a28edfe8ec7867701345ee4449d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -462,7 +462,7 @@ ztracing_macro = { path = "crates/ztracing_macro" } agent-client-protocol = { version = "=0.9.4", features = ["unstable"] } aho-corasick = "1.1" -alacritty_terminal = { git = "https://github.com/zed-industries/alacritty", rev = "936aee8761a17affc84ab418ae21306c27c26221" } +alacritty_terminal = { git = "https://github.com/zed-industries/alacritty", rev = "9d9640d4" } any_vec = "0.14" anyhow = "1.0.86" arrayvec = { version = "0.7.4", features = ["serde"] }