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: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 0c2a98bd
...@@ -1284,7 +1284,7 @@ static inline int do_share_ns(void *arg) ...@@ -1284,7 +1284,7 @@ static inline int do_share_ns(void *arg)
flags = handler->on_clone_flags; flags = handler->on_clone_flags;
flags |= CLONE_PARENT; 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) if (handler->pid < 0)
return -1; return -1;
...@@ -1414,7 +1414,7 @@ static int lxc_spawn(struct lxc_handler *handler) ...@@ -1414,7 +1414,7 @@ static int lxc_spawn(struct lxc_handler *handler)
goto out_delete_net; goto out_delete_net;
} }
} else { } 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) { if (handler->pid < 0) {
SYSERROR(LXC_CLONE_ERROR); SYSERROR(LXC_CLONE_ERROR);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment