core: RuntimeWatchdogSec=infinity disables the watchdog logic
This commit is contained in:
parent
09541e49eb
commit
947292eef4
|
@ -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)
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue