Init cgroups with -Me
authorJagger <robert@swiecki.net>
Sun, 19 Jun 2016 17:36:56 +0000 (19:36 +0200)
committerJagger <robert@swiecki.net>
Sun, 19 Jun 2016 17:36:56 +0000 (19:36 +0200)
subproc.c

index 05db4330f0bda4e4b30d988e3ed6aa84a75fe069..7f298db0ff35ac263f37466c758def4ba5adaf0d 100644 (file)
--- a/subproc.c
+++ b/subproc.c
@@ -61,6 +61,10 @@ static int subprocNewProc(struct nsjconf_t *nsjconf, int fd_in, int fd_out, int
                        LOG_E("Couldn't initialize net user namespace");
                        exit(1);
                }
+               if (cgroupInitNsFromParent(nsjconf, syscall(__NR_getpid)) == false) {
+                       LOG_E("Couldn't initialize net user namespace");
+                       exit(1);
+               }
        } else {
                char doneChar;
                if (utilReadFromFd(pipefd, &doneChar, sizeof(doneChar)) != sizeof(doneChar)) {