aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-05-10 22:50:29 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-05-10 22:50:29 +0530
commit5f3faf613a920f5a084425affd5449773ac26479 (patch)
tree43f8221cbaa2a85a4dc599a7eedcc2eeb22e51a6
parent861d44f9348ed694d6cf2109a007b0a09f359dd9 (diff)
downloadnnn-5f3faf613a920f5a084425affd5449773ac26479.tar.gz
Do not leak wfd
-rw-r--r--src/nnn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index aedc79b..3e5c532 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);