From 0d1f4c9472f62954f296c1db5eec7e1525ec9637 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 5 Feb 2007 21:44:01 +0100 Subject: [PATCH] audiod: kill handle_signal() It was only called from singal_event_handler(), so move the code there. Also, remove the redundant check for t->ret != -E_SIGNAL_CAUGHT which can never happen. --- audiod.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/audiod.c b/audiod.c index 5aa32de5..0105fa36 100644 --- a/audiod.c +++ b/audiod.c @@ -578,18 +578,6 @@ static void check_stat_line(char *line) } } -static void handle_signal(int sig) -{ - switch (sig) { - case SIGINT: - case SIGTERM: - case SIGHUP: - PARA_EMERG_LOG("terminating on signal %d\n", sig); - clean_exit(EXIT_FAILURE, "caught deadly signal"); - return; - } -} - static void try_to_close_slot(int slot_num) { struct slot_info *s = &slot[slot_num]; @@ -915,10 +903,13 @@ static void signal_event_handler(struct task *t) { struct signal_task *st = t->private_data; - if (t->ret != -E_SIGNAL_CAUGHT) - PARA_ERROR_LOG("%s (ignored)\n", PARA_STRERROR(-t->ret)); - else - handle_signal(st->signum); + switch (st->signum) { + case SIGINT: + case SIGTERM: + case SIGHUP: + PARA_EMERG_LOG("terminating on signal %d\n", st->signum); + clean_exit(EXIT_FAILURE, "caught deadly signal"); + } } static void signal_pre_select(struct sched *s, struct task *t) -- 2.39.2