//go:build !windows package host import ( "os" "syscall" ) // lockFileEx takes an exclusive advisory lock on f, and unlockFile drops it. // syscall.Flock is available on both linux and darwin, which covers every // platform that runs a restart pass. func lockFileEx(f *os.File) error { return syscall.Flock(int(f.Fd()), syscall.LOCK_EX) } func unlockFile(f *os.File) { syscall.Flock(int(f.Fd()), syscall.LOCK_UN) } //nolint:errcheck