-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for db locking in zsh (via flock)
This commit ensures the database is locked before reading and updating when used in zsh. We load the zsh/system module which provides the zsystem flock command to perform advisory file locking. A separate code path is needed when updating the database entry because replacing the file (via mv) would cause any process waiting for a lock to fail. Here we simply clobber the database with the contents of the tempfile.
- Loading branch information
Mathias Fredriksson
committed
Mar 1, 2017
1 parent
772db28
commit 8329844
Showing
1 changed file
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters