[Devel] [PATCH 1/3] libvzctl-4.14: clone CT in new cgroup namespace

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Wed Jan 10 19:15:25 MSK 2018


We are going to use it along with all the other namespaces.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 lib/env_nsops.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/env_nsops.c b/lib/env_nsops.c
index 13e65b0..0771eb2 100644
--- a/lib/env_nsops.c
+++ b/lib/env_nsops.c
@@ -807,8 +807,10 @@ static int do_env_create(struct vzctl_env_handle *h, struct start_param *param)
 		}
 		param->init_p = init_p;
 
+#define CLONE_NEWCGROUP         0x02000000      /* New cgroup namespace */
+
 		clone_flags |= CLONE_NEWUTS|CLONE_NEWPID|CLONE_NEWIPC|
-			CLONE_NEWNET|CLONE_NEWNS|CLONE_NEWUSER;
+			CLONE_NEWNET|CLONE_NEWNS|CLONE_NEWUSER|CLONE_NEWCGROUP;
 		pid = clone(real_ns_env_create,
 				child_stack + sizeof(child_stack),
 				clone_flags|SIGCHLD , (void *) param);



More information about the Devel mailing list