summaryrefslogtreecommitdiff
path: root/src/core/main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-13 17:13:55 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-13 19:50:52 +0100
commit0af20ea2ee2af2bcf2258e7a8e1a13181a6a75d6 (patch)
tree0fee32b93ed0b93271670e4d68f8c5d7177ee312 /src/core/main.c
parentecee72e1b6c3476b674b58472c483fc4aef7ceed (diff)
core: add new DefaultTasksMax= setting for system.conf
This allows initializing the TasksMax= setting of all units by default to some fixed value, instead of leaving it at infinity as before.
Diffstat (limited to 'src/core/main.c')
-rw-r--r--src/core/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 0924b51a7d..f8e1d88335 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -126,6 +126,7 @@ static bool arg_default_cpu_accounting = false;
static bool arg_default_blockio_accounting = false;
static bool arg_default_memory_accounting = false;
static bool arg_default_tasks_accounting = false;
+static uint64_t arg_default_tasks_max = (uint64_t) -1;
static void pager_open_if_enabled(void) {
@@ -677,6 +678,7 @@ static int parse_config_file(void) {
{ "Manager", "DefaultBlockIOAccounting", config_parse_bool, 0, &arg_default_blockio_accounting },
{ "Manager", "DefaultMemoryAccounting", config_parse_bool, 0, &arg_default_memory_accounting },
{ "Manager", "DefaultTasksAccounting", config_parse_bool, 0, &arg_default_tasks_accounting },
+ { "Manager", "DefaultTasksMax", config_parse_tasks_max, 0, &arg_default_tasks_max },
{}
};
@@ -712,6 +714,7 @@ static void manager_set_defaults(Manager *m) {
m->default_blockio_accounting = arg_default_blockio_accounting;
m->default_memory_accounting = arg_default_memory_accounting;
m->default_tasks_accounting = arg_default_tasks_accounting;
+ m->default_tasks_max = arg_default_tasks_max;
manager_set_default_rlimits(m, arg_default_rlimit);
manager_environment_add(m, NULL, arg_default_environment);