summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-04-06 16:17:58 +0200
committerPaweł Redman <pawel.redman@gmail.com>2017-04-06 16:17:58 +0200
commit965868783e21e37f2eef83ec0c1bd02c3e49fcb3 (patch)
treee507efda6167242b679bfe00681c6ce46b8f40f6 /src/main.c
parentfda6ed17779a168f6b538aaf930ee672ecc9a691 (diff)
Implement on-the-fly reloading of lists.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index e5d5d6a..c10ec68 100644
--- a/src/main.c
+++ b/src/main.c
@@ -148,7 +148,13 @@ int handle_signals(void)
if (signals_reload) {
signals_reload = false;
- DEBUG("reload the lists (not yet implemented)\n");
+ eprintf("reloading the lists...\n");
+
+ // Don't initiate an exit if the lists failed to reload.
+ // It's better to continue operating with empty lists instead
+ // having to be restarted (with an empty revDNS/WHOIS cache).
+ if (lists_reload("schachts.list"))
+ eprintf("error: couldn't reload the lists\n");
}
return 0;