Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix Ctrl+C not working when Zed is launched from CLI (#39482)
John Turb2f0b1b168fc
diff --git a/crates/auto_update_helper/src/updater.rs b/crates/auto_update_helper/src/updater.rsindex d3d03135933..f741f0eaff2 100644--- a/crates/auto_update_helper/src/updater.rs+++ b/crates/auto_update_helper/src/updater.rs@@ -1,5 +1,4 @@use std::{- os::windows::process::CommandExt,path::Path,time::{Duration, Instant},};@@ -7,7 +6,6 @@ use std::{use anyhow::{Context as _, Result};use windows::Win32::{Foundation::{HWND, LPARAM, WPARAM},- System::Threading::CREATE_NEW_PROCESS_GROUP,UI::WindowsAndMessaging::PostMessageW,};@@ -207,9 +205,7 @@ pub(crate) fn perform_update(app_dir: &Path, hwnd: Option<isize>, launch: bool)}if launch {#[allow(clippy::disallowed_methods, reason = "doesn't run in the main binary")]- let _ = std::process::Command::new(app_dir.join("Zed.exe"))- .creation_flags(CREATE_NEW_PROCESS_GROUP.0)- .spawn();+ let _ = std::process::Command::new(app_dir.join("Zed.exe")).spawn();}log::info!("Update completed successfully");Ok(())diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rsindex f421ffe76c7..3044172d897 100644--- a/crates/cli/src/main.rs+++ b/crates/cli/src/main.rs@@ -731,15 +731,15 @@ mod windows {Storage::FileSystem::{CreateFileW, FILE_FLAGS_AND_ATTRIBUTES, FILE_SHARE_MODE, OPEN_EXISTING, WriteFile,},- System::Threading::{CREATE_NEW_PROCESS_GROUP, CreateMutexW},+ System::Threading::CreateMutexW,},core::HSTRING,};use crate::{Detect, InstalledApp};+ use std::io;use std::path::{Path, PathBuf};use std::process::ExitStatus;- use std::{io, os::windows::process::CommandExt};fn check_single_instance() -> bool {let mutex = unsafe {@@ -778,7 +778,6 @@ mod windows {fn launch(&self, ipc_url: String) -> anyhow::Result<()> {if check_single_instance() {std::process::Command::new(self.0.clone())- .creation_flags(CREATE_NEW_PROCESS_GROUP.0).arg(ipc_url).spawn()?;} else {