mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Revert "Fix subshell leak for 4 special variables (re: bd3e2a80
)"
This reverts commit b3d37b00b0
.
While ksh's own regression test suite passed just fine, when
running the modernish[*] regression tests uite, ksh either froze
hard (needing SIGKILL) or threw a spurious syntax error.
Cause unknown, but I'm certainly reverting until I find out.
This reintroduces a subshell leak for four special variables.
[*] https://github.com/modernish/modernish
This commit is contained in:
parent
5ed9ffd6c4
commit
417883dfdd
3 changed files with 12 additions and 19 deletions
|
@ -1011,20 +1011,6 @@ $SHELL -c '
|
|||
e=$?
|
||||
((e == 1)) || err_exit "Failure in making one or more special variables readonly in a subshell (exit status $e)"
|
||||
|
||||
# ... subshell leak test
|
||||
$SHELL -c '
|
||||
errors=0
|
||||
for var
|
||||
do if eval "($var=bug); [[ \${$var} == bug ]]" 2>/dev/null
|
||||
then echo " $0: special variable $var leaks out of subshell" >&2
|
||||
let errors++
|
||||
fi
|
||||
done
|
||||
exit $((errors + 1))
|
||||
' subshell_leak_test "$@"
|
||||
e=$?
|
||||
((e == 1)) || err_exit "One or more special variables leak out of a subshell (exit status $e)"
|
||||
|
||||
# ======
|
||||
# ${.sh.pid} should be the forked subshell's PID
|
||||
(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue