diff options
| author | bors <bors@rust-lang.org> | 2017-09-24 12:20:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-09-24 12:20:21 +0000 |
| commit | 647aecc281f0defdd96bc807f2b98ec3090857a2 (patch) | |
| tree | e50609667b2c3e8916dbf15f7b3a451642d98932 /src/libstd | |
| parent | 6f9078745e882b3cdedf058479d9d6d936c6750c (diff) | |
| parent | a8a0ec2a28081ed6e1e50766f8599c4c03e8c26a (diff) | |
| download | rust-647aecc281f0defdd96bc807f2b98ec3090857a2.tar.gz rust-647aecc281f0defdd96bc807f2b98ec3090857a2.zip | |
Auto merge of #44807 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 4 pull requests - Successful merges: #44103, #44625, #44789, #44795 - Failed merges:
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/process.rs | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/src/libstd/process.rs b/src/libstd/process.rs index a3a7e91dd80..1869ad3ed70 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -106,15 +106,18 @@ use sys_common::{AsInner, AsInnerMut, FromInner, IntoInner}; pub struct Child { handle: imp::Process, - /// The handle for writing to the child's stdin, if it has been captured + /// The handle for writing to the child's standard input (stdin), if it has + /// been captured. #[stable(feature = "process", since = "1.0.0")] pub stdin: Option<ChildStdin>, - /// The handle for reading from the child's stdout, if it has been captured + /// The handle for reading from the child's standard output (stdout), if it + /// has been captured. #[stable(feature = "process", since = "1.0.0")] pub stdout: Option<ChildStdout>, - /// The handle for reading from the child's stderr, if it has been captured + /// The handle for reading from the child's standard error (stderr), if it + /// has been captured. #[stable(feature = "process", since = "1.0.0")] pub stderr: Option<ChildStderr>, } @@ -149,12 +152,17 @@ impl fmt::Debug for Child { } } -/// A handle to a child process's stdin. +/// A handle to a child process's standard input (stdin). /// /// This struct is used in the [`stdin`] field on [`Child`]. /// +/// 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. +/// /// [`Child`]: struct.Child.html /// [`stdin`]: struct.Child.html#structfield.stdin +/// [dropped]: ../ops/trait.Drop.html #[stable(feature = "process", since = "1.0.0")] pub struct ChildStdin { inner: AnonPipe @@ -192,12 +200,16 @@ impl fmt::Debug for ChildStdin { } } -/// A handle to a child process's stdout. +/// A handle to a child process's standard output (stdout). /// /// This struct is used in the [`stdout`] field on [`Child`]. /// +/// When an instance of `ChildStdout` is [dropped], the `ChildStdout`'s +/// underlying file handle will be closed. +/// /// [`Child`]: struct.Child.html /// [`stdout`]: struct.Child.html#structfield.stdout +/// [dropped]: ../ops/trait.Drop.html #[stable(feature = "process", since = "1.0.0")] pub struct ChildStdout { inner: AnonPipe @@ -239,8 +251,12 @@ impl fmt::Debug for ChildStdout { /// /// This struct is used in the [`stderr`] field on [`Child`]. /// +/// When an instance of `ChildStderr` is [dropped], the `ChildStderr`'s +/// underlying file handle will be closed. +/// /// [`Child`]: struct.Child.html /// [`stderr`]: struct.Child.html#structfield.stderr +/// [dropped]: ../ops/trait.Drop.html #[stable(feature = "process", since = "1.0.0")] pub struct ChildStderr { inner: AnonPipe @@ -534,7 +550,7 @@ impl Command { self } - /// Configuration for the child process's stdin handle (file descriptor 0). + /// Configuration for the child process's standard input (stdin) handle. /// /// # Examples /// @@ -554,7 +570,7 @@ impl Command { self } - /// Configuration for the child process's stdout handle (file descriptor 1). + /// Configuration for the child process's standard output (stdout) handle. /// /// # Examples /// @@ -574,7 +590,7 @@ impl Command { self } - /// Configuration for the child process's stderr handle (file descriptor 2). + /// Configuration for the child process's standard error (stderr) handle. /// /// # Examples /// |
