There's an issue on Windows when using Stdio::piped() for stdout. If the child process writes too many bytes to stdout, it appears to get permanently blocked. A minimal test case (echo 2049 blank lines to cmd) is:
fn main() {
::std::process::Command::new("cmd")
.args(&["/c", "for /l %i in (1, 1, 2049) do @echo["])
.stdout(::std::process::Stdio::piped())
.status();
}
This hangs for me, but succeeds if only 2048 echos are specified (which is why I'm suspecting it's related to filling the 4096-byte buffer).
There's an issue on Windows when using
Stdio::piped()forstdout. If the child process writes too many bytes to stdout, it appears to get permanently blocked. A minimal test case (echo 2049 blank lines to cmd) is:This hangs for me, but succeeds if only 2048
echos are specified (which is why I'm suspecting it's related to filling the 4096-byte buffer).