1
0
mirror of https://github.com/netdata/netdata.git synced 2021-06-06 23:03:21 +03:00

Remove error message on netdata restart (#8685)

When issuing a SIGTERM with `systemctl restart netdata.service` an ERROR message is created in the log for every plugin:
> netdata ERROR : PLUGINSD[apps] : child pid 23901 killed by signal 15.
> netdata ERROR : PLUGINSD[python.d] : child pid 23908 killed by signal 15.
> netdata ERROR : PLUGINSD[nfacct] : child pid 23909 killed by signal 15.
> netdata ERROR : PLUGINSD[go.d] : child pid 23899 killed by signal 15.

Seems like it would be worth silencing this to an INFO message if we did a proper restart or shutdown.
Also, I wasn't sure what the proper return code should be so I put it in as `return(0);`
This commit is contained in:
Steve8291
2021-04-15 11:13:50 -04:00
committed by GitHub
parent 18a5cb9e7c
commit 307dc627d8

View File

@@ -296,8 +296,14 @@ int custom_pclose(FILE *fp, pid_t pid) {
return(info.si_status);
case CLD_KILLED:
error("child pid %d killed by signal %d.", info.si_pid, info.si_status);
return(-1);
if(info.si_status == 15) {
info("child pid %d killed by signal %d.", info.si_pid, info.si_status);
return(0);
}
else {
error("child pid %d killed by signal %d.", info.si_pid, info.si_status);
return(-1);
}
case CLD_DUMPED:
error("child pid %d core dumped by signal %d.", info.si_pid, info.si_status);