use new exitLikeProcess() interface
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sat, 8 May 2004 01:33:51 +0000 (01:33 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sat, 8 May 2004 01:33:51 +0000 (01:33 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1551 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/src/context-sync.hc
util-vserver/src/vnamespace.c

index ed050a0..a0a442d 100644 (file)
@@ -83,7 +83,7 @@ waitOnSync(pid_t pid, int p[2][2], bool is_prevent_race)
   
   Eclose(p[1][1]);
   l = Eread(p[1][0], &c, 1);
-  if (l!=1) exitLikeProcess(pid);
+  if (l!=1) exitLikeProcess(pid,0);
   l = Eread(p[1][0], &c, 1);
-  if (l!=0) exitLikeProcess(pid);
+  if (l!=0) exitLikeProcess(pid,0);
 }
index c78ce1d..b57c03c 100644 (file)
@@ -92,7 +92,7 @@ showVersion()
 }
 
 static void
-newNamespace()
+newNamespace(char const *cmd)
 {
   pid_t                pid;
 #ifdef NDEBUG    
@@ -108,7 +108,7 @@ newNamespace()
     case 0     :
       break;
     default    :
-      exitLikeProcess(pid);
+      exitLikeProcess(pid, cmd);
   }
 }
 
@@ -182,7 +182,7 @@ int main(int argc, char *argv[])
   else if (optind==argc && (do_new || do_enter))
     WRITE_MSG(2, "No command specified; try '--help' for more information\n");
   else {
-    if      (do_new)     newNamespace();
+    if      (do_new)     newNamespace(argv[optind]);
     else if (do_set)     setNamespace();
     else if (do_cleanup) cleanupNamespace();
     else if (do_enter)   enterNamespace(xid);