https://github.com/cdown/mkdirmutex
A deadlock-resistant mkdir based mutex
https://github.com/cdown/mkdirmutex
Last synced: over 1 year ago
JSON representation
A deadlock-resistant mkdir based mutex
- Host: GitHub
- URL: https://github.com/cdown/mkdirmutex
- Owner: cdown
- Created: 2021-10-14T20:13:52.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-27T11:41:40.000Z (over 4 years ago)
- Last Synced: 2025-02-26T18:23:49.448Z (over 1 year ago)
- Language: Shell
- Size: 1000 Bytes
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
Since it came up a couple of times now, here's a good example of how to safely
implement a mkdir-based mutex lock in userspace without dependencies.
This is generally a lot less of a footgun than using flock(1), which has
significant problems with (for example) FD inheritance and unintuitive
deadlocks.