From 0c43f4b4b8e39f32e3c6eeaed944f5cd3ee0508f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Thu, 23 Apr 2009 11:24:33 +0200 Subject: [PATCH] Inotify initialization left open file descriptors which are leaking and annoying SElinux. This could be once fixed by inotify_init1, but that's supported from kernel 2.6.27. --- src/cron.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cron.c b/src/cron.c index 28aebce..5b0ce2d 100644 --- a/src/cron.c +++ b/src/cron.c @@ -241,6 +241,7 @@ main(int argc, char *argv[]) { } database.ifd = fd = inotify_init(); + fcntl(fd, F_SETFD, FD_CLOEXEC); if (fd < 0) log_it("CRON", pid, "INFO", "Inotify init failed", errno); set_cron_watched(fd); -- 2.40.0