summaryrefslogtreecommitdiff
path: root/src/execute.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-08-20 00:20:41 +0200
committerLennart Poettering <lennart@poettering.net>2011-08-20 00:22:02 +0200
commitab1f063390f55e14a8de87f21c4fad199eb908a6 (patch)
treef99b7dd16628be2c3ebbee678820de0a268392dc /src/execute.c
parent5ed27dbdbfe866810a52ff8225bcf61590861823 (diff)
exec: optionally apply cgroup attributes to the cgroups we create
Diffstat (limited to 'src/execute.c')
-rw-r--r--src/execute.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/execute.c b/src/execute.c
index c73b0c6c04..1ab3218517 100644
--- a/src/execute.c
+++ b/src/execute.c
@@ -930,6 +930,7 @@ int exec_spawn(ExecCommand *command,
bool apply_tty_stdin,
bool confirm_spawn,
CGroupBonding *cgroup_bondings,
+ CGroupAttribute *cgroup_attributes,
pid_t *ret) {
pid_t pid;
@@ -973,9 +974,11 @@ int exec_spawn(ExecCommand *command,
log_debug("About to execute: %s", line);
free(line);
- if (cgroup_bondings)
- if ((r = cgroup_bonding_realize_list(cgroup_bondings)))
- goto fail_parent;
+ r = cgroup_bonding_realize_list(cgroup_bondings);
+ if (r < 0)
+ goto fail_parent;
+
+ cgroup_attribute_apply_list(cgroup_attributes, cgroup_bondings);
if ((pid = fork()) < 0) {
r = -errno;