/*
- * Copyright (C) 1998-2013 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1998-2014 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
static int curses_active;
static pid_t cmd_pid;
-static int command_fds[2];
+static int command_fds[2] = {-1, -1};
static int stat_pipe = -1;
static struct gui_args_info conf;
void (*handler)(void);
};
-struct stat_item {
- char name[MAXLINE];
- char prefix[MAXLINE];
- char postfix[MAXLINE];
- unsigned y;
- unsigned x;
- unsigned len;
- int fg, bg;
- int align;
- char content[MAXLINE];
-};
-
static struct gui_theme theme;
static int _argc;
xvasprintf(&msg, fmt, ap);
va_end(ap);
wmove(in.win, 0, 0);
- align_str(in.win, msg, sb.cols, LEFT);
+ align_str(in.win, msg, in.cols, LEFT);
free(msg);
wrefresh(in.win);
}
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 */
close(command_fds[i]);
command_fds[i] = -1;
flags[i] = 0;
+ cbo[i] = 0;
if (command_fds[!i] < 0) /* both fds closed */
return 0;
}
}
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);