If the config file contains errors, gui_cmdline_parser_config_file()
calls exit() while curses is still active, leading to messed up
terminal settings. Fix this by calling shutdown_curses() before
parsing the config file, and init_curses() thereafter.
}
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);