X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=gui.c;h=fc2cd9a145d25ac5ff0197fa132a87f5492661f7;hp=0a8f081839b97f6b0aaaac7ce3cc9e3d2bc049d1;hb=ddd7cd853044105f329a2c70cce2d8f1470f559e;hpb=85663a14da08f4f8782d29a3b0c51de5cd0817b1 diff --git a/gui.c b/gui.c index 0a8f0818..fc2cd9a1 100644 --- a/gui.c +++ b/gui.c @@ -521,13 +521,12 @@ static void setup_signal_handling(void) para_install_sighandler(SIGCHLD); para_install_sighandler(SIGWINCH); para_install_sighandler(SIGUSR1); -// signal(SIGPIPE, SIG_IGN); - signal(SIGHUP, SIG_IGN); + para_sigaction(SIGHUP, SIG_IGN); } __noreturn static void do_exit(int ret) { - signal(SIGTERM, SIG_IGN); + para_sigaction(SIGTERM, SIG_IGN); kill(0, SIGTERM); exit(ret); } @@ -896,7 +895,7 @@ static int open_audiod_pipe(void) * when any key is pressed. * * EXTERNAL_MODE: Check only signal pipe. Used when an external command - * is running. During that thime curses is disabled. Returns when + * is running. During that time curses is disabled. Returns when * cmd_pid == 0. */ static int do_select(int mode) @@ -1092,13 +1091,14 @@ static void com_page_up(void) { unsigned lines; int fvr = first_visible_rbe(&lines); + if (fvr < 0 || fvr + 1 >= ringbuffer_filled(bot_win_rb)) { print_in_bar(COLOR_ERRMSG, "top of buffer is shown\n"); return; } scroll_position = fvr + 1; for (; scroll_position > 0; scroll_position--) { - fvr = first_visible_rbe(&lines); + first_visible_rbe(&lines); if (lines == bot.lines) break; }