do not use CLONE_VFORK in debug mode; lockups with 'strace' are too annoying
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 16 Jan 2004 18:03:50 +0000 (18:03 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 16 Jan 2004 18:03:50 +0000 (18:03 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@613 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/src/new-namespace.c
util-vserver/src/rpm-fake.c

index c7460bf..6277134 100644 (file)
@@ -91,7 +91,11 @@ int main(int argc, char *argv[])
   if (!strcmp(argv[1], "--version")) showVersion();
   if (!strcmp(argv[1], "--"))        ++argv;
 
+#ifdef NDEBUG    
   pid = Eclone(childFunc, STACK_START(buf), CLONE_NEWNS|CLONE_VFORK|SIGCHLD, argv+1);
+#else
+  pid = Eclone(childFunc, STACK_START(buf), CLONE_NEWNS|SIGCHLD, argv+1);
+#endif
   p   = Ewait4(pid, &status, 0,0);
 
   if (WIFEXITED(status)) return WEXITSTATUS(status);
index 5728535..fb96fdf 100644 (file)
@@ -523,7 +523,11 @@ removeNamespaceMounts(char const *path, char * const argv[])
       // make wait4() working...
     signal(SIGCHLD, SIG_DFL);
 
+#ifdef NDEBUG    
     pid = syscall(__NR_clone, CLONE_NEWNS|SIGCHLD|CLONE_VFORK, 0);
+#else
+    pid = syscall(__NR_clone, CLONE_NEWNS|SIGCHLD, 0);
+#endif
 
     switch (pid) {
       case -1  :  return -1;