From bea355dac94e82697aa98e25d80ee4248263bf92 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 19 May 2015 16:00:24 +0200 Subject: 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 --- src/core/unit.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/unit.h') 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; -- cgit v1.2.3-54-g00ecf