@cryptotaxi247 / netdata-1 / commits / 95e1c75d3

remove the bad file descriptor error when a child is killed

Costa Tsaousis (ktsaou) committed Dec 27, 2017 at 06:17 UTC 95e1c75d3159f2cc66c5781bf100db6c7708b240
1 file changed +2
src/popen.c
+2
@@ -126,6 +126,8 @@ int mypclose(FILE *fp, pid_t pid) {
126 // close the pipe file pointer
127 fclose(fp);
128
129 + errno = 0;
130 +
131 siginfo_t info;
132 if(waitid(P_PID, (id_t) pid, &info, WEXITED) != -1) {
133 switch(info.si_code) {