vendor: update all dependencies
This commit is contained in:
parent
b221d79273
commit
d61ba7ef78
281 changed files with 25277 additions and 12559 deletions
40
vendor/github.com/sevlyar/go-daemon/lock_file_solaris.go
generated
vendored
Normal file
40
vendor/github.com/sevlyar/go-daemon/lock_file_solaris.go
generated
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
// +build solaris
|
||||
|
||||
package daemon
|
||||
|
||||
import (
|
||||
"io"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func lockFile(fd uintptr) error {
|
||||
lockInfo := syscall.Flock_t{
|
||||
Type: syscall.F_WRLCK,
|
||||
Whence: io.SeekStart,
|
||||
Start: 0,
|
||||
Len: 0,
|
||||
}
|
||||
if err := syscall.FcntlFlock(fd, syscall.F_SETLK, &lockInfo); err != nil {
|
||||
if err == syscall.EAGAIN {
|
||||
err = ErrWouldBlock
|
||||
}
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func unlockFile(fd uintptr) error {
|
||||
lockInfo := syscall.Flock_t{
|
||||
Type: syscall.F_UNLCK,
|
||||
Whence: io.SeekStart,
|
||||
Start: 0,
|
||||
Len: 0,
|
||||
}
|
||||
if err := syscall.FcntlFlock(fd, syscall.F_GETLK, &lockInfo); err != nil {
|
||||
if err == syscall.EAGAIN {
|
||||
err = ErrWouldBlock
|
||||
}
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue