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.
#include "cleanup.h"
#include "log.h"
+#include "onak-conf.h"
static bool should_cleanup = false;
*/
void catchsignals(void)
{
+ if (config.use_keyd) {
+ return;
+ }
+
logthing(LOGTHING_INFO, "Catching signals");
signal(SIGALRM, &sig_cleanup);