]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
audiod: kill handle_signal()
authorAndre Noll <maan@systemlinux.org>
Mon, 5 Feb 2007 20:44:01 +0000 (21:44 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 5 Feb 2007 20:44:01 +0000 (21:44 +0100)
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

index 5aa32de5dd5798171e8e3c5f88e6e74ccc5e28c6..0105fa362fe845b6720f8ebcb8d7602f3987c0e6 100644 (file)
--- 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)