From: Wolfgang Bumiller Date: Sat, 13 Nov 2021 17:20:13 +0000 (+0100) Subject: Revert "initutils: use vfork() in lxc_container_init()" X-Git-Tag: lxc-5.0.0~51^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4035%2Fhead;p=thirdparty%2Flxc.git Revert "initutils: use vfork() in lxc_container_init()" This reverts commit d65e5e492f740bbb50e3005f97420c3ddae3d595. With vfork the child process modifies the parent's memory, so the calls to `signal`, `fprintf` and regular `exit` may be dangerous and might cause conflicting states in the parent. Signed-off-by: Wolfgang Bumiller --- diff --git a/src/lxc/initutils.c b/src/lxc/initutils.c index 24baecc88..72278c1f1 100644 --- a/src/lxc/initutils.c +++ b/src/lxc/initutils.c @@ -551,7 +551,7 @@ __noreturn int lxc_container_init(int argc, char *const *argv, bool quiet) remove_self(); - pid = vfork(); + pid = fork(); if (pid < 0) exit(EXIT_FAILURE);