Skip to content

Commit 31bde68

Browse files
authored
fix: wait_with_output forget to close stdin (#172)
1 parent 3883153 commit 31bde68

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/child.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ impl<S> Child<S> {
140140
/// output into this `Result<Output>` it is necessary to create new pipes between parent and
141141
/// child. Use `stdout(Stdio::piped())` or `stderr(Stdio::piped())`, respectively.
142142
pub async fn wait_with_output(mut self) -> Result<Output, Error> {
143+
self.stdin().take();
144+
143145
let child_stdout = self.stdout.take();
144146
let stdout_read = async move {
145147
let mut stdout = Vec::new();

0 commit comments

Comments
 (0)