Skip to content

proposal: os: add ErrOutOfFileDescriptors #60281

Description

@mateusz834

Currently there is no easy cross-platform way to detect the out of file descriptors error.

I propose adding a new error to the os package (os.ErrOutOfFileDescriptors) and adding support for it in syscall.Errno via the Is method (as already done with other errors like NoSuchFIle). So matching syscall.EMFILE, syscall.ENFILE on unix, syscall.EMFILE on other platforms.

I am still unsure about the name os.ErrOutOfFileDescriptors or os.ErrTooManyOpenFiles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Incoming

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions