]> git.lizzy.rs Git - rust.git/commitdiff
Clarify stdin behavior of `Command::output`.
authorCorey Farwell <coreyf@rwell.org>
Thu, 23 Nov 2017 01:47:31 +0000 (20:47 -0500)
committerCorey Farwell <coreyf@rwell.org>
Thu, 23 Nov 2017 01:47:31 +0000 (20:47 -0500)
Fixes #44929.

src/libstd/process.rs

index 35c33f4025380a8495e6883bb156996e9d461b9b..2335695ae42d4a747df2ebb7efe276955f8db1d6 100644 (file)
@@ -712,8 +712,10 @@ pub fn spawn(&mut self) -> io::Result<Child> {
     /// 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
     ///