Skip to content

internal/poll: fcntl() should loop on EINTR #41115

Closed
@networkimprov

Description

@networkimprov

The internal/poll.fcntl sites need an EINTR loop. The docs list EINTR for some features, and darwin F_FULLFSYNC hits the disk.
https://man7.org/linux/man-pages/man2/fcntl.2.html

https://github.com/golang/go/blob/master/src/internal/poll/fcntl_libc.go
https://github.com/golang/go/blob/master/src/internal/poll/fcntl_syscall.go
https://github.com/golang/go/blob/master/src/internal/poll/fd_fsync_darwin.go
possibly others...

It might be worth a comment on poll.CloseFunc, to note that errors don't mean failure, so retry is incorrect:
https://man7.org/linux/man-pages/man2/close.2.html

Also, seems like a backport fix...

@gopherbot add NeedsFix
cc @ianlancetaylor

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions