]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - gui.c
gui: Dont catch SIGWINCH.
[paraslash.git] / gui.c
diff --git a/gui.c b/gui.c
index db291c2583bc38da0634984bf80cb7bab96658c6..57ee8be5e9e9f2867f8c85ecdcce7aca2b4656a0 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -907,13 +907,6 @@ static int signal_post_select(struct sched *s, __a_unused struct task *t)
        case SIGTERM:
                die(EXIT_FAILURE, "only the good die young (caught SIGTERM)\n");
                return 1;
-       case SIGWINCH:
-               if (curses_active()) {
-                       shutdown_curses();
-                       init_curses();
-                       redraw_bot_win();
-               }
-               return 1;
        case SIGINT:
                PARA_WARNING_LOG("caught SIGINT, reset\n");
                /* Nothing to do. SIGINT killed our child which gets noticed
@@ -1120,13 +1113,19 @@ static int input_post_select(__a_unused struct sched *s, __a_unused struct task
                        in.needs_update = sep.needs_update = false;
        }
        ret = wgetch(top.win);
-       if (ret == ERR || ret == KEY_RESIZE)
+       if (ret == ERR)
                return 0;
-       if (exs == EXEC_IDLE) {
-               handle_command(ret);
+       if (ret == KEY_RESIZE) {
+               if (curses_active()) {
+                       shutdown_curses();
+                       init_curses();
+                       redraw_bot_win();
+               }
                return 0;
        }
-       if (exec_pid != 0)
+       if (exs == EXEC_IDLE)
+               handle_command(ret);
+       else if (exec_pid > 0)
                kill(exec_pid, SIGTERM);
        return 0;
 }
@@ -1446,7 +1445,6 @@ static int setup_tasks_and_schedule(void)
        para_install_sighandler(SIGINT);
        para_install_sighandler(SIGTERM);
        para_install_sighandler(SIGCHLD);
-       para_install_sighandler(SIGWINCH);
        para_install_sighandler(SIGUSR1);
 
        register_task(&sched, &exec_task.task);