]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
fix clone_children path
authorDaniel Lezcano <daniel.lezcano@free.fr>
Thu, 13 Jan 2011 22:45:22 +0000 (23:45 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Thu, 13 Jan 2011 22:45:22 +0000 (23:45 +0100)
This line is at the wrong place ...

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/cgroup.c

index f89749926e29b3c504260256c5fb04b6afcab7f9..69761b4d6bbdd32fb2a48367771a914d6e4929f8 100644 (file)
@@ -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");