Mercurial > hg
changeset 25245:504ef9c49f4a
util: allow to specify buffer size in popen4
We will need unbuffered IO to restore real time output with ssh peer.
Changeset ec171737aaf1 seems to indicate playing with this value could be
dangerous, but does not indicate why.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 20 May 2015 11:29:45 -0500 |
parents | cf90764f40a4 |
children | f2b98dacb37d |
files | mercurial/util.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py Mon May 18 23:19:11 2015 -0500 +++ b/mercurial/util.py Wed May 20 11:29:45 2015 -0500 @@ -247,8 +247,8 @@ stdin, stdout, stderr, p = popen4(cmd, env, newlines) return stdin, stdout, stderr -def popen4(cmd, env=None, newlines=False): - p = subprocess.Popen(cmd, shell=True, bufsize=-1, +def popen4(cmd, env=None, newlines=False, bufsize=-1): + p = subprocess.Popen(cmd, shell=True, bufsize=bufsize, close_fds=closefds, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,