From: Evgeny Vereshchagin Date: Mon, 28 Mar 2016 17:17:32 +0000 (+0000) Subject: core: RuntimeWatchdogSec=infinity disables the watchdog logic X-Git-Tag: v230~234^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2907%2Fhead;p=thirdparty%2Fsystemd.git core: RuntimeWatchdogSec=infinity disables the watchdog logic --- diff --git a/src/core/main.c b/src/core/main.c index 78701805ea5..e4e025e34ed 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1664,7 +1664,7 @@ int main(int argc, char *argv[]) { test_usr(); } - if (arg_running_as == MANAGER_SYSTEM && arg_runtime_watchdog > 0) + if (arg_running_as == MANAGER_SYSTEM && arg_runtime_watchdog > 0 && arg_runtime_watchdog != USEC_INFINITY) watchdog_set_timeout(&arg_runtime_watchdog); if (arg_timer_slack_nsec != NSEC_INFINITY) diff --git a/src/core/manager.c b/src/core/manager.c index f13e9335789..26cb588e307 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2016,7 +2016,7 @@ int manager_loop(Manager *m) { while (m->exit_code == MANAGER_OK) { usec_t wait_usec; - if (m->runtime_watchdog > 0 && m->running_as == MANAGER_SYSTEM) + if (m->runtime_watchdog > 0 && m->runtime_watchdog != USEC_INFINITY && m->running_as == MANAGER_SYSTEM) watchdog_ping(); if (!ratelimit_test(&rl)) { @@ -2041,7 +2041,7 @@ int manager_loop(Manager *m) { continue; /* Sleep for half the watchdog time */ - if (m->runtime_watchdog > 0 && m->running_as == MANAGER_SYSTEM) { + if (m->runtime_watchdog > 0 && m->runtime_watchdog != USEC_INFINITY && m->running_as == MANAGER_SYSTEM) { wait_usec = m->runtime_watchdog / 2; if (wait_usec <= 0) wait_usec = 1;