use $(LIBENSCVECTOR) instead of libensc_vector.a
[util-vserver.git] / util-vserver / src / vnamespace.c
index b57c03c..628dbe2 100644 (file)
@@ -21,7 +21,7 @@
 #endif
 
 #include "util.h"
-#include "sys_clone.h"
+#include <lib_internal/sys_clone.h>
 
 #include <vserver.h>
 
 #define ENSC_WRAPPERS_VSERVER  1
 #include <wrappers.h>
 
-#ifndef CLONE_NEWNS
-#  define CLONE_NEWNS 0x00020000
-#endif
-
 #define CMD_HELP               0x1000
 #define CMD_VERSION            0x1001
 
@@ -95,6 +91,9 @@ static void
 newNamespace(char const *cmd)
 {
   pid_t                pid;
+
+  signal(SIGCHLD, SIG_DFL);
+  
 #ifdef NDEBUG    
   pid = sys_clone(CLONE_NEWNS|CLONE_VFORK|SIGCHLD, 0);
 #else
@@ -108,7 +107,7 @@ newNamespace(char const *cmd)
     case 0     :
       break;
     default    :
-      exitLikeProcess(pid, cmd);
+      exitLikeProcess(pid, cmd, wrapper_exit_code);
   }
 }