aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cargo_watch/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-02-01 15:25:44 +0000
committerAleksey Kladov <[email protected]>2020-02-01 15:25:44 +0000
commit5559d6b8a88750a78d91ff9c6cc1a1a736d22042 (patch)
tree80e3157d3cfd3436a1e0e4f2257c4369bbdfea1b /crates/ra_cargo_watch/src
parenta878f39b5eea8876ee6238eca9b935cc32656862 (diff)
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
Diffstat (limited to 'crates/ra_cargo_watch/src')
-rw-r--r--crates/ra_cargo_watch/src/lib.rs1
1 files changed, 1 insertions, 0 deletions
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 {
343 .args(&args) 343 .args(&args)
344 .stdout(Stdio::piped()) 344 .stdout(Stdio::piped())
345 .stderr(Stdio::null()) 345 .stderr(Stdio::null())
346 .stdin(Stdio::null())
346 .spawn() 347 .spawn()
347 .expect("couldn't launch cargo"); 348 .expect("couldn't launch cargo");
348 349