-
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-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
I fixed a bug that was caused by not calling .wait()
on a std::process::Child
. See the issue for the details. I'm not exactly sure how the bug manifested itself, but I noticed that not waiting for the child process whose stdin or stdout is inherited from the parent process can lead to weird behavior.
That's why I suggest to add #[must_use = "this Child may still be attached to its parent process's stdin/stdout and must be handled"]
to std::process::Child
. Currently I can't think of a reason why someone would not use a Child
and that's I think the compiler warnings on that will prevent more headaches than they will cause.
Metadata
Metadata
Assignees
Labels
A-processArea: `std::process` and `std::env`Area: `std::process` and `std::env`C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.