py3: fix hanging read of SSH subprocesses

Summary:
Previously, reading from SSH subprocesses did’t return on Python 3.  bufsize=0
is default on Python 2, but not Python 3.

This is a backport of: 0fc8020ebe

Reviewed By: krallin

Differential Revision: D24652418

fbshipit-source-id: 1140c76b6f711bfe1726108bd4fe6948e6ee41a0
This commit is contained in:
Mateusz Kwapich 2020-10-30 13:09:24 -07:00 committed by Facebook GitHub Bot
parent 1aeb62309f
commit 1021cd1238

View File

@ -30,6 +30,7 @@ def generate_ssh_vendor(ui):
ui.debug("calling ssh: %s\n" % cmd)
proc = subprocess.Popen(
util.quotecommand(cmd),
bufsize=0,
shell=True,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,