From: Miroslav Lichvar Date: Fri, 4 Sep 2015 10:19:44 +0000 (+0200) Subject: main: install signal handler sooner X-Git-Tag: 2.2-pre1~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea2858b323ed73b0cc41ba49a96844f28dcb61b5;p=thirdparty%2Fchrony.git main: install signal handler sooner --- diff --git a/main.c b/main.c index e9b729f1..17cdf70a 100644 --- a/main.c +++ b/main.c @@ -517,6 +517,8 @@ int main /* From now on, it is safe to do finalisation on exit */ initialised = 1; + UTI_SetQuitSignalsHandler(signal_cleanup); + CAM_OpenUnixSocket(); if (ref_mode == REF_ModeNormal && CNF_GetInitSources() > 0) { @@ -532,8 +534,6 @@ int main post_init_rtc_hook(NULL); } - UTI_SetQuitSignalsHandler(signal_cleanup); - /* The program normally runs under control of the main loop in the scheduler. */ SCH_MainLoop();