mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 02:35:06 -05:00
Don't finalise from signal handler
This commit is contained in:
3
main.c
3
main.c
@@ -123,7 +123,8 @@ static void
|
|||||||
signal_cleanup(int x)
|
signal_cleanup(int x)
|
||||||
{
|
{
|
||||||
LOG(LOGS_WARN, LOGF_Main, "chronyd exiting on signal");
|
LOG(LOGS_WARN, LOGF_Main, "chronyd exiting on signal");
|
||||||
MAI_CleanupAndExit();
|
if (!initialised) exit(0);
|
||||||
|
SCH_QuitProgram();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================================================== */
|
/* ================================================== */
|
||||||
|
|||||||
1
sched.c
1
sched.c
@@ -558,6 +558,7 @@ SCH_MainLoop(void)
|
|||||||
status = select(one_highest_fd, &rd, &wr, &ex, ptv);
|
status = select(one_highest_fd, &rd, &wr, &ex, ptv);
|
||||||
|
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
|
if (!need_to_exit)
|
||||||
CROAK("Status < 0 after select");
|
CROAK("Status < 0 after select");
|
||||||
} else if (status > 0) {
|
} else if (status > 0) {
|
||||||
/* A file descriptor is ready to read */
|
/* A file descriptor is ready to read */
|
||||||
|
|||||||
Reference in New Issue
Block a user