-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-processArea: `std::process` and `std::env`Area: `std::process` and `std::env`C-bugCategory: This is a bug.Category: This is a bug.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
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 echo
s are specified (which is why I'm suspecting it's related to filling the 4096-byte buffer).
Metadata
Metadata
Assignees
Labels
A-processArea: `std::process` and `std::env`Area: `std::process` and `std::env`C-bugCategory: This is a bug.Category: This is a bug.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.