From 5559d6b8a88750a78d91ff9c6cc1a1a736d22042 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 1 Feb 2020 16:25:44 +0100 Subject: Prevent child cargo process from messing with our stdin By default, `spawn` inherits stderr/stdout/stderr of the parent process, and so, if child, for example does fcntl(O_NONBLOCK), weird stuff happens to us. Closes https://github.com/rust-analyzer/lsp-server/pull/10 --- crates/ra_cargo_watch/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/ra_cargo_watch/src/lib.rs b/crates/ra_cargo_watch/src/lib.rs index ea7ddc86b..a718a5e52 100644 --- a/crates/ra_cargo_watch/src/lib.rs +++ b/crates/ra_cargo_watch/src/lib.rs @@ -343,6 +343,7 @@ impl WatchThread { .args(&args) .stdout(Stdio::piped()) .stderr(Stdio::null()) + .stdin(Stdio::null()) .spawn() .expect("couldn't launch cargo"); -- cgit v1.2.3