summaryrefslogtreecommitdiff
path: root/socket.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-03-31 16:29:55 +0200
committerLennart Poettering <lennart@poettering.net>2010-03-31 16:29:55 +0200
commit8e27452380193a5f81bfd08a59aab8b07008ba0b (patch)
tree7ea3398a0cff784e5c45416bec5104597aaa3625 /socket.c
parentc9dae904f3a07ae563bd58fb2b39529c1f108915 (diff)
cgroup: add cgroupsification
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/socket.c b/socket.c
index aec0d392a6..79933347d0 100644
--- a/socket.c
+++ b/socket.c
@@ -129,6 +129,10 @@ static int socket_init(Unit *u) {
if ((r = unit_add_dependency(u, UNIT_BEFORE, UNIT(s->service))) < 0)
goto fail;
+ /* Add default cgroup */
+ if ((r = unit_add_default_cgroup(u)) < 0)
+ goto fail;
+
return 0;
fail:
@@ -394,7 +398,13 @@ static int socket_spawn(Socket *s, ExecCommand *c, bool timeout, pid_t *_pid) {
} else
unit_unwatch_timer(UNIT(s), &s->timer_watch);
- if ((r = exec_spawn(c, &s->exec_context, NULL, 0, true, true, &pid)) < 0)
+ if ((r = exec_spawn(c,
+ &s->exec_context,
+ NULL, 0,
+ true,
+ true,
+ UNIT(s)->meta.cgroup_bondings,
+ &pid)) < 0)
goto fail;
if ((r = unit_watch_pid(UNIT(s), pid)) < 0)