Skip to content

Commit 6f653bb

Browse files
author
Pirh
committed
Document defaults for stdin, stdout, and stderr methods of Command
1 parent 3ed8b69 commit 6f653bb

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/libstd/process.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,15 @@ impl Command {
552552

553553
/// Configuration for the child process's standard input (stdin) handle.
554554
///
555+
/// Defaults to [`inherit`] when used with `spawn` or `status`, and
556+
/// defaults to [`piped`] when used with `output`.
557+
///
558+
/// On Windows, if the `#![windows_subsystem = "windows"]` attribute is
559+
/// set, no stdin is connected unless explicitly assigned.
560+
///
561+
/// [`inherit`]: struct.Stdio.html#method.inherit
562+
/// [`piped`]: struct.Stdio.html#method.piped
563+
///
555564
/// # Examples
556565
///
557566
/// Basic usage:
@@ -572,6 +581,15 @@ impl Command {
572581

573582
/// Configuration for the child process's standard output (stdout) handle.
574583
///
584+
/// Defaults to [`inherit`] when used with `spawn` or `status`, and
585+
/// defaults to [`piped`] when used with `output`.
586+
///
587+
/// On Windows, if the `#![windows_subsystem = "windows"]` attribute is
588+
/// set, no stdout is connected unless explicitly assigned.
589+
///
590+
/// [`inherit`]: struct.Stdio.html#method.inherit
591+
/// [`piped`]: struct.Stdio.html#method.piped
592+
///
575593
/// # Examples
576594
///
577595
/// Basic usage:
@@ -592,6 +610,15 @@ impl Command {
592610

593611
/// Configuration for the child process's standard error (stderr) handle.
594612
///
613+
/// Defaults to [`inherit`] when used with `spawn` or `status`, and
614+
/// defaults to [`piped`] when used with `output`.
615+
///
616+
/// On Windows, if the `#![windows_subsystem = "windows"]` attribute is
617+
/// set, no stderr is connected unless explicitly assigned.
618+
///
619+
/// [`inherit`]: struct.Stdio.html#method.inherit
620+
/// [`piped`]: struct.Stdio.html#method.piped
621+
///
595622
/// # Examples
596623
///
597624
/// Basic usage:

0 commit comments

Comments
 (0)