From e46595367719fc0a5a2e4c87f434cde9b00b46e5 Mon Sep 17 00:00:00 2001 From: Daniel Lezcano Date: Thu, 13 Jan 2011 23:45:22 +0100 Subject: [PATCH] fix clone_children path This line is at the wrong place ... Signed-off-by: Daniel Lezcano --- src/lxc/cgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"); -- 2.47.2