don't leak inotify_fd to plugins

Closes: https://github.com/jarun/nnn/issues/1291

Co-authored-by: Daniel Eklöf <daniel@ekloef.se>
This commit is contained in:
NRK 2022-02-15 19:02:21 +06:00
parent 30bd6a4e33
commit 799b8fd378
1 changed files with 1 additions and 1 deletions

View File

@ -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;