Code

main: merge catch_sigcont() and catch_sigwinch()
authorMax Kellermann <max.kellermann@gmail.com>
Sun, 19 Mar 2017 10:28:39 +0000 (11:28 +0100)
committerMax Kellermann <max.kellermann@gmail.com>
Sun, 19 Mar 2017 10:28:39 +0000 (11:28 +0100)
src/main.c

index bc16eac8cc8b0a9ada881c2c7a44eb2dbd72de24..953f715afeaa81af9eba12d75f7e0af064ceaa30 100644 (file)
@@ -95,14 +95,6 @@ catch_sigint(gcc_unused int sig)
        g_main_loop_quit(main_loop);
 }
 
-
-static void
-catch_sigcont(gcc_unused int sig)
-{
-       if (1 != write(sigwinch_pipes[1], "", 1))
-               exit(EXIT_FAILURE);
-}
-
 static gboolean
 sigwinch_event(gcc_unused GIOChannel *source,
                gcc_unused GIOCondition condition, gcc_unused gpointer data)
@@ -475,7 +467,7 @@ main(int argc, const char *argv[])
 
        /* setup signal behavior - SIGCONT */
 
-       act.sa_handler = catch_sigcont;
+       act.sa_handler = catch_sigwinch;
        if (sigaction(SIGCONT, &act, NULL) < 0) {
                perror("sigaction(SIGCONT)");
                exit(EXIT_FAILURE);