Mercurial > hg
comparison tests/dummyssh @ 47774:fb8389f227a0 stable
dummyssh: make sure we don't inherit files descriptor to the children
This is one of the difference between python2 and python3 and could have been a
reason why test hang with python2 + chg. This does not seems to help the
hanging issue at all…
However, now that this is written lets reduce the difference between python2
and python3.
Differential Revision: https://phab.mercurial-scm.org/D11225
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 28 Jul 2021 14:55:06 +0200 |
parents | 5d9f89cd4984 |
children | 6000f5b25c9b |
comparison
equal
deleted
inserted
replaced
47773:a8deb9dc39da | 47774:fb8389f227a0 |
---|---|
29 python_exe = os.environ['PYTHON'] | 29 python_exe = os.environ['PYTHON'] |
30 cmds.insert(0, python_exe) | 30 cmds.insert(0, python_exe) |
31 hgcmd = shlex.join(cmds) | 31 hgcmd = shlex.join(cmds) |
32 # shlex generate windows incompatible string... | 32 # shlex generate windows incompatible string... |
33 hgcmd = hgcmd.replace("'", '"') | 33 hgcmd = hgcmd.replace("'", '"') |
34 r = subprocess.call(hgcmd, shell=True) | 34 r = subprocess.call(hgcmd, shell=True, close_fds=True) |
35 sys.exit(bool(r)) | 35 sys.exit(bool(r)) |