summaryrefslogtreecommitdiff
path: root/Utility/LockFile/PidLock.hs
Commit message (Collapse)AuthorAge
* avoid warnings about not exported System.Directory.isSymbolicLinkGravatar Joey Hess2016-04-28
|
* Fix build with directory-1.2.6.2.Gravatar Joey Hess2016-04-28
| | | | | | It started exporting a isSymbolicLink which supports windows. But, git-annex does no use symlinks on windows yet and this conflicts with the function by the same name from unix-compat, so hide it.
* comment typo fixGravatar Joey Hess2016-03-01
|
* fix build warnings under ghc 7.10Gravatar Joey Hess2015-12-19
| | | | | | Caused by AMP.. Since I've finally upgraded my dev laptop to 7.10, I may start missing imports that are not needed with it but are with older versions..
* fix warningGravatar Joey Hess2015-11-16
|
* store abspath to the lock fileGravatar Joey Hess2015-11-16
| | | | Avoids problems if the program chdirs
* clean up side lock files when we're done with themGravatar Joey Hess2015-11-16
| | | | | | | | | | | There's a potential race, but it's detected and just results in the other process failing to take the side lock, so possibly retrying one second later on. The race window is quite narrow so the extra delay is minor. Left the side lock files mode 666 because an interruption can leave a side lock file created by another user for a shared repository. When this happens, the non-owning user can't delete it (+t) but can still lock it, and so the code falls back to acting as it did before this commit.
* starting to get a handle on how to detect that mad gleam in lustre's eyeGravatar Joey Hess2015-11-13
|
* one more try to get sane behavior our of lustreGravatar Joey Hess2015-11-13
|
* fixed a fd double-closeGravatar Joey Hess2015-11-13
|
* also compare lock file contents to double-check link workedGravatar Joey Hess2015-11-13
| | | | | And it closes the tmp file before this. I don't know if this will help avoid lustre's craziness, but it can't hurt..
* use /tmp for sidelock file when no /dev/shmGravatar Joey Hess2015-11-13
|
* require the side lock be held to take pidlockGravatar Joey Hess2015-11-13
| | | | | | This is less portable, since currently sidelocks rely on /dev/shm. But, I've seen crazy lustre inconsistencies that make me not trust the link() method at all, so what can you do.
* avoid over-long filenames for side lock filesGravatar Joey Hess2015-11-13
|
* add stat checkGravatar Joey Hess2015-11-13
| | | | | | | | I have a strace taken on a lustre filesystem on which link() returned 0, but didn't actually succeed, since the file already existed. One of the linux man pages recommended using link followed by checking like this. I was reading it yesterday, but cannot find it now.
* clean up temp fileGravatar Joey Hess2015-11-13
|
* better lock dropping orderGravatar Joey Hess2015-11-13
|
* add timeout for pid lock waitingGravatar Joey Hess2015-11-12
|
* module for PidLocks in LockPoolGravatar Joey Hess2015-11-12
|
* module for pid lock files with atomic stale lock file takeover when possibleGravatar Joey Hess2015-11-12