]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: RuntimeWatchdogSec=infinity disables the watchdog logic 2907/head
authorEvgeny Vereshchagin <evvers@ya.ru>
Mon, 28 Mar 2016 17:17:32 +0000 (17:17 +0000)
committerEvgeny Vereshchagin <evvers@ya.ru>
Mon, 28 Mar 2016 17:17:32 +0000 (17:17 +0000)
src/core/main.c
src/core/manager.c

index 78701805ea5b09e04e0d33bdaa841645ff247ad9..e4e025e34edbc1fc70b0c8422a83f721e68b1205 100644 (file)
@@ -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)
index f13e9335789601ea6074365608d29095a874b017..26cb588e3072c26f488b11672515789de8014010 100644 (file)
@@ -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;