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:
commit
9081e5abab
@ -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)
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user