Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document defaults for stdin, stdout, and stderr methods of Command #45151

Merged
merged 2 commits into from
Oct 17, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/libstd/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you put the windows-specific lines below a 'Platform-specific behavior' header like we do here?

/// set, no stdin is connected unless explicitly assigned.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of curiosity, what do you mean by 'assigned' here? i'm guessing that's some windows-specific concept i'm not familiar with

///
/// [`inherit`]: struct.Stdio.html#method.inherit
/// [`piped`]: struct.Stdio.html#method.piped
///
/// # Examples
///
/// Basic usage:
Expand All @@ -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:
Expand All @@ -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:
Expand Down