sources: remove dump files on start

When chronyd is starting, after the point where dump files are loaded,
remove all files in the dump directory that match the naming scheme used
for dump files. This prevents loading stale dump files that were not
saved in the latest run of chronyd.
This commit is contained in:
Miroslav Lichvar
2016-09-07 10:26:42 +02:00
parent fb5d4f1da4
commit a06a5f1baa
3 changed files with 41 additions and 1 deletions

View File

@@ -157,8 +157,8 @@ extern double SRC_MinRoundTripDelay(SRC_Instance inst);
extern int SRC_IsGoodSample(SRC_Instance inst, double offset, double delay, double max_delay_dev_ratio, double clock_error, struct timespec *when);
extern void SRC_DumpSources(void);
extern void SRC_ReloadSources(void);
extern void SRC_RemoveDumpFiles(void);
extern int SRC_IsSyncPeer(SRC_Instance inst);
extern int SRC_IsReachable(SRC_Instance inst);