diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-10-24 19:04:41 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-10-26 13:00:04 +0200 |
commit | aa8c4bbf6a9d20576bd65f6b27b769c08be33e73 (patch) | |
tree | 0ea12310a188d4da9f40cca5f55d6705a85651aa /src/core/service.h | |
parent | service: continue to use the overriden timeout when forking off again (diff) | |
download | systemd-aa8c4bbf6a9d20576bd65f6b27b769c08be33e73.tar.xz systemd-aa8c4bbf6a9d20576bd65f6b27b769c08be33e73.zip |
service: when starting a service make a copy of the watchdog timeout and use that
When we start a service process we pass the selected watchdog timeout to
it with the $WATCHDOG_USEC environment variable. If the unit file is
reconfigured later, we need to make sure to continue to honour the
original timeout, i.e. watch $WATCHDOG_USEC was set to, otherwise we'll
expect the ping at a different time as the service process is sending it
to us.
Hence, whenever we start a unit, save the watchdog timeout, and stick to
that for everything we do.
Fixes: #9467
Diffstat (limited to 'src/core/service.h')
-rw-r--r-- | src/core/service.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/service.h b/src/core/service.h index 1206e3cdda..9c4340c70e 100644 --- a/src/core/service.h +++ b/src/core/service.h @@ -99,8 +99,9 @@ struct Service { usec_t runtime_max_usec; dual_timestamp watchdog_timestamp; - usec_t watchdog_usec; - usec_t watchdog_override_usec; + usec_t watchdog_usec; /* the requested watchdog timeout in the unit file */ + usec_t watchdog_original_usec; /* the watchdog timeout that was in effect when the unit was started, i.e. the timeout the forked off processes currently see */ + usec_t watchdog_override_usec; /* the watchdog timeout requested by the service itself through sd_notify() */ bool watchdog_override_enable; sd_event_source *watchdog_event_source; |