Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

cli: Null stdio handles when spawning Zed on Windows (#52583)

João Soaresb42a6aa28f0b
diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs
index 459a8266c7f..2b5d10b29b9 100644
--- a/crates/cli/src/main.rs
+++ b/crates/cli/src/main.rs
@@ -1101,7 +1101,7 @@ mod windows {
use crate::{Detect, InstalledApp};
use std::io;
use std::path::{Path, PathBuf};
- use std::process::ExitStatus;
+ use std::process::{ExitStatus, Stdio};
fn check_single_instance() -> bool {
let mutex = unsafe {
@@ -1144,6 +1144,9 @@ mod windows {
if let Some(dir) = user_data_dir {
cmd.arg("--user-data-dir").arg(dir);
}
+ cmd.stdin(Stdio::null())
+ .stdout(Stdio::null())
+ .stderr(Stdio::null());
cmd.spawn()?;
} else {
unsafe {