- Create a lockname.pid file.
- Readdir, looking for lockname.* files:
- If found file pid is < our pid, and it is alive/not stale, FAIL and unlink our lockfile
- If we make it through, we have the lock, continue.
Created
August 15, 2014 22:15
-
-
Save iarna/bd63a8b6cdb0dbebbab5 to your computer and use it in GitHub Desktop.