]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - gui.c
gui: Shut down curses before rereading the config file.
[paraslash.git] / gui.c
diff --git a/gui.c b/gui.c
index 0f0a4a94d435b6ca836d99b95cb76a74ecbfc6f8..716e299b5c02402097cd7dcdfe7907965f8fd551 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -560,7 +560,6 @@ static void setup_signal_handling(void)
        para_install_sighandler(SIGCHLD);
        para_install_sighandler(SIGWINCH);
        para_install_sighandler(SIGUSR1);
-       para_sigaction(SIGHUP, SIG_IGN);
 }
 
 /* kill every process in the process group and exit */
@@ -1363,7 +1362,13 @@ static void com_reread_conf(void)
        }
        PARA_INFO_LOG("rereading command line options and config file");
        gui_cmdline_parser_ext(_argc, _argv, &conf, &params);
+       /*
+        * Despite .print_errors is set to 0, gengetopt will print to stderr
+        * anyway, and exit on errors. So we have to shutdown curses first.
+        */
+       shutdown_curses();
        gui_cmdline_parser_config_file(cf, &conf, &params);
+       init_curses();
        PARA_NOTICE_LOG("config file reloaded");
        if (check_key_map_args() < 0)
                finish(EXIT_FAILURE);