]> arthur.barton.de Git - netdata.git/commitdiff
fix exit procedure on alpine
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Tue, 27 Sep 2016 19:18:02 +0000 (22:18 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Tue, 27 Sep 2016 19:18:02 +0000 (22:18 +0300)
src/popen.c

index 193efc0f36b27e42f70ed7026845312cba5c8fbb..6bae57c5e9115597bacb0dca02efdd00db1213ba 100644 (file)
@@ -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 the childs do not exit
+    close(fileno(fp));
+
+    // close the pipe file pointer
     fclose(fp);
 
     siginfo_t info;