From a000fbbbd44013a8da52811e407bf80da4595f58 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Wed, 28 Feb 2018 19:26:43 -0500 Subject: Open watch files O_CLOEXEC Thankfully kqueue is CLOEXEC by default it seems. --- bin/watch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 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 = { -- cgit 1.4.1