3 ms·
You can use `ln` atomicity for a simple, portable(ish) locking system: https://gist.github.com/pwillis-els/b01b22f1b967a228c31db3cf2789ee13 https://gist.github.
by 0xbadcafebee 9mo ago
You can use `ln` atomicity for a simple, portable(ish) locking system: https://gist.github.com/pwillis-els/b01b22f1b967a228c31db3cf2789ee13 https://gist.github.com/pwillis-els/b01b22f1b967a228c31db3cf...
- akoboldfrying 9mo agoReally nice explanation of a useful pattern. I was surprised to discover that even the famously broken NFS honours atomicity of hardlink creation.
- michaelcampbell 9mo agoI use `mkdir` for a locking mechanism quite frequently. It also provides me an area to put stuff during the script runs.