From: Max Kellermann Date: Sun, 19 Mar 2017 10:28:39 +0000 (+0100) Subject: main: merge catch_sigcont() and catch_sigwinch() X-Git-Tag: v0.26~30 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=44a10bb39a31cdf7338cc02727acf503b9adf6f6;p=ncmpc.git main: merge catch_sigcont() and catch_sigwinch() --- diff --git a/src/main.c b/src/main.c index bc16eac..953f715 100644 --- a/src/main.c +++ b/src/main.c @@ -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);