Skip to content

Missing EINTR handling on macOS for opendir/readdir/closedir syscalls #47584

@Therzok

Description

@Therzok

Description

It seems that under certain conditions, the opendir, readdir, closedir can set errno to EINTR.

These 3 syscalls are the only ones I can see not handling EINTR:

DIR* SystemNative_OpenDir(const char* path)

Note: it is not documented in the man pages, but it seems to be a problem in practice.

Configuration

Mono 2020-02, macOS, x64. Not specific to this.

Regression?

Only started happening with macOS Big Sur.

Other information

See this gist for an exception being bubbled on mono which is using the same source as dotnet/runtime.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions