Let SIGUSR1 trigger a reload

In an effort to better integrate the import process with external
applications, it's desirable to have a mechanism by which external
programs can trigger a reload of calcurse's data.

This patch adds that functionality via SIGUSR1. The reload request is
handled in the main loop. When the user is currently entering data, the
request is delayed until the main loop is re-entered.

Signed-off-by: Tim Hentenaar <tim@hentenaar.com>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Tim Hentenaar
2014-10-10 01:55:14 +02:00
committed by Lukas Fleischer
parent 7f06c25230
commit 7f62fb185c
4 changed files with 14 additions and 0 deletions

View File

@@ -1096,6 +1096,7 @@ extern unsigned colorize;
extern int foreground, background;
extern enum ui_mode ui_mode;
extern int read_only;
extern int want_reload;
extern const char *datefmt_str[DATE_FORMATS];
extern int days[12];
extern const char *monthnames[12];