#include <signal.h>
#include <stdbool.h>
#include <stdlib.h>
+#include <string.h>
#include "cleanup.h"
#include "keydb.h"
*/
void trytocleanup(void)
{
- logthing(LOGTHING_NOTICE, "Setting cleanup flag.");
+ logthing(LOGTHING_INFO, "Setting cleanup flag.");
should_cleanup = true;
return;
*/
void sig_cleanup(int signal)
{
- logthing(LOGTHING_NOTICE, "Got signal %d.", signal);
+ logthing(LOGTHING_INFO, "Got signal %d.", signal);
trytocleanup();
return;
{
struct sigaction alarmh;
- logthing(LOGTHING_NOTICE, "Catching signals");
+ logthing(LOGTHING_INFO, "Catching signals");
memset(&alarmh, 0, sizeof(alarmh));
alarmh.sa_handler = sig_cleanup;