pass the command to sh -c

This commit is contained in:
Guido van Rossum 1995-08-07 20:17:23 +00:00
parent e0bfd50d76
commit 971ee13835
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import string
MAXFD = 100 # Max number of file descriptors (os.getdtablesize()???)
def popen2(cmd):
cmd = string.split(cmd)
cmd = ['/bin/sh', '-c', cmd]
p2cread, p2cwrite = os.pipe()
c2pread, c2pwrite = os.pipe()
pid = os.fork()