diff options
author | June McEnroe <programble@gmail.com> | 2018-02-28 19:26:43 -0500 |
---|---|---|
committer | June McEnroe <programble@gmail.com> | 2018-02-28 19:26:43 -0500 |
commit | a000fbbbd44013a8da52811e407bf80da4595f58 (patch) | |
tree | 4042ceef50fecf238ff2a1f3de212ed6d10f0750 | |
parent | Clean up pngo (diff) | |
download | src-a000fbbbd44013a8da52811e407bf80da4595f58.tar.gz src-a000fbbbd44013a8da52811e407bf80da4595f58.zip |
Open watch files O_CLOEXEC
Thankfully kqueue is CLOEXEC by default it seems.
-rw-r--r-- | bin/watch.c | 2 |
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 = { |