Do not leak wfd

This commit is contained in:
Arun Prakash Jana 2020-05-10 22:50:29 +05:30
parent 861d44f934
commit 5f3faf613a
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -4305,7 +4305,7 @@ static bool run_selected_plugin(char **path, const char *file, char *runfile, ch
exitcurses(); exitcurses();
if (fork() == 0) { // In child if (fork() == 0) { // In child
int wfd = open(g_pipepath, O_WRONLY); int wfd = open(g_pipepath, O_WRONLY | O_CLOEXEC);
if (wfd == -1) if (wfd == -1)
_exit(EXIT_FAILURE); _exit(EXIT_FAILURE);