]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Client: Simplify signal handling.
authorAndre Noll <maan@systemlinux.org>
Mon, 9 Apr 2012 19:07:23 +0000 (21:07 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 21 Apr 2012 17:37:01 +0000 (19:37 +0200)
There is no point in having a sighandler which just calls another one.
This patch makes i9e_signal_dispatch() the handler for SIGINT and
removes the pointless wrapper.

client.c

index 0ae015139fc915d5446cbb58b6eacf78d2d9eb2a..5f511708506a464e1a0e06f679eaa856ac015164 100644 (file)
--- a/client.c
+++ b/client.c
@@ -459,11 +459,6 @@ static int client_i9e_line_handler(char *line)
        return 1;
 }
 
-static void client_sighandler(int s)
-{
-       i9e_signal_dispatch(s);
-}
-
 static struct i9e_completer completers[] = {
        SERVER_COMPLETERS
        AFS_COMPLETERS
@@ -494,7 +489,7 @@ __noreturn static void interactive_session(void)
        }
        ici.history_file = history_file;
 
-       act.sa_handler = client_sighandler;
+       act.sa_handler = i9e_signal_dispatch;
        sigemptyset(&act.sa_mask);
        act.sa_flags = 0;
        sigaction(SIGINT, &act, NULL);