]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
start: use lxc_raw_clone_cb() where possible
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 15 Dec 2017 16:42:31 +0000 (17:42 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 1 Jan 2018 23:58:09 +0000 (00:58 +0100)
This way we can rely on the kernel's copy-on-write support similar to fork().

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/start.c

index 39f60cc64ee3ec6ac577b3cbfd63c80412f3e131..22412542cbab06017a0054dbc181e6c9e826e44a 100644 (file)
@@ -1380,7 +1380,7 @@ static int lxc_spawn(struct lxc_handler *handler)
                flags &= ~CLONE_NEWNET;
        }
 
-       handler->pid = lxc_clone(do_start, handler, flags);
+       handler->pid = lxc_raw_clone_cb(do_start, handler, flags);
        if (handler->pid < 0) {
                SYSERROR("Failed to clone a new set of namespaces.");
                goto out_delete_net;