From 2178e3a1b90a8169dc7439f28f8346f7c9c4d144 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Wed, 22 Nov 2017 20:47:31 -0500 Subject: [PATCH] Clarify stdin behavior of `Command::output`. Fixes #44929. --- src/libstd/process.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libstd/process.rs b/src/libstd/process.rs index 35c33f4025380..2335695ae42d4 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -712,8 +712,10 @@ impl Command { /// Executes the command as a child process, waiting for it to finish and /// collecting all of its output. /// - /// By default, stdin, stdout and stderr are captured (and used to - /// provide the resulting output). + /// By default, stdout and stderr are captured (and used to provide the + /// resulting output). Stdin is not inherited from the parent and any + /// attempt by the child process to read from the stdin stream will result + /// in the stream immediately closing. /// /// # Examples ///