X-Git-Url: https://uglyman.kremlin.cc/gitweb/gitweb.cgi?p=systembsd.git;a=blobdiff_plain;f=src%2Finterfaces%2Ftimedated%2Ftimedated.c;h=32f040a2f775dd1f25048f78c7676eff030c12e4;hp=265a33f020c041c595186496474fb350f7dd9680;hb=2ef2cfe10db118edc44aaea13d4af130aef77083;hpb=712eb32987872a6515e956246c0695fda032eb98 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);