Skip to content

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

Closed
@steveklabnik

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?

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