summaryrefslogtreecommitdiffstats
path: root/src/popen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/popen.c')
-rw-r--r--src/popen.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/popen.c b/src/popen.c
index 193efc0f3..ad8d7596f 100644
--- a/src/popen.c
+++ b/src/popen.c
@@ -147,6 +147,13 @@ int mypclose(FILE *fp, pid_t pid) {
debug(D_EXIT, "Request to mypclose() on pid %d", pid);
/*mypopen_del(fp);*/
+
+ // close the pipe fd
+ // this is required in musl
+ // without it the childs do not exit
+ close(fileno(fp));
+
+ // close the pipe file pointer
fclose(fp);
siginfo_t info;