about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-07-26 13:18:07 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-07-26 13:18:07 +0000
commit17e576782c4fd64194d4908af5b9774308f1205f (patch)
tree17dd493a05fe17e0e2f90d9dbf30551dd7d97e35 /Src/exec.c
parent725616d600e4e574aa1cdd3ac0abe874a512fe14 (diff)
downloadzsh-17e576782c4fd64194d4908af5b9774308f1205f.tar.gz
zsh-17e576782c4fd64194d4908af5b9774308f1205f.tar.xz
zsh-17e576782c4fd64194d4908af5b9774308f1205f.zip
20198: fix TRAPEXIT.
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 83f397335..ee0752035 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -3495,7 +3495,8 @@ doshfunc(char *name, Eprog prog, LinkList doshargs, int flags, int noreturnval)
 	memcpy(oldpipestats, pipestats, bytes);
     }
 
-    starttrapscope();
+    if (!intrap)
+	starttrapscope();
 
     tab = pparams;
     if (!(flags & PM_UNDEFINED))
@@ -3595,7 +3596,8 @@ doshfunc(char *name, Eprog prog, LinkList doshargs, int flags, int noreturnval)
 	opts[LOCALOPTIONS] = saveopts[LOCALOPTIONS];
     }
 
-    endtrapscope();
+    if (!intrap)
+	endtrapscope();
 
     if (trapreturn < -1)
 	trapreturn++;