53732: avoid tail-call exec in always block

This commit is contained in:
Philippe Altherr
2025-10-26 13:39:33 -07:00
committed by Bart Schaefer
parent 5198c44107
commit 477c6890b0
3 changed files with 11 additions and 1 deletions

View File

@@ -720,6 +720,12 @@
>always 1
>try 2
() { { return 2 } always { return 3 } }
2:Exit status of always block is ignored
() { ( { return 2 } always { ( return 3 ) } ) }
2:Regression test for exit status of always block is ignored also in tailcalls
(
mywrap() { echo BEGIN; true; echo END }
mytest() { { exit 3 } always { mywrap }; print Exited before this }