mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-25 17:20:25 +02:00
43660: extend 43653 when final exit is implicit.
Combine logic for case after committed to exit (shell_exiting) with case where exit occurred in a function we nee to unwind (exit_pending). Add sarky note for future generations to be confused at.
This commit is contained in:
parent
9ede8c657f
commit
bbccbe0c85
4 changed files with 71 additions and 30 deletions
|
|
@ -869,6 +869,10 @@ F:Must be tested with a top-level script rather than source or function
|
|||
$ZTST_testdir/../Src/zsh -fc 'fn() { exit $?+8; }; trap fn EXIT; exit 7'
|
||||
15:Progated exit status through exit trap
|
||||
|
||||
$ZTST_testdir/../Src/zsh -fc 'fn() { exit 13; }; trap fn EXIT'
|
||||
13:Explicit exit in exit trap overrides implicit exit status
|
||||
|
||||
%clean
|
||||
|
||||
rm -f TRAPEXIT
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue