mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:05:06 -05:00
sched: exit with fatal message when there is nothing to do
With cmdport 0 and port 0, it's now possible that there is no descriptor watched or timer running, i.e. chronyd doing nothing and only waiting to be terminated. Replace the assertion with LOG_FATAL to exit properly.
This commit is contained in:
4
sched.c
4
sched.c
@@ -592,7 +592,9 @@ SCH_MainLoop(void)
|
||||
|
||||
/* if there are no file descriptors being waited on and no
|
||||
timeout set, this is clearly ridiculous, so stop the run */
|
||||
assert(ptv || n_read_fds);
|
||||
if (!ptv && !n_read_fds) {
|
||||
LOG_FATAL(LOGF_Scheduler, "Nothing to do");
|
||||
}
|
||||
|
||||
/* Copy current set of read file descriptors */
|
||||
memcpy((void *) &rd, (void *) &read_fds, sizeof(fd_set));
|
||||
|
||||
Reference in New Issue
Block a user