summaryrefslogtreecommitdiff
path: root/src/core/unit.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-05-19 16:00:24 +0200
committerLennart Poettering <lennart@poettering.net>2015-05-19 16:00:24 +0200
commitbea355dac94e82697aa98e25d80ee4248263bf92 (patch)
tree21275e16a068ef3ce4e2d6518eb9de57021c4672 /src/core/unit.h
parentf3b85044c845de03de05135c1dd5f3298bf3e5a2 (diff)
core: enforce a ratelimiter when stopping units due to StopWhenUnneeded=1
Otherwise we might end up in an endless stop loop. http://lists.freedesktop.org/archives/systemd-devel/2015-April/030224.html
Diffstat (limited to 'src/core/unit.h')
-rw-r--r--src/core/unit.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/unit.h b/src/core/unit.h
index 62257c403e..e0e76e520c 100644
--- a/src/core/unit.h
+++ b/src/core/unit.h
@@ -175,6 +175,9 @@ struct Unit {
/* Error code when we didn't manage to load the unit (negative) */
int load_error;
+ /* Make sure we never enter endless loops with the check unneeded logic */
+ RateLimit check_unneeded_ratelimit;
+
/* Cached unit file state and preset */
UnitFileState unit_file_state;
int unit_file_preset;