Skip to content

syscall: add Flock implementation for Illumos #35618

Closed
@bcmills

Description

@bcmills

On most Unix and Unix-like platforms, the Go syscall package provides the Flock function (and the associated constants LOCK_EX, LOCK_SH, LOCK_UN).

That functionality is not provided for Solaris, because (as far as I am aware) Oracle Solaris still does not provide the corresponding system call (see also #24684). However, it appears that the Illumos kernel has supported flock since 2015 (https://www.illumos.org/issues/3252).

We should update the syscall package to provide Flock on illumos. Then we can switch cmd/go/internal/lockedfile/internal/filelock over to use it, and hopefully avoid apparent kernel bugs that affect the current Fcntl implementation used on AIX and Solaris (#32817).

CC @jclulow @gdamore @tklauser

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions