浏览代码

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...
Rich Felker 14 年之前
父节点
当前提交
55b123b5ed
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      src/linux/flock.c

+ 7 - 0
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);
+}