From: Costa Tsaousis Date: Sun, 31 Jul 2016 22:30:30 +0000 (+0300) Subject: do not log error when the commands executed exit with 0 X-Git-Tag: v1.3.0~38^2~1 X-Git-Url: https://arthur.barton.de/gitweb/?a=commitdiff_plain;h=439584cbf91a0de4a7ae89a72a8874cde0fe46b0;p=netdata.git do not log error when the commands executed exit with 0 --- diff --git a/src/popen.c b/src/popen.c index 483b9183..4e2874f4 100644 --- a/src/popen.c +++ b/src/popen.c @@ -153,7 +153,8 @@ int mypclose(FILE *fp, pid_t pid) { if(waitid(P_PID, (id_t) pid, &info, WEXITED) != -1) { switch(info.si_code) { case CLD_EXITED: - error("child pid %d exited with code %d.", info.si_pid, info.si_status); + if(info.si_status) + error("child pid %d exited with code %d.", info.si_pid, info.si_status); return(info.si_status); break;