@cryptotaxi247 / netdata-1 / commits / 344698499

fix exit procedure on alpine

Costa Tsaousis (ktsaou) committed Sep 27, 2016 at 22:18 UTC 344698499bdc0b2674011bc4719e00dad0924de1
1 file changed +7
src/popen.c
+7
@@ -147,6 +147,13 @@ int mypclose(FILE *fp, pid_t pid) {
147 debug(D_EXIT, "Request to mypclose() on pid %d", pid);
148
149 /*mypopen_del(fp);*/
150 +
151 + // close the pipe fd
152 + // this is required in musl
153 + // without the childs do not exit
154 + close(fileno(fp));
155 +
156 + // close the pipe file pointer
157 fclose(fp);
158
159 siginfo_t info;