| 1 | //go:build !windows |
| 2 | |
| 3 | package taskmonitor |
| 4 | |
| 5 | import ( |
| 6 | "os" |
| 7 | |
| 8 | "golang.org/x/sys/unix" |
| 9 | ) |
| 10 | |
| 11 | func lockTaskFile(f *os.File) error { return unix.Flock(int(f.Fd()), unix.LOCK_EX) } |
| 12 | |
| 13 | func unlockTaskFile(f *os.File) error { return unix.Flock(int(f.Fd()), unix.LOCK_UN) } |
| 14 |