summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
18d37eb)
There are two ways to make para_gui reload its config file: Sending
SIGUSR1 and running the internal reread_conf command. When SIGUSR1
is received, signal_post_select() calls com_reread_conf(). This is
a layer violation since command handlers should only be called from
the input task.
This patch provides the generic function reread_conf() which is called
from both the command handler and from signal_post_select().
+/* reread configuration, terminate on errors */
+static void reread_conf(void)
+{
+ /*
+ * gengetopt might print to stderr and exit on errors. So we have to
+ * shutdown curses first.
+ */
+ shutdown_curses();
+ parse_config_file_or_die(true /* override */);
+ init_curses();
+ print_in_bar(COLOR_MSG, "config file reloaded\n");
+}
+
/*
* React to various signal-related events
*/
/*
* React to various signal-related events
*/
return;
case SIGUSR1:
PARA_NOTICE_LOG("got SIGUSR1, rereading configuration\n");
return;
case SIGUSR1:
PARA_NOTICE_LOG("got SIGUSR1, rereading configuration\n");
return;
case SIGCHLD:
check_sigchld();
return;
case SIGCHLD:
check_sigchld();
print_in_bar(COLOR_MSG, "loglevel set to %d\n", loglevel);
}
print_in_bar(COLOR_MSG, "loglevel set to %d\n", loglevel);
}
-/*
- * reread configuration, terminate on errors
- */
static void com_reread_conf(void)
{
static void com_reread_conf(void)
{
- /*
- * gengetopt might print to stderr and exit on errors. So we have to
- * shutdown curses first.
- */
- shutdown_curses();
- parse_config_file_or_die(true /* override */);
- init_curses();
- print_in_bar(COLOR_MSG, "config file reloaded\n");
}
static void com_help(void)
}
static void com_help(void)