From 6f653bb1b15b327c1adb5018e2957631cd708d5d Mon Sep 17 00:00:00 2001 From: Pirh Date: Mon, 9 Oct 2017 19:20:07 +0100 Subject: [PATCH 1/2] Document defaults for stdin, stdout, and stderr methods of Command --- src/libstd/process.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/libstd/process.rs b/src/libstd/process.rs index dbb589912153c..1352c640fddb6 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -552,6 +552,15 @@ impl Command { /// Configuration for the child process's standard input (stdin) handle. /// + /// Defaults to [`inherit`] when used with `spawn` or `status`, and + /// defaults to [`piped`] when used with `output`. + /// + /// On Windows, if the `#![windows_subsystem = "windows"]` attribute is + /// set, no stdin is connected unless explicitly assigned. + /// + /// [`inherit`]: struct.Stdio.html#method.inherit + /// [`piped`]: struct.Stdio.html#method.piped + /// /// # Examples /// /// Basic usage: @@ -572,6 +581,15 @@ impl Command { /// Configuration for the child process's standard output (stdout) handle. /// + /// Defaults to [`inherit`] when used with `spawn` or `status`, and + /// defaults to [`piped`] when used with `output`. + /// + /// On Windows, if the `#![windows_subsystem = "windows"]` attribute is + /// set, no stdout is connected unless explicitly assigned. + /// + /// [`inherit`]: struct.Stdio.html#method.inherit + /// [`piped`]: struct.Stdio.html#method.piped + /// /// # Examples /// /// Basic usage: @@ -592,6 +610,15 @@ impl Command { /// Configuration for the child process's standard error (stderr) handle. /// + /// Defaults to [`inherit`] when used with `spawn` or `status`, and + /// defaults to [`piped`] when used with `output`. + /// + /// On Windows, if the `#![windows_subsystem = "windows"]` attribute is + /// set, no stderr is connected unless explicitly assigned. + /// + /// [`inherit`]: struct.Stdio.html#method.inherit + /// [`piped`]: struct.Stdio.html#method.piped + /// /// # Examples /// /// Basic usage: From 210c91100fe76926647eb5d71a77dc3b527ef038 Mon Sep 17 00:00:00 2001 From: Pirh Date: Tue, 10 Oct 2017 17:58:13 +0100 Subject: [PATCH 2/2] Remove misleading line on Windows Subsystem stdio --- src/libstd/process.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/libstd/process.rs b/src/libstd/process.rs index 1352c640fddb6..d110fcfee6baa 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -555,9 +555,6 @@ impl Command { /// Defaults to [`inherit`] when used with `spawn` or `status`, and /// defaults to [`piped`] when used with `output`. /// - /// On Windows, if the `#![windows_subsystem = "windows"]` attribute is - /// set, no stdin is connected unless explicitly assigned. - /// /// [`inherit`]: struct.Stdio.html#method.inherit /// [`piped`]: struct.Stdio.html#method.piped /// @@ -584,9 +581,6 @@ impl Command { /// Defaults to [`inherit`] when used with `spawn` or `status`, and /// defaults to [`piped`] when used with `output`. /// - /// On Windows, if the `#![windows_subsystem = "windows"]` attribute is - /// set, no stdout is connected unless explicitly assigned. - /// /// [`inherit`]: struct.Stdio.html#method.inherit /// [`piped`]: struct.Stdio.html#method.piped /// @@ -613,9 +607,6 @@ impl Command { /// Defaults to [`inherit`] when used with `spawn` or `status`, and /// defaults to [`piped`] when used with `output`. /// - /// On Windows, if the `#![windows_subsystem = "windows"]` attribute is - /// set, no stderr is connected unless explicitly assigned. - /// /// [`inherit`]: struct.Stdio.html#method.inherit /// [`piped`]: struct.Stdio.html#method.piped ///