From e4c7b5f5173d92cfc5378c75fa3ab7ef0252f32b Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Tue, 26 Jan 2021 20:23:12 +0100 Subject: core: split system/user job timeouts and make them configurable Config options are -Ddefault-timeout-sec= and -Ddefault-user-timeout-sec=. Existing -Dupdate-helper-user-timeout= is renamed to -Dupdate-helper-user-timeout-sec= for consistency. All three options take an integer value in seconds. The renaming and type-change of the option is a small compat break, but it's just at compile time and result in a clear error message. I also doubt that anyone was actually using the option. This commit separates the user manager timeouts, but keeps them unchanged at 90 s. The timeout for the user manager is set to 4/3*user-timeout, which means that it is still 120 s. Fedora wants to experiment with lower timeouts, but doing this via a patch would be annoying and more work than necessary. Let's make this easy to configure. --- meson_options.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'meson_options.txt') diff --git a/meson_options.txt b/meson_options.txt index 8ce245dbb9..17c88e23a1 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -187,6 +187,10 @@ option('dbussystemservicedir', type : 'string', description : 'D-Bus system service directory') option('dbus-interfaces-dir', type : 'string', description : 'export D-Bus introspection XML as standalone files') +option('default-timeout-sec', type : 'integer', value : 90, + description : 'default timeout for system unit start/stop') +option('default-user-timeout-sec', type : 'integer', value : 90, + description : 'default timeout for user unit start/stop') option('pkgconfigdatadir', type : 'string', value : '', description : 'directory for arch-independent pkg-config files') option('pkgconfiglibdir', type : 'string', value : '', @@ -195,8 +199,8 @@ option('xinitrcdir', type : 'string', value : '', description : 'directory for xinitrc files') option('rpmmacrosdir', type : 'string', value : 'lib/rpm/macros.d', description : 'directory for rpm macros ["no" disables]') -option('update-helper-user-timeout', type : 'string', value : '15s', - description : 'how long to wait for user manager operations') +option('update-helper-user-timeout-sec', type : 'integer', value : 15, + description : 'timeout for user manager package operations') option('pamlibdir', type : 'string', description : 'directory for PAM modules') option('pamconfdir', type : 'string', -- cgit v1.2.3