about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-09-15 22:57:12 -0400
committerCorey Farwell <coreyf@rwell.org>2017-09-15 23:22:25 -0400
commita6ef99e9f43e70c36dc9744bc87374033b2dedba (patch)
tree7cc8b1072f8c0a2532875b755d6b590f2d7df2cc /src/libstd
parentfd4bef54abafe6d93ec3c87498de696da6ef5819 (diff)
downloadrust-a6ef99e9f43e70c36dc9744bc87374033b2dedba.tar.gz
rust-a6ef99e9f43e70c36dc9744bc87374033b2dedba.zip
Indicate how ChildStd{in,out,err} FDs are closed.
Fixes https://github.com/rust-lang/rust/issues/41452.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/process.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstd/process.rs b/src/libstd/process.rs
index a3a7e91dd80..4dba9a4cb11 100644
--- a/src/libstd/process.rs
+++ b/src/libstd/process.rs
@@ -153,8 +153,12 @@ impl fmt::Debug for Child {
 ///
 /// 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.
+///
 /// [`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
@@ -196,8 +200,12 @@ impl fmt::Debug for ChildStdin {
 ///
 /// 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 +247,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