diff options
Diffstat (limited to 'main/logger.c')
-rw-r--r-- | main/logger.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/main/logger.c b/main/logger.c index c764a52d4..2d81b1604 100644 --- a/main/logger.c +++ b/main/logger.c @@ -827,13 +827,16 @@ static struct ast_cli_entry cli_logger[] = { AST_CLI_DEFINE(handle_logger_set_level, "Enables/Disables a specific logging level for this console") }; -static int handle_SIGXFSZ(int sig) +static void _handle_SIGXFSZ(int sig) { /* Indicate need to reload */ filesize_reload_needed = 1; - return 0; } +static struct sigaction handle_SIGXFSZ = { + .sa_handler = _handle_SIGXFSZ, +}; + static void ast_log_vsyslog(int level, const char *file, int line, const char *function, char *str, long pid) { char buf[BUFSIZ]; @@ -1007,7 +1010,7 @@ int init_logger(void) int res = 0; /* auto rotate if sig SIGXFSZ comes a-knockin */ - (void) signal(SIGXFSZ, (void *) handle_SIGXFSZ); + sigaction(SIGXFSZ, &handle_SIGXFSZ, NULL); /* start logger thread */ ast_cond_init(&logcond, NULL); |