mirror of
https://github.com/zsh-users/zsh
synced 2024-07-21 10:14:19 +00:00
test EXIT trap fix
This commit is contained in:
parent
1d97597697
commit
89719fbac3
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,7 @@
|
|||
2001-10-01 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 15917: Test/C03traps.ztst: test for EXIT trap fix in 15844.
|
||||
|
||||
2001-09-30 Clint Adams <clint@zsh.org>
|
||||
|
||||
* 15915: Completion/Debian/Command/_bts:
|
||||
|
@ -24,7 +28,7 @@
|
|||
|
||||
2001-09-27 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* Config/version.mk, Completion/Unix/Command/.distfiles,
|
||||
* unposted: Config/version.mk, Completion/Unix/Command/.distfiles,
|
||||
Doc/Zsh/.distfiles, Functions/Misc/.distfiles,
|
||||
Functions/Zle/.distfiles, Test/.distfiles: version 4.1.0-dev-2,
|
||||
with the usual fix for the list of distributed files.
|
||||
|
@ -58,8 +62,8 @@
|
|||
|
||||
2001-09-24 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* Src/builtin.c, Src/exec.c: Unwind function calls before exiting
|
||||
shell from exit command to allow EXIT traps to run.
|
||||
* 15844: Src/builtin.c, Src/exec.c: Unwind function calls before
|
||||
exiting shell from exit command to allow EXIT traps to run.
|
||||
|
||||
2001-09-21 Andrew Main (Zefram) <zefram@zsh.org>
|
||||
|
||||
|
|
|
@ -45,6 +45,18 @@
|
|||
0:Nested `trap - EXIT' on `TRAPEXIT'
|
||||
>EXIT1
|
||||
|
||||
# We can't test an EXIT trap for the shell as a whole, because
|
||||
# we're inside a function scope which we don't leave when the
|
||||
# subshell exits. Not sure if that's the correct behaviour, but
|
||||
# it's sort of consistent.
|
||||
( fn1() { trap 'print Function 1 going' EXIT; exit; print Not reached; }
|
||||
fn2() { trap 'print Function 2 going' EXIT; fn1; print Not reached; }
|
||||
fn2
|
||||
)
|
||||
0:EXIT traps on functions when exiting from function
|
||||
>Function 1 going
|
||||
>Function 2 going
|
||||
|
||||
fn1() {
|
||||
trap
|
||||
trap 'print INT1' INT
|
||||
|
|
Loading…
Reference in a new issue