From: Daniel Lezcano Date: Thu, 13 Jan 2011 22:45:22 +0000 (+0100) Subject: fix clone_children path X-Git-Tag: lxc-0.7.4-rc1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e46595367719fc0a5a2e4c87f434cde9b00b46e5;p=thirdparty%2Flxc.git fix clone_children path This line is at the wrong place ... Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c index f89749926..69761b4d6 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");