]> git.lizzy.rs Git - rust.git/commitdiff
Indicate how ChildStd{in,out,err} FDs are closed.
authorCorey Farwell <coreyf@rwell.org>
Sat, 16 Sep 2017 02:57:12 +0000 (22:57 -0400)
committerCorey Farwell <coreyf@rwell.org>
Sat, 16 Sep 2017 03:22:25 +0000 (23:22 -0400)
Fixes https://github.com/rust-lang/rust/issues/41452.

src/libstd/process.rs

index a3a7e91dd807d61c9fe43528e9a951981232d877..4dba9a4cb1123a6703a9df359220dddf085dafa2 100644 (file)
@@ -153,8 +153,12 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 ///
 /// 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 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 ///
 /// 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 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 ///
 /// 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