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
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;
}
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);