diff --git a/crates/command/src/async.rs b/crates/command/src/async.rs index bf89665536..d5aae45b04 100644 --- a/crates/command/src/async.rs +++ b/crates/command/src/async.rs @@ -100,11 +100,13 @@ impl Command { #[cfg(all(windows, not(feature = "test-util")))] { use async_process::windows::CommandExt; + use windows::Win32::System::Threading; // We need to set the `CREATE_BREAKAWAY_FROM_JOB` flag to avoid assigning // the process to the same Job Object as the Warp process, otherwise the // process will be killed when the Warp process is killed. - let flags = windows::Win32::System::Threading::CREATE_NO_WINDOW.0 - | windows::Win32::System::Threading::CREATE_BREAKAWAY_FROM_JOB.0; + let flags = Threading::CREATE_NO_WINDOW.0 + | Threading::DETACHED_PROCESS.0 + | Threading::CREATE_BREAKAWAY_FROM_JOB.0; inner.creation_flags(flags); } Self {