mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
The fix in sh/xec.c, which was backported from the ksh 93v- beta to delay the actual removal of a running function that unsets itself, caused a segfault in the variables.sh regression tests (see #23). src/cmd/ksh93/sh/xec.c: - Comment out the backported code pending a correct fix for #21. Now both types of functions silently fail to unset themselves (unless they're discipline functions). src/cmd/ksh93/tests/functions.sh: - Disable regression tests checking that the function was actually unset, pending a correct fix for #21. Resolves: #23 Reopens: #21
This commit is contained in:
parent
b7932e87b6
commit
975117485c
3 changed files with 7 additions and 9 deletions
|
@ -1253,10 +1253,12 @@ expect_status=0
|
|||
# When a function unsets itself, it should not fail to be unset
|
||||
$SHELL -c 'PATH=/dev/null; fn() { unset -f fn; true; }; fn' || err_exit 'unset of POSIX function in the calling stack fails'
|
||||
$SHELL -c 'PATH=/dev/null; function ftest { ftest2; }; function ftest2 { unset -f ftest; }; ftest' || err_exit 'unset of ksh function in the calling stack fails'
|
||||
: <<\end_disabled # TODO: re-enable when https://github.com/ksh93/ksh/issues/21 is fixed
|
||||
$SHELL -c 'PATH=/dev/null; fn() { unset -f fn; true; }; fn; fn' 2> /dev/null
|
||||
[[ $? != 127 ]] && err_exit 'unset of POSIX function fails when it is still running'
|
||||
$SHELL -c 'PATH=/dev/null; function fn { unset -f fn; true; }; fn; fn' 2> /dev/null
|
||||
[[ $? != 127 ]] && err_exit 'unset of ksh function fails when it is still running'
|
||||
end_disabled
|
||||
|
||||
# ======
|
||||
exit $((Errors<125?Errors:125))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue