aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@free.fr>2011-01-13 23:45:22 +0100
committerDaniel Lezcano <dlezcano@fr.ibm.com>2011-01-13 23:45:22 +0100
commite46595367719fc0a5a2e4c87f434cde9b00b46e5 (patch)
treebeb49b7b1161af36ecf70fae4b153be01b0836c2
parentadd missing template in Makefile (diff)
downloadlxc-e46595367719fc0a5a2e4c87f434cde9b00b46e5.tar.gz
lxc-e46595367719fc0a5a2e4c87f434cde9b00b46e5.tar.bz2
lxc-e46595367719fc0a5a2e4c87f434cde9b00b46e5.zip
fix clone_children path
This line is at the wrong place ... Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
-rw-r--r--src/lxc/cgroup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c
index f897499..69761b4 100644
--- a/src/lxc/cgroup.c
+++ b/src/lxc/cgroup.c
@@ -235,6 +235,8 @@ int lxc_cgroup_create(const char *name, pid_t pid)
return cgroup_rename_nsgroup(cgmnt, cgname, pid);
}
+ snprintf(clonechild, MAXPATHLEN, "%s/cgroup.clone_children", cgmnt);
+
/* we check if the kernel has clone_children, at this point if there
* no clone_children neither ns_cgroup, that means the cgroup is mounted
* without the ns_cgroup and it has not the compatibility flag
@@ -244,8 +246,6 @@ int lxc_cgroup_create(const char *name, pid_t pid)
return -1;
}
- snprintf(clonechild, MAXPATHLEN, "%s/cgroup.clone_children", cgmnt);
-
/* we enable the clone_children flag of the cgroup */
if (cgroup_enable_clone_children(clonechild)) {
SYSERROR("failed to enable 'clone_children flag");