]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Revert "initutils: use vfork() in lxc_container_init()" 4035/head
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Sat, 13 Nov 2021 17:20:13 +0000 (18:20 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Sat, 13 Nov 2021 18:44:48 +0000 (19:44 +0100)
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 <w.bumiller@proxmox.com>
src/lxc/initutils.c

index 24baecc883df0d6936a7bd25bab5e6502195950c..72278c1f1de4c234f00974d23f5934653283196d 100644 (file)
@@ -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);