dummyssh: make sure we don't inherit files descriptor to the children stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 28 Jul 2021 14:55:06 +0200
branchstable
changeset 47774 fb8389f227a0
parent 47773 a8deb9dc39da
child 47775 c405c089611a
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
tests/dummyssh
--- a/tests/dummyssh	Thu Jul 29 02:20:26 2021 +0200
+++ b/tests/dummyssh	Wed Jul 28 14:55:06 2021 +0200
@@ -31,5 +31,5 @@
     hgcmd = shlex.join(cmds)
     # shlex generate windows incompatible string...
     hgcmd = hgcmd.replace("'", '"')
-r = subprocess.call(hgcmd, shell=True)
+r = subprocess.call(hgcmd, shell=True, close_fds=True)
 sys.exit(bool(r))