about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/exec.c b/Src/exec.c
index a78212888..f1c5788bf 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -869,7 +869,8 @@ entersubsh(int flags)
 
     if (!(flags & ESUB_KEEPTRAP))
 	for (sig = 0; sig < VSIGCOUNT; sig++)
-	    if (!(sigtrapped[sig] & ZSIG_FUNC))
+	    if (!(sigtrapped[sig] & ZSIG_FUNC) &&
+		sig != SIGDEBUG && sig != SIGZERR)
 		unsettrap(sig);
     monitor = isset(MONITOR);
     if (flags & ESUB_NOMONITOR)