From 90beb9102790689976624e811158738b1f247d4b Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Mon, 2 Dec 2013 12:47:47 +0800 Subject: [PATCH] kqueue: open watched directories with close-on-exec flag Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72213 --- bus/dir-watch-kqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bus/dir-watch-kqueue.c b/bus/dir-watch-kqueue.c index c60560f..696b6b9 100644 --- a/bus/dir-watch-kqueue.c +++ b/bus/dir-watch-kqueue.c @@ -198,7 +198,7 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories) /* FIXME - less lame error handling for failing to add a watch; * we may need to sleep. */ - fd = open (new_dirs[i], O_RDONLY); + fd = open (new_dirs[i], O_RDONLY | O_CLOEXEC); if (fd < 0) { if (errno != ENOENT) -- 1.7.9.5