On exit only one emergency message should be printed. If para_audiod
receives a signal which causes it to exit, we currently print two
messages. This downgrades the loglevel of the first message to NOTICE,
and moves the emergency message to the bottom of clean_exit().
case SIGINT:
case SIGTERM:
case SIGHUP:
- PARA_EMERG_LOG("terminating on signal %d\n", signum);
+ PARA_NOTICE_LOG("received signal %d\n", signum);
clean_exit(EXIT_FAILURE, "caught deadly signal");
}
return 0;
{
int i;
- PARA_EMERG_LOG("%s\n", msg);
if (socket_name)
unlink(socket_name);
close_stat_pipe();
close_slot(i);
audiod_cmdline_parser_free(&conf);
close_stat_clients();
+ PARA_EMERG_LOG("%s\n", msg);
exit(status);
}