Skip to content

Should std::os::pipe() be unsafe? #19384

Description

@steveklabnik

The docs say:

This function is also unsafe as there is no destructor associated with the Pipe structure will return. If it is not arranged for the returned file descriptors to be closed, the file descriptors will leak.

However, resource leaks are explicitly behavior not considered unsafe.

Is this just a strange wording in pipe's docs, or is this overly unsafe?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions