diff options
author | Ron Yorston | 2021-08-30 20:31:42 +0100 |
---|---|---|
committer | Denys Vlasenko | 2021-09-02 17:49:00 +0200 |
commit | 4a36ef11ac4d46ae651cbedc440ca6853415283a (patch) | |
tree | 3e6fb84aa490cc05b6918c9c635df4d4f4198f95 /shell/hush_test/hush-parsing/brace2.right | |
parent | f02691939eba5c043a90c0f1f428d4124dc83a1c (diff) | |
download | busybox-4a36ef11ac4d46ae651cbedc440ca6853415283a.zip busybox-4a36ef11ac4d46ae651cbedc440ca6853415283a.tar.gz |
ash: regressions in process substitution
Stacy Harper reports that this script:
test() { . /tmp/bb_test; }
echo "export TEST=foo" >/tmp/bb_test
test 2>/dev/null
echo "$TEST"
correctly prints 'foo' in BusyBox 1.33 but hangs in 1.34.
Bisection suggested the problem was caused by commit a1b0d3856 (ash: add
process substitution in bash-compatibility mode). Removing the call to
unwindredir() in cmdloop() introduced in that commit makes the script
work again.
Additionally, these examples of process substitution:
while true; do cat <(echo hi); done
f() { while true; do cat <(echo hi); done }
f
result in running out of file descriptors. This is a regression from
v5 of the process substitution patch caused by changes to evalcommand()
not being transferred to v6.
function old new delta
static.pushredir - 99 +99
evalcommand 1729 1750 +21
exitreset 69 86 +17
cmdloop 372 365 -7
unwindredir 28 - -28
pushredir 112 - -112
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 2/1 up/down: 137/-147) Total: -10 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test/hush-parsing/brace2.right')
0 files changed, 0 insertions, 0 deletions