summaryrefslogtreecommitdiffstats
path: root/daemon/signals.c
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/signals.c')
-rw-r--r--daemon/signals.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/daemon/signals.c b/daemon/signals.c
index ae28874cc..4f2254334 100644
--- a/daemon/signals.c
+++ b/daemon/signals.c
@@ -42,7 +42,7 @@ static void signal_handler(int signo) {
if(signals_waiting[i].action == NETDATA_SIGNAL_FATAL) {
char buffer[200 + 1];
- snprintfz(buffer, 200, "\nSIGNAL HANDLER: received: %s. Oops! This is bad!\n", signals_waiting[i].name);
+ snprintfz(buffer, sizeof(buffer) - 1, "\nSIGNAL HANDLER: received: %s. Oops! This is bad!\n", signals_waiting[i].name);
if(write(STDERR_FILENO, buffer, strlen(buffer)) == -1) {
// nothing to do - we cannot write but there is no way to complain about it
;
@@ -203,28 +203,28 @@ void signals_handle(void) {
switch (signals_waiting[i].action) {
case NETDATA_SIGNAL_RELOAD_HEALTH:
- error_log_limit_unlimited();
+ nd_log_limits_unlimited();
netdata_log_info("SIGNAL: Received %s. Reloading HEALTH configuration...", name);
- error_log_limit_reset();
+ nd_log_limits_reset();
execute_command(CMD_RELOAD_HEALTH, NULL, NULL);
break;
case NETDATA_SIGNAL_SAVE_DATABASE:
- error_log_limit_unlimited();
+ nd_log_limits_unlimited();
netdata_log_info("SIGNAL: Received %s. Saving databases...", name);
- error_log_limit_reset();
+ nd_log_limits_reset();
execute_command(CMD_SAVE_DATABASE, NULL, NULL);
break;
case NETDATA_SIGNAL_REOPEN_LOGS:
- error_log_limit_unlimited();
+ nd_log_limits_unlimited();
netdata_log_info("SIGNAL: Received %s. Reopening all log files...", name);
- error_log_limit_reset();
+ nd_log_limits_reset();
execute_command(CMD_REOPEN_LOGS, NULL, NULL);
break;
case NETDATA_SIGNAL_EXIT_CLEANLY:
- error_log_limit_unlimited();
+ nd_log_limits_unlimited();
netdata_log_info("SIGNAL: Received %s. Cleaning up to exit...", name);
commands_exit();
netdata_cleanup_and_exit(0);