1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00

Merge pull request #2907 from evverx/runtime-watchdog-infinity

core: RuntimeWatchdogSec=infinity disables the watchdog logic
This commit is contained in:
Daniel Mack 2016-03-29 10:35:52 +02:00
commit 9081e5abab
2 changed files with 3 additions and 3 deletions

View File

@ -1664,7 +1664,7 @@ int main(int argc, char *argv[]) {
test_usr(); 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); watchdog_set_timeout(&arg_runtime_watchdog);
if (arg_timer_slack_nsec != NSEC_INFINITY) if (arg_timer_slack_nsec != NSEC_INFINITY)

View File

@ -2016,7 +2016,7 @@ int manager_loop(Manager *m) {
while (m->exit_code == MANAGER_OK) { while (m->exit_code == MANAGER_OK) {
usec_t wait_usec; 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(); watchdog_ping();
if (!ratelimit_test(&rl)) { if (!ratelimit_test(&rl)) {
@ -2041,7 +2041,7 @@ int manager_loop(Manager *m) {
continue; continue;
/* Sleep for half the watchdog time */ /* 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; wait_usec = m->runtime_watchdog / 2;
if (wait_usec <= 0) if (wait_usec <= 0)
wait_usec = 1; wait_usec = 1;