Skip to content

Commit a6ef99e

Browse files
committed
Indicate how ChildStd{in,out,err} FDs are closed.
Fixes #41452.
1 parent fd4bef5 commit a6ef99e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/libstd/process.rs

+12
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,12 @@ impl fmt::Debug for Child {
153153
///
154154
/// This struct is used in the [`stdin`] field on [`Child`].
155155
///
156+
/// When an instance of `ChildStdin` is [dropped], the `ChildStdin`'s underlying
157+
/// file handle will be closed.
158+
///
156159
/// [`Child`]: struct.Child.html
157160
/// [`stdin`]: struct.Child.html#structfield.stdin
161+
/// [dropped]: ../ops/trait.Drop.html
158162
#[stable(feature = "process", since = "1.0.0")]
159163
pub struct ChildStdin {
160164
inner: AnonPipe
@@ -196,8 +200,12 @@ impl fmt::Debug for ChildStdin {
196200
///
197201
/// This struct is used in the [`stdout`] field on [`Child`].
198202
///
203+
/// When an instance of `ChildStdout` is [dropped], the `ChildStdout`'s
204+
/// underlying file handle will be closed.
205+
///
199206
/// [`Child`]: struct.Child.html
200207
/// [`stdout`]: struct.Child.html#structfield.stdout
208+
/// [dropped]: ../ops/trait.Drop.html
201209
#[stable(feature = "process", since = "1.0.0")]
202210
pub struct ChildStdout {
203211
inner: AnonPipe
@@ -239,8 +247,12 @@ impl fmt::Debug for ChildStdout {
239247
///
240248
/// This struct is used in the [`stderr`] field on [`Child`].
241249
///
250+
/// When an instance of `ChildStderr` is [dropped], the `ChildStderr`'s
251+
/// underlying file handle will be closed.
252+
///
242253
/// [`Child`]: struct.Child.html
243254
/// [`stderr`]: struct.Child.html#structfield.stderr
255+
/// [dropped]: ../ops/trait.Drop.html
244256
#[stable(feature = "process", since = "1.0.0")]
245257
pub struct ChildStderr {
246258
inner: AnonPipe

0 commit comments

Comments
 (0)