File tree 5 files changed +5
-6
lines changed
5 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
# Not supported by flock:
4
4
# - plan9/*
5
- # - solaris/*
6
5
# - js/wasm
7
6
# - wasp1/wasm
8
7
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
10
9
_jq () {
11
10
echo ${row} | base64 --decode | jq -r ${1}
12
11
}
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ func (f *Flock) setFh() error {
119
119
// open a new os.File instance
120
120
// create it if it doesn't exist, and open the file read-only.
121
121
flags := os .O_CREATE
122
- if runtime .GOOS == "aix" {
122
+ if runtime .GOOS == "aix" || runtime . GOOS == "solaris" || runtime . GOOS == "illumos" {
123
123
// AIX cannot preform write-lock (ie exclusive) on a
124
124
// read-only file.
125
125
flags |= os .O_RDWR
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ func (s *TestSuite) TestFlock_TryRLock() {
119
119
locked , err = flock2 .TryRLock ()
120
120
s .Require ().NoError (err )
121
121
122
- if runtime .GOOS == "aix" {
122
+ if runtime .GOOS == "aix" || runtime . GOOS == "solaris" || runtime . GOOS == "illumos" {
123
123
// When using POSIX locks, we can't safely read-lock the same
124
124
// inode through two different descriptors at the same time:
125
125
// when the first descriptor is closed, the second descriptor
Original file line number Diff line number Diff line change 3
3
// Use of this source code is governed by the BSD 3-Clause
4
4
// license that can be found in the LICENSE file.
5
5
6
- //go:build !aix && !windows
6
+ //go:build !aix && !solaris && ! windows
7
7
8
8
package flock
9
9
Original file line number Diff line number Diff line change 15
15
// This code is adapted from the Go package:
16
16
// cmd/go/internal/lockedfile/internal/filelock
17
17
18
- //go:build aix
18
+ //go:build aix || solaris
19
19
20
20
package flock
21
21
You can’t perform that action at this time.
0 commit comments