Change:
Piped child process I/O streams are implicitly closed on-drop (via impls on the OS file descriptor wrappers), but this is not documented anywhere, giving the impression that there's no safe way to close these streams. This is causing some confusion in the wild (), so we should note this behavior in the docs for .
Opened a PR for this:

Discussion:
pub struct Child { handle: imp::Process, <del> /// The handle for writing to the child's stdin, if it has been captured </del> <ins> /// The handle for writing to the child's standard input (stdin), if it has /// been captured. </ins> #[stable(feature = "process", since = "1.0.0")] pub stdin: Option<ChildStdin>, <del> /// The handle for reading from the child's stdout, if it has been captured </del> <ins> /// The handle for reading from the child's standard output (stdout), if it /// has been captured. </ins> #[stable(feature = "process", since = "1.0.0")] pub stdout: Option<ChildStdout>, <del> /// The handle for reading from the child's stderr, if it has been captured </del> <ins> /// The handle for reading from the child's standard error (stderr), if it /// has been captured. </ins> #[stable(feature = "process", since = "1.0.0")] pub stderr: Option<ChildStderr>, }

} } <del> /// A handle to a child process's stdin. </del> <ins> /// A handle to a child process's standard input (stdin). </ins> /// /// This struct is used in the [`stdin`] field on [`Child`]. /// <ins> /// When an instance of `ChildStdin` is [dropped], the `ChildStdin`'s underlying /// file handle will be closed. If the child process was blocked on input prior /// to being dropped, it will become unblocked after dropping. /// </ins> /// [`Child`]: struct.Child.html /// [`stdin`]: struct.Child.html#structfield.stdin <ins> /// [dropped]: ../ops/trait.Drop.html </ins> #[stable(feature = "process", since = "1.0.0")] pub struct ChildStdin { inner: AnonPipe

} } <del> /// A handle to a child process's stdout. </del> <ins> /// A handle to a child process's standard output (stdout). </ins> /// /// This struct is used in the [`stdout`] field on [`Child`]. /// <ins> /// When an instance of `ChildStdout` is [dropped], the `ChildStdout`'s /// underlying file handle will be closed. /// </ins> /// [`Child`]: struct.Child.html /// [`stdout`]: struct.Child.html#structfield.stdout <ins> /// [dropped]: ../ops/trait.Drop.html </ins> #[stable(feature = "process", since = "1.0.0")] pub struct ChildStdout { inner: AnonPipe

/// /// This struct is used in the [`stderr`] field on [`Child`]. /// <ins> /// When an instance of `ChildStderr` is [dropped], the `ChildStderr`'s /// underlying file handle will be closed. /// </ins> /// [`Child`]: struct.Child.html /// [`stderr`]: struct.Child.html#structfield.stderr <ins> /// [dropped]: ../ops/trait.Drop.html </ins> #[stable(feature = "process", since = "1.0.0")] pub struct ChildStderr { inner: AnonPipe

self } <del> /// Configuration for the child process's stdin handle (file descriptor 0). </del> <ins> /// Configuration for the child process's standard input (stdin) handle. </ins> /// /// # Examples ///

self } <del> /// Configuration for the child process's stdout handle (file descriptor 1). </del> <ins> /// Configuration for the child process's standard output (stdout) handle. </ins> /// /// # Examples ///

self } <del> /// Configuration for the child process's stderr handle (file descriptor 2). </del> <ins> /// Configuration for the child process's standard error (stderr) handle. </ins> /// /// # Examples ///