File tree Expand file tree Collapse file tree 5 files changed +5
-6
lines changed
Expand file tree Collapse file tree 5 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 22
33# Not supported by flock:
44# - plan9/*
5- # - solaris/*
65# - js/wasm
76# - wasp1/wasm
87
9- for row in $( go tool dist list -json | jq -r ' .[] | select( .GOOS != "plan9" and .GOOS != "solaris" and . GOARCH != "wasm") | @base64' ) ; do
8+ for row in $( go tool dist list -json | jq -r ' .[] | select( .GOOS != "plan9" and .GOARCH != "wasm") | @base64' ) ; do
109 _jq () {
1110 echo ${row} | base64 --decode | jq -r ${1}
1211 }
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ func (f *Flock) setFh() error {
119119 // open a new os.File instance
120120 // create it if it doesn't exist, and open the file read-only.
121121 flags := os .O_CREATE
122- if runtime .GOOS == "aix" {
122+ if runtime .GOOS == "aix" || runtime . GOOS == "solaris" || runtime . GOOS == "illumos" {
123123 // AIX cannot preform write-lock (ie exclusive) on a
124124 // read-only file.
125125 flags |= os .O_RDWR
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ func (s *TestSuite) TestFlock_TryRLock() {
119119 locked , err = flock2 .TryRLock ()
120120 s .Require ().NoError (err )
121121
122- if runtime .GOOS == "aix" {
122+ if runtime .GOOS == "aix" || runtime . GOOS == "solaris" || runtime . GOOS == "illumos" {
123123 // When using POSIX locks, we can't safely read-lock the same
124124 // inode through two different descriptors at the same time:
125125 // when the first descriptor is closed, the second descriptor
Original file line number Diff line number Diff line change 33// Use of this source code is governed by the BSD 3-Clause
44// license that can be found in the LICENSE file.
55
6- //go:build !aix && !windows
6+ //go:build !aix && !solaris && ! windows
77
88package flock
99
Original file line number Diff line number Diff line change 1515// This code is adapted from the Go package:
1616// cmd/go/internal/lockedfile/internal/filelock
1717
18- //go:build aix
18+ //go:build aix || solaris
1919
2020package flock
2121
You can’t perform that action at this time.
0 commit comments