lockfile: release locks on exit
This commit is contained in:
parent
31293d7253
commit
b02ff8863e
2 changed files with 54 additions and 1 deletions
|
|
@ -24,11 +24,12 @@
|
|||
#define LOCKFILE_H
|
||||
|
||||
struct lockfile {
|
||||
struct lockfile *next;
|
||||
int fd;
|
||||
char name[4096];
|
||||
};
|
||||
|
||||
#define LOCKFILE_INIT { -1, { 0 } }
|
||||
#define LOCKFILE_INIT { 0, -1, { 0 } }
|
||||
|
||||
int hold_lock(struct lockfile *lock, const char *filename, int force);
|
||||
|
||||
|
|
|
|||
Reference in a new issue