core: subscribe to /etc/localtime timezone changes and update timer elapsation accordingly

Fixes: #8233

This is our first real-life usecase for the new sd_event_add_inotify()
calls we just added.
This commit is contained in:
Lennart Poettering
2018-06-06 10:53:56 +02:00
parent 7feedd18fa
commit bbf5fd8e41
4 changed files with 126 additions and 0 deletions
+6
View File
@@ -170,6 +170,8 @@ struct Manager {
int time_change_fd;
sd_event_source *time_change_event_source;
sd_event_source *timezone_change_event_source;
sd_event_source *jobs_in_progress_event_source;
int user_lookup_fds[2];
@@ -250,6 +252,10 @@ struct Manager {
unsigned gc_marker;
/* The stat() data the last time we saw /etc/localtime */
usec_t etc_localtime_mtime;
bool etc_localtime_accessible:1;
/* Flags */
ManagerExitCode exit_code:5;