diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-04-13 14:55:26 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-04-13 14:55:26 -0400 |
commit | 55b123b5ede22f5c401d2992ae933a2f935dac6c (patch) | |
tree | 443348271a9d51bf02569ae61fb8d0fd48c27a9d /src/linux/flock.c | |
parent | fix bug whereby getopt_long allowed mismatch in last char of option name (diff) | |
download | grovel-55b123b5ede22f5c401d2992ae933a2f935dac6c.tar.gz grovel-55b123b5ede22f5c401d2992ae933a2f935dac6c.tar.xz |
add syscall wrapper for flock
it should be noted that flock does not mix well with standard fcntl
locking, but nonetheless some applications will attempt to use flock
instead of fcntl if both exist. options to configure or small patches
may be needed. debian maintainers have plenty of experience with this
unfortunate situation...
Diffstat (limited to 'src/linux/flock.c')
-rw-r--r-- | src/linux/flock.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/linux/flock.c b/src/linux/flock.c new file mode 100644 index 00000000..87aa5cfe --- /dev/null +++ b/src/linux/flock.c @@ -0,0 +1,7 @@ +#include <sys/file.h> +#include "syscall.h" + +int flock(int fd, int op) +{ + return syscall(SYS_flock, fd, op); +} |