Show More
@@ -38,13 +38,16 b' def _fastsha1(s):' | |||
|
38 | 38 | |
|
39 | 39 | import subprocess |
|
40 | 40 | closefds = os.name == 'posix' |
|
41 |
def popen2(cmd |
|
|
42 | p = subprocess.Popen(cmd, shell=True, bufsize=bufsize, | |
|
41 | def popen2(cmd): | |
|
42 | # Setting bufsize to -1 lets the system decide the buffer size. | |
|
43 | # The default for bufsize is 0, meaning unbuffered. This leads to | |
|
44 | # poor performance on Mac OS X: http://bugs.python.org/issue4194 | |
|
45 | p = subprocess.Popen(cmd, shell=True, bufsize=-1, | |
|
43 | 46 | close_fds=closefds, |
|
44 | 47 | stdin=subprocess.PIPE, stdout=subprocess.PIPE) |
|
45 | 48 | return p.stdin, p.stdout |
|
46 |
def popen3(cmd |
|
|
47 |
p = subprocess.Popen(cmd, shell=True, bufsize= |
|
|
49 | def popen3(cmd): | |
|
50 | p = subprocess.Popen(cmd, shell=True, bufsize=-1, | |
|
48 | 51 | close_fds=closefds, |
|
49 | 52 | stdin=subprocess.PIPE, stdout=subprocess.PIPE, |
|
50 | 53 | stderr=subprocess.PIPE) |
General Comments 0
You need to be logged in to leave comments.
Login now