Skip to content

Commit

Permalink
fix: wait_with_output forget to close stdin (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
dovahcrow authored Nov 27, 2024
1 parent 3883153 commit 31bde68
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/child.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ impl<S> Child<S> {
/// output into this `Result<Output>` it is necessary to create new pipes between parent and
/// child. Use `stdout(Stdio::piped())` or `stderr(Stdio::piped())`, respectively.
pub async fn wait_with_output(mut self) -> Result<Output, Error> {
self.stdin().take();

let child_stdout = self.stdout.take();
let stdout_read = async move {
let mut stdout = Vec::new();
Expand Down

0 comments on commit 31bde68

Please sign in to comment.