commit cb410e25d8c5bf67bb4f7592e36f0c0475535c76
parent 30bd6a4e334743042914a140a392628bc8906218
Author: Arun <engineerarun@gmail.com>
Date: Tue, 15 Feb 2022 19:48:53 +0530
Merge pull request #1307 from N-R-K/fd_leak
don't leak inotify_fd to plugins
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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;