mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 06:15:07 -05:00
main: install signal handler sooner
This commit is contained in:
4
main.c
4
main.c
@@ -517,6 +517,8 @@ int main
|
|||||||
/* From now on, it is safe to do finalisation on exit */
|
/* From now on, it is safe to do finalisation on exit */
|
||||||
initialised = 1;
|
initialised = 1;
|
||||||
|
|
||||||
|
UTI_SetQuitSignalsHandler(signal_cleanup);
|
||||||
|
|
||||||
CAM_OpenUnixSocket();
|
CAM_OpenUnixSocket();
|
||||||
|
|
||||||
if (ref_mode == REF_ModeNormal && CNF_GetInitSources() > 0) {
|
if (ref_mode == REF_ModeNormal && CNF_GetInitSources() > 0) {
|
||||||
@@ -532,8 +534,6 @@ int main
|
|||||||
post_init_rtc_hook(NULL);
|
post_init_rtc_hook(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
UTI_SetQuitSignalsHandler(signal_cleanup);
|
|
||||||
|
|
||||||
/* The program normally runs under control of the main loop in
|
/* The program normally runs under control of the main loop in
|
||||||
the scheduler. */
|
the scheduler. */
|
||||||
SCH_MainLoop();
|
SCH_MainLoop();
|
||||||
|
|||||||
Reference in New Issue
Block a user