Archived
1
0
Fork 0

lockfile: release locks on exit

This commit is contained in:
Henrik Hautakoski 2011-07-26 13:47:53 +02:00
parent 31293d7253
commit b02ff8863e
2 changed files with 54 additions and 1 deletions

View file

@ -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);