X-Git-Url: https://uglyman.kremlin.cc/gitweb/gitweb.cgi?a=blobdiff_plain;f=src%2Finterfaces%2Ftimedated%2Ftimedated.c;h=32f040a2f775dd1f25048f78c7676eff030c12e4;hb=34d88d96dc0e87a773bee8ea959d43074195af68;hp=265a33f020c041c595186496474fb350f7dd9680;hpb=a6e4b32c811a567443234a11ffdb99ec517060be;p=systembsd.git diff --git a/src/interfaces/timedated/timedated.c b/src/interfaces/timedated/timedated.c index 265a33f..32f040a 100644 --- a/src/interfaces/timedated/timedated.c +++ b/src/interfaces/timedated/timedated.c @@ -142,6 +142,14 @@ gboolean unix_sig_terminate_handler(gpointer data) { return G_SOURCE_REMOVE; } +void set_signal_handlers() { + + /* we don't care about its descriptor, we never need to unregister these */ + g_unix_signal_add(SIGINT, unix_sig_terminate_handler, NULL); + g_unix_signal_add(SIGHUP, unix_sig_terminate_handler, NULL); + g_unix_signal_add(SIGTERM, unix_sig_terminate_handler, NULL); +} + int main() { timedated_loop = g_main_loop_new(NULL, TRUE);