spawnvp only takes three arguments
[util-vserver.git] / python / vserver.py
index e27f6bb..cfd347c 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 2005 Princeton University
 
-#$Id: vserver.py,v 1.65 2007/07/31 14:36:19 dhozac Exp $
+#$Id: vserver.py,v 1.67 2007/07/31 18:14:02 dhozac Exp $
 
 import errno
 import fcntl
@@ -405,11 +405,6 @@ class VServer:
                 state_file = open("/var/run/vservers/%s" % self.name, "w")
 
                 # use /dev/null for stdin, /var/log/boot.log for stdout/err
-                try:
-                    os.close(0)
-                    os.close(1)
-                except:
-                    pass
                 fd = os.open("/dev/null", os.O_RDONLY)
                 if fd != 0:
                     os.dup2(fd, 0)
@@ -436,7 +431,7 @@ class VServer:
                          cmd_args = [cmd[0]] + map(lambda x: x % arg_subst,
                                                    cmd[1:])
                          print >>log, "executing '%s'" % " ".join(cmd_args)
-                         os.spawnvp(os.P_WAIT,cmd[0],*cmd_args)
+                         os.spawnvp(os.P_WAIT,cmd[0],cmd_args)
                      except:
                          traceback.print_exc()
                          os._exit(1)