From 7b4a0f5405a70c7990f1022ad31fa5856ceeccff Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Fri, 15 Sep 2023 10:58:31 +0530 Subject: [PATCH] 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. --- cleanup.c | 5 +++++ 1 file changed, 5 insertions(+) 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); -- 2.39.2