From: Michael Olbrich Date: Wed, 23 Jan 2013 13:12:15 +0000 (+0100) Subject: service: really stop watchdog timer when stopping X-Git-Tag: v198~421 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=6d594baa3fa3a361efc2a4c1da3557fc4eba960d service: really stop watchdog timer when stopping For services without ExecStop= the state SERVICE_STOP is never entered. as a result the watchdog timer is not stopped and the service is restarted (if it is configuered to restart). Stopping the watchdog timer for SERVICE_STOP_SIGTERM as well fixes this. --- diff --git a/src/core/service.c b/src/core/service.c index ee5a1a41e..593946e51 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -1550,7 +1550,7 @@ static void service_set_state(Service *s, ServiceState state) { service_connection_unref(s); } - if (state == SERVICE_STOP) + if (state == SERVICE_STOP || state == SERVICE_STOP_SIGTERM) service_stop_watchdog(s); /* For the inactive states unit_notify() will trim the cgroup,