20#define flinit(fp) ((struct flock_s){.path = (fp), .fd = -1, .open = 0})
int fllock(struct flock_s *fl)
Locks the file at the given path. If a file descriptor cannot be obtained, or the file cannot be lock...
Definition fl.c:25
int flunlock(struct flock_s *fl)
Unlocks the file at the given path. If the file is not open, or the file cannot be unlocked,...
Definition fl.c:32
File lock structure for managing a single file path.
Definition fl.h:8
const char * path
File path to lock.
Definition fl.h:9
int fd
File descriptor once opened.
Definition fl.h:10
_Bool open
Open status of the file.
Definition fl.h:11