diff options
author | Oleksii Shevchuk <alxchk@gmail.com> | 2013-11-04 18:47:43 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-11-05 19:57:22 +0100 |
commit | 1f19a534ea84458670ec011f6d1ba96f76e3f783 (patch) | |
tree | 6edc40c4d9dc99f412e477d9e1af466e45cc5d93 /src/core/main.c | |
parent | 7b05894275bc1158d752098581295377f13e7c60 (diff) |
Configurable Timeouts/Restarts default values
https://bugs.freedesktop.org/show_bug.cgi?id=71132
Patch adds DefaultTimeoutStartSec, DefaultTimeoutStopSec, DefaultRestartSec
configuration options to manager configuration file.
Diffstat (limited to 'src/core/main.c')
-rw-r--r-- | src/core/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/main.c b/src/core/main.c index 5d30893bf4..b21fb493da 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -90,6 +90,9 @@ static bool arg_switched_root = false; static char ***arg_join_controllers = NULL; static ExecOutput arg_default_std_output = EXEC_OUTPUT_JOURNAL; static ExecOutput arg_default_std_error = EXEC_OUTPUT_INHERIT; +static usec_t arg_default_restart_usec = DEFAULT_RESTART_USEC; +static usec_t arg_default_timeout_start_usec = DEFAULT_TIMEOUT_USEC; +static usec_t arg_default_timeout_stop_usec = DEFAULT_TIMEOUT_USEC; static usec_t arg_runtime_watchdog = 0; static usec_t arg_shutdown_watchdog = 10 * USEC_PER_MINUTE; static char **arg_default_environment = NULL; @@ -636,6 +639,9 @@ static int parse_config_file(void) { { "Manager", "CPUAffinity", config_parse_cpu_affinity2, 0, NULL }, { "Manager", "DefaultStandardOutput", config_parse_output, 0, &arg_default_std_output }, { "Manager", "DefaultStandardError", config_parse_output, 0, &arg_default_std_error }, + { "Manager", "DefaultTimeoutStartSec", config_parse_sec, 0, &arg_default_timeout_start_usec }, + { "Manager", "DefaultTimeoutStopSec", config_parse_sec, 0, &arg_default_timeout_stop_usec }, + { "Manager", "DefaultRestartSec", config_parse_sec, 0, &arg_default_restart_usec }, { "Manager", "JoinControllers", config_parse_join_controllers, 0, &arg_join_controllers }, { "Manager", "RuntimeWatchdogSec", config_parse_sec, 0, &arg_runtime_watchdog }, { "Manager", "ShutdownWatchdogSec", config_parse_sec, 0, &arg_shutdown_watchdog }, @@ -1518,6 +1524,9 @@ int main(int argc, char *argv[]) { m->confirm_spawn = arg_confirm_spawn; m->default_std_output = arg_default_std_output; m->default_std_error = arg_default_std_error; + m->default_restart_usec = arg_default_restart_usec; + m->default_timeout_start_usec = arg_default_timeout_start_usec; + m->default_timeout_stop_usec = arg_default_timeout_stop_usec; m->runtime_watchdog = arg_runtime_watchdog; m->shutdown_watchdog = arg_shutdown_watchdog; m->userspace_timestamp = userspace_timestamp; |