From: Jonathan McDowell Date: Fri, 15 Sep 2023 05:28:31 +0000 (+0530) Subject: Don't catch signals if we're using the keyd backend X-Git-Tag: onak-0.6.3~14 X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=7b4a0f5405a70c7990f1022ad31fa5856ceeccff;p=onak.git Don't catch signals if we're using the keyd backend Catching signals dates from when we didn't have the keyd backend and install every process opened the DB4 files itself. This lead to major issues if the process didn't clean up correctly. If we're using keyd there's no such concern, so we can avoid catching signals and preventing things like Ctrl-C working for the CLI tool. --- diff --git a/cleanup.c b/cleanup.c index 3fe219f..95f74dd 100644 --- a/cleanup.c +++ b/cleanup.c @@ -21,6 +21,7 @@ #include "cleanup.h" #include "log.h" +#include "onak-conf.h" static bool should_cleanup = false; @@ -72,6 +73,10 @@ void sig_cleanup(int signal) */ void catchsignals(void) { + if (config.use_keyd) { + return; + } + logthing(LOGTHING_INFO, "Catching signals"); signal(SIGALRM, &sig_cleanup);