summary refs log tree commit diff
path: root/bin/watch.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/watch.c')
-rw-r--r--bin/watch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/watch.c b/bin/watch.c
index 5b13b7e3..ed499652 100644
--- a/bin/watch.c
+++ b/bin/watch.c
@@ -25,7 +25,7 @@
 #include <unistd.h>
 
 static void watch(int kq, char *path) {
-    int fd = open(path, O_RDONLY);
+    int fd = open(path, O_CLOEXEC);
     if (fd < 0) err(EX_NOINPUT, "%s", path);
 
     struct kevent event = {