summaryrefslogtreecommitdiffstats
path: root/src/popen.c
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2016-11-23 15:49:14 +0000
committerFederico Ceratto <federico.ceratto@gmail.com>2016-11-23 15:49:14 +0000
commit68141d9dac0c08e51d257feef16a79086dd8a2df (patch)
treef4a0f5d31ed2194b5991130754b297b9c8c076e6 /src/popen.c
parentRelease v. 1.3.0+dfsg-1 to Unstable (diff)
parentNew upstream version 1.4.0+dfsg (diff)
downloadnetdata-68141d9dac0c08e51d257feef16a79086dd8a2df.tar.xz
netdata-68141d9dac0c08e51d257feef16a79086dd8a2df.zip
Merge tag 'upstream/1.4.0+dfsg'
Upstream version 1.4.0+dfsg
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;