Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6a590271d |
@@ -23,7 +23,8 @@ var memFsLock sync.Mutex
|
||||
// LockStateDir takes the lock that a command changing anything under
|
||||
// stateDir holds until it returns, and returns the function that releases
|
||||
// it. While one command holds it, the next one waits here. Reads take no
|
||||
// lock: every change becomes visible in a single rename.
|
||||
// lock: each file or directory a command changes is replaced in a single
|
||||
// rename, so a reader finds it as it was before or after, never half-made.
|
||||
//
|
||||
// On the real filesystem the lock is flock(2) on the file "lock" in
|
||||
// stateDir, which the kernel releases when the process dies, so a killed
|
||||
|
||||
Reference in New Issue
Block a user