From: Andre Noll Date: Sun, 7 Jul 2013 12:06:01 +0000 (+0200) Subject: audiod: Reorder exit log messages a bit. X-Git-Tag: v0.5.1~11^2~3 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=fe7442f069ba33983395ed35af643571a11d9614;ds=sidebyside audiod: Reorder exit log messages a bit. 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(). --- diff --git a/audiod.c b/audiod.c index 6afb15ef..91f6e1e6 100644 --- a/audiod.c +++ b/audiod.c @@ -1007,7 +1007,7 @@ static int signal_post_select(struct sched *s, __a_unused struct task *t) 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; @@ -1136,7 +1136,6 @@ void __noreturn clean_exit(int status, const char *msg) { int i; - PARA_EMERG_LOG("%s\n", msg); if (socket_name) unlink(socket_name); close_stat_pipe(); @@ -1144,6 +1143,7 @@ void __noreturn clean_exit(int status, const char *msg) close_slot(i); audiod_cmdline_parser_free(&conf); close_stat_clients(); + PARA_EMERG_LOG("%s\n", msg); exit(status); }