Skip to content

Document Drop behavior of ChildStd[in, out, err] #41452

Closed
@abonander

Description

@abonander

Piped child process I/O streams are implicitly closed on-drop (via Drop 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 (https://www.reddit.com/r/rust/comments/65txlh/_/dgi86yp), so we should note this behavior in the docs for ChildStd[in, out, err].

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.P-mediumMedium priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions