Patchwork D11225: dummyssh: make sure we don't inherit files descriptor to the children

login
register
mail settings
Submitter phabricator
Date July 28, 2021, 2:58 p.m.
Message ID <differential-rev-PHID-DREV-rgajtawqbn3odffzo2sf-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49539/
State Superseded
Headers show

Comments

phabricator - July 28, 2021, 2:58 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D11225

AFFECTED FILES
  tests/dummyssh

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/dummyssh b/tests/dummyssh
--- a/tests/dummyssh
+++ b/tests/dummyssh
@@ -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))