From: Arun Prakash Jana Date: Sun, 10 May 2020 17:20:29 +0000 (+0530) Subject: Do not leak wfd X-Git-Tag: v3.2~31 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=5f3faf613a920f5a084425affd5449773ac26479;p=nnn.git Do not leak wfd --- diff --git a/src/nnn.c b/src/nnn.c index aedc79b4..3e5c532b 100644 --- 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);