+
+ struct sigaction sa_term = { .sa_handler = term_handler };
+ struct sigaction sa_hup = { .sa_handler = hup_handler };
+ if (sigaction(SIGTERM, &sa_term, NULL) < 0 ||
+ sigaction(SIGHUP, &sa_hup, NULL) < 0)
+ ASSERT(0);
+
+ while (!terminate)
+ {
+ if (!sleep(60))
+ {
+ msg(L_INFO, "Timeout elapsed, terminating in a while");
+ break;
+ }
+ }
+
+ sleep(2);