fix copy&paste error when giving out initpid
[util-vserver.git] / util-vserver / src / rpm-fake.c
index 5728535..85347c5 100644 (file)
 
 #include "pathconfig.h"
 #include "util.h"
+#include "sys_clone.h"
 
 #include <vserver.h>
 
+#include <sys/socket.h>
 #include <dlfcn.h>
 #include <stdlib.h>
 #include <stdint.h>
@@ -42,7 +44,6 @@
 #include <signal.h>
 #include <sys/types.h>
 #include <sys/wait.h>
-#include <sys/socket.h>
 #include <sys/un.h>
 #include <fcntl.h>
 #include <pwd.h>
@@ -523,7 +524,11 @@ removeNamespaceMounts(char const *path, char * const argv[])
       // make wait4() working...
     signal(SIGCHLD, SIG_DFL);
 
-    pid = syscall(__NR_clone, CLONE_NEWNS|SIGCHLD|CLONE_VFORK, 0);
+#ifdef NDEBUG
+    pid = sys_clone(CLONE_NEWNS|SIGCHLD|CLONE_VFORK, 0);
+#else
+    pid = sys_clone(CLONE_NEWNS|SIGCHLD, 0);
+#endif
 
     switch (pid) {
       case -1  :  return -1;