From: Lennart Poettering Date: Mon, 4 Sep 2017 16:19:07 +0000 (+0200) Subject: manager: initialize timeouts when allocating a naked Manager object X-Git-Tag: v235~60^2~37 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd389aa73473ee1a72a28d4612ac0e5a190cfea6;p=thirdparty%2Fsystemd.git manager: initialize timeouts when allocating a naked Manager object This way we can safely run manager objects from tests and good timeouts apply. Without this all timeouts are set 0, which means they fire instantly, when run from tests which do not explicitly configure them (the way main.c does). --- diff --git a/src/core/manager.c b/src/core/manager.c index 46036aa50c7..032e75d7985 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -616,6 +616,9 @@ int manager_new(UnitFileScope scope, unsigned test_run_flags, Manager **_m) { m->default_timer_accuracy_usec = USEC_PER_MINUTE; m->default_tasks_accounting = true; m->default_tasks_max = UINT64_MAX; + m->default_timeout_start_usec = DEFAULT_TIMEOUT_USEC; + m->default_timeout_stop_usec = DEFAULT_TIMEOUT_USEC; + m->default_restart_usec = DEFAULT_RESTART_USEC; #ifdef ENABLE_EFI if (MANAGER_IS_SYSTEM(m) && detect_container() <= 0)