From fb67cd46eafb1301844ed98f1c0e8d2cf8cbdee4 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 11 Sep 2008 14:47:18 +0000 Subject: 25643: keep DEBUG and ZERR traps in subshells --- Doc/Zsh/builtins.yo | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Doc') diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index c47ae49e7..8317c9547 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -1330,7 +1330,9 @@ If var(sig) is tt(0) or tt(EXIT) and the tt(trap) statement is not executed inside the body of a function, then the command var(arg) is executed when the shell terminates. -tt(ZERR), tt(DEBUG), and tt(EXIT) traps are not executed inside other traps. +tt(ZERR), tt(DEBUG), and tt(EXIT) traps are not executed inside other +traps. tt(ZERR) and tt(DEBUG) traps are kept within subshells, while +other traps are reset. Note that traps defined with the tt(trap) builtin are slightly different from those defined as `tt(TRAP)var(NAL) () { ... }', as the latter have -- cgit 1.4.1