]> Sergey Matveev's repositories - nnn.git/commitdiff
Do not leak wfd
authorArun Prakash Jana <engineerarun@gmail.com>
Sun, 10 May 2020 17:20:29 +0000 (22:50 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sun, 10 May 2020 17:20:29 +0000 (22:50 +0530)
src/nnn.c

index aedc79b46d79cff72ae094ea1a66e12afab712f4..3e5c532bf4faca62bfed1cc9285ef9251a389fcc 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4305,7 +4305,7 @@ static bool run_selected_plugin(char **path, const char *file, char *runfile, ch
        exitcurses();
 
        if (fork() == 0) { // In child
-               int wfd = open(g_pipepath, O_WRONLY);
+               int wfd = open(g_pipepath, O_WRONLY | O_CLOEXEC);
 
                if (wfd == -1)
                        _exit(EXIT_FAILURE);