We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40f7491 commit a72e1d3Copy full SHA for a72e1d3
osfs/os_posix.go
@@ -1,4 +1,4 @@
1
-// +build !windows
+// +build !windows,!solaris
2
3
package osfs
4
osfs/os_solaris.go
@@ -0,0 +1,19 @@
+// +build solaris
+
+package osfs
5
+import "syscall"
6
7
+func (f *file) Lock() error {
8
+ f.m.Lock()
9
+ defer f.m.Unlock()
10
11
+ return syscall.Flock(int(f.File.Fd()), syscall.LOCK_EX)
12
+}
13
14
+func (f *file) Unlock() error {
15
16
17
18
+ return syscall.Flock(int(f.File.Fd()), syscall.LOCK_UN)
19
0 commit comments