From: Christian Brauner Date: Fri, 15 Dec 2017 16:42:31 +0000 (+0100) Subject: start: use lxc_raw_clone_cb() where possible X-Git-Tag: lxc-3.0.0.beta1~94^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac2ba69621f0529b163d3a86772ace9d6601c21a;p=thirdparty%2Flxc.git start: use lxc_raw_clone_cb() where possible This way we can rely on the kernel's copy-on-write support similar to fork(). Signed-off-by: Christian Brauner --- diff --git a/src/lxc/start.c b/src/lxc/start.c index 2d3f4ed4a..5327e44b2 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1284,7 +1284,7 @@ static inline int do_share_ns(void *arg) flags = handler->on_clone_flags; flags |= CLONE_PARENT; - handler->pid = lxc_clone(do_start, handler, flags); + handler->pid = lxc_raw_clone_cb(do_start, handler, flags); if (handler->pid < 0) return -1; @@ -1414,7 +1414,7 @@ static int lxc_spawn(struct lxc_handler *handler) goto out_delete_net; } } else { - handler->pid = lxc_clone(do_start, handler, handler->on_clone_flags); + handler->pid = lxc_raw_clone_cb(do_start, handler, handler->on_clone_flags); } if (handler->pid < 0) { SYSERROR(LXC_CLONE_ERROR);