Use subprocClone instead of syscall(__NR_clone)
authorRobert Swiecki <robert@swiecki.net>
Tue, 18 Oct 2016 07:47:15 +0000 (09:47 +0200)
committerRobert Swiecki <robert@swiecki.net>
Tue, 18 Oct 2016 07:47:15 +0000 (09:47 +0200)
mount.c

diff --git a/mount.c b/mount.c
index d4ec4d1e18cc61c762cd17c6002cc2a2e2aa72b4..1442a460f6e535651e2b701093f22468a13061cd 100644 (file)
--- a/mount.c
+++ b/mount.c
@@ -37,6 +37,7 @@
 #include <unistd.h>
 
 #include "log.h"
+#include "subproc.h"
 #include "util.h"
 
 static bool mountIsDir(const char *path)
@@ -256,8 +257,7 @@ bool mountInitNs(struct nsjconf_t * nsjconf)
                return mountInitNsInternal(nsjconf);
        }
 
-       pid_t pid =
-           syscall(__NR_clone, (uintptr_t) CLONE_FS | SIGCHLD, NULL, NULL, NULL, (uintptr_t) 0);
+       pid_t pid = subprocClone(CLONE_FS | SIGCHLD);
        if (pid == -1) {
                return false;
        }