pid: Don't start new ns-init id CLONE_NEWPID is not requested
authorRobert Swiecki <robert@swiecki.net>
Tue, 24 Oct 2017 23:34:10 +0000 (01:34 +0200)
committerRobert Swiecki <robert@swiecki.net>
Tue, 24 Oct 2017 23:34:10 +0000 (01:34 +0200)
pid.c

diff --git a/pid.c b/pid.c
index abca61c..1da2485 100644 (file)
--- a/pid.c
+++ b/pid.c
@@ -36,6 +36,9 @@ bool pidInitNs(struct nsjconf_t* nsjconf)
        if (nsjconf->mode != MODE_STANDALONE_EXECVE) {
                return true;
        }
+       if (!nsjconf->clone_newpid) {
+               return true;
+       }
 
        LOG_D("Creating a dummy 'init' process");