summaryrefslogtreecommitdiff
path: root/src/core/unit.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/unit.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/unit.c')
-rw-r--r--src/core/unit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index f553f24829..a5872ef30a 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -132,6 +132,9 @@ static void unit_init(Unit *u) {
cc->blockio_accounting = u->manager->default_blockio_accounting;
cc->memory_accounting = u->manager->default_memory_accounting;
cc->tasks_accounting = u->manager->default_tasks_accounting;
+
+ if (u->type != UNIT_SLICE)
+ cc->tasks_max = u->manager->default_tasks_max;
}
ec = unit_get_exec_context(u);