Re: [PATCH 2/3] t5615: avoid re-using descriptor 4
- From
Stefan Beller <sbeller@google.com>
- Date
- Oct 19, 2017, 21:46 UTC
- Message-ID
- <CAGZ79kYTmUnM+fcf222-cvwB3Fg4+J_xy28E7A3AYryx4qDf_w@mail.gmail.com>
- In-Reply-To
- <20171019210730.sgm4g4tmor2dgjv7@sigill.intra.peff.net>
Show 11 quoted lines
> I also considered trying to bump the "set -x" output descriptor to "9". > That just moves the problem around, but presumably scripts are less > likely to go that high. :) > > It would also be possible to pick something insanely high, like "999". > Many shells choke on descriptors higher than 9, but since the issue is > related to BASH_XTRACEFD, we could make it a bash-only thing. I don't > know if it's worth the trouble. I hate leaving a subtle "don't use > descriptor 4 in a subshell or your script will break" hand-grenade like > this lying around, but we do seem to have only one instance of it over > the whole test suite.
I would imagine that a higher fd for BASH_XTRACEFD would be less explosive than requiring the tests to skip the low number 4. (It is not *that* low. In e.g. git-submodule.sh we make use of 3 in cmd_foreach, not needing more.)
Thanks, Stefan