summaryrefslogtreecommitdiff
path: root/src/core/socket.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-06-17 21:33:26 +0200
committerLennart Poettering <lennart@poettering.net>2013-06-17 21:36:51 +0200
commita016b9228f338cb9b380ce7e00826ef462767d98 (patch)
tree515b85e7fb384bc186374067554baf233897a9d3 /src/core/socket.c
parentc647f10918940b5d11870df6d008c6c3180bdc41 (diff)
core: add new .slice unit type for partitioning systems
In order to prepare for the kernel cgroup rework, let's introduce a new unit type to systemd, the "slice". Slices can be arranged in a tree and are useful to partition resources freely and hierarchally by the user. Each service unit can now be assigned to one of these slices, and later on login users and machines may too. Slices translate pretty directly to the cgroup hierarchy, and the various objects can be assigned to any of the slices in the tree.
Diffstat (limited to 'src/core/socket.c')
-rw-r--r--src/core/socket.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index 37ca228e6b..2b3b6813ca 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -395,7 +395,12 @@ static int socket_load(Unit *u) {
if ((r = unit_add_exec_dependencies(u, &s->exec_context)) < 0)
return r;
- if ((r = unit_add_default_cgroups(u)) < 0)
+ r = unit_add_default_slice(u);
+ if (r < 0)
+ return r;
+
+ r = unit_add_default_cgroups(u);
+ if (r < 0)
return r;
if (UNIT(s)->default_dependencies)