mirror of
https://github.com/jarun/nnn.git
synced 2024-11-18 08:59:14 +00:00
Merge pull request #1307 from N-R-K/fd_leak
don't leak inotify_fd to plugins
This commit is contained in:
commit
cb410e25d8
|
@ -8632,7 +8632,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
#ifdef LINUX_INOTIFY
|
#ifdef LINUX_INOTIFY
|
||||||
/* Initialize inotify */
|
/* Initialize inotify */
|
||||||
inotify_fd = inotify_init1(IN_NONBLOCK);
|
inotify_fd = inotify_init1(IN_NONBLOCK | IN_CLOEXEC);
|
||||||
if (inotify_fd < 0) {
|
if (inotify_fd < 0) {
|
||||||
xerror();
|
xerror();
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|
Loading…
Reference in a new issue