From: NRK Date: Tue, 15 Feb 2022 13:02:21 +0000 (+0600) Subject: don't leak inotify_fd to plugins X-Git-Tag: v4.5~26^2 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=799b8fd3782e55149bcfa9ec1c6d1002a7eb11da;p=nnn.git don't leak inotify_fd to plugins Closes: https://github.com/jarun/nnn/issues/1291 Co-authored-by: Daniel Eklöf --- diff --git a/src/nnn.c b/src/nnn.c index 4977ff08..6dc3bdf7 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -8632,7 +8632,7 @@ int main(int argc, char *argv[]) #ifdef LINUX_INOTIFY /* Initialize inotify */ - inotify_fd = inotify_init1(IN_NONBLOCK); + inotify_fd = inotify_init1(IN_NONBLOCK | IN_CLOEXEC); if (inotify_fd < 0) { xerror(); return EXIT_FAILURE;