Patchwork D11226: run-tests: do not inherit file descriptor when running a command

login
register
mail settings
Submitter phabricator
Date July 28, 2021, 2:58 p.m.
Message ID <differential-rev-PHID-DREV-zlainazfg6m5n5e554vo-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49540/
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/D11226

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS




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

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1587,6 +1587,7 @@ 
             proc = subprocess.Popen(
                 _bytes2sys(cmd),
                 shell=True,
+                close_fds=closefds,
                 cwd=_bytes2sys(self._testtmp),
                 env=env,
             )