X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=gui.c;h=716e299b5c02402097cd7dcdfe7907965f8fd551;hp=baab0bd905e56fee0a7a821e0c536e15b532db5f;hb=3ad33afa3db46e394c0a5055a7f6eff7113e8df6;hpb=650e5374914c1eb725ce7d2a720611bec22112bc diff --git a/gui.c b/gui.c index baab0bd9..716e299b 100644 --- a/gui.c +++ b/gui.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1998-2013 Andre Noll + * Copyright (C) 1998-2014 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -526,7 +526,7 @@ static int add_output_line(char *line, void *data) static int loglevel; -__printf_2_3 void curses_log(int ll, const char *fmt,...) +static __printf_2_3 void curses_log(int ll, const char *fmt,...) { int color; char *msg; @@ -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, ¶ms); + /* + * 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, ¶ms); + init_curses(); PARA_NOTICE_LOG("config file reloaded"); if (check_key_map_args() < 0) finish(EXIT_FAILURE);