mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
common: New function dotlock_is_locked.
* common/dotlock.c (dotlock_is_locked): New. (dotlock_take): Set locked flag also in disabled mode. No more warning if the lock has already been taken. (dotlock_release): Clear locked flag also in disabled mode. No more warning if the lock has not been taken. -- This allow to use dotlock_take and dotlock_release even if they have already been called. Before this changes this worked too but a diagnostic was printed.
This commit is contained in:
parent
677245ba0e
commit
67b82a9c60
2 changed files with 19 additions and 4 deletions
|
@ -102,6 +102,7 @@ dotlock_t dotlock_create (const char *file_to_lock, unsigned int flags);
|
|||
void dotlock_set_fd (dotlock_t h, int fd);
|
||||
int dotlock_get_fd (dotlock_t h);
|
||||
void dotlock_destroy (dotlock_t h);
|
||||
int dotlock_is_locked (dotlock_t h);
|
||||
int dotlock_take (dotlock_t h, long timeout);
|
||||
int dotlock_release (dotlock_t h);
|
||||
void dotlock_remove_lockfiles (void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue