Skip to content

Commit 5559d6b

Browse files
committed
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 rust-analyzer/lsp-server#10
1 parent a878f39 commit 5559d6b

File tree

1 file changed

+1
-0
lines changed
  • crates/ra_cargo_watch/src

1 file changed

+1
-0
lines changed

crates/ra_cargo_watch/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ impl WatchThread {
343343
.args(&args)
344344
.stdout(Stdio::piped())
345345
.stderr(Stdio::null())
346+
.stdin(Stdio::null())
346347
.spawn()
347348
.expect("couldn't launch cargo");
348349

0 commit comments

Comments
 (0)