Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 971ee13

Browse files
committed
pass the command to sh -c
1 parent e0bfd50 commit 971ee13

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/popen2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
MAXFD = 100 # Max number of file descriptors (os.getdtablesize()???)
66

77
def popen2(cmd):
8-
cmd = string.split(cmd)
8+
cmd = ['/bin/sh', '-c', cmd]
99
p2cread, p2cwrite = os.pipe()
1010
c2pread, c2pwrite = os.pipe()
1111
pid = os.fork()

0 commit comments

Comments
 (0)