about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-08-25 17:28:13 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-08-25 17:28:13 +0000
commitb8ae885ab8252f37b149472c288cf0d1c812324d (patch)
treef1d75030d1aa3b205dab8d3d588aa828c85743e2 /Src
parent9d7298bac8c9c8930fa69e4bffa75fb6d0beb506 (diff)
downloadzsh-b8ae885ab8252f37b149472c288cf0d1c812324d.tar.gz
zsh-b8ae885ab8252f37b149472c288cf0d1c812324d.tar.xz
zsh-b8ae885ab8252f37b149472c288cf0d1c812324d.zip
25532: problem skipping assignments etc. with setopt ERREXIT
Diffstat (limited to 'Src')
-rw-r--r--Src/exec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 4cd97b3df..aef97b216 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1068,7 +1068,7 @@ execlist(Estate state, int dont_change_job, int exiting)
 		lineno = lnp1 - 1;
 	}
 
-	if (sigtrapped[SIGDEBUG] && isset(DEBUGBEFORECMD)) {
+	if (sigtrapped[SIGDEBUG] && isset(DEBUGBEFORECMD) && !intrap) {
 	    int oerrexit_opt = opts[ERREXIT];
 	    opts[ERREXIT] = 0;
 	    noerrexit = 1;
@@ -1086,11 +1086,12 @@ execlist(Estate state, int dont_change_job, int exiting)
 	    donedebug = isset(ERREXIT) ? 2 : 1;
 	    opts[ERREXIT] = oerrexit_opt;
 	} else
-	    donedebug = 0;
+	    donedebug = intrap ? 1 : 0;
 
 	if (ltype & Z_SIMPLE) {
 	    next = state->pc + WC_LIST_SKIP(code);
-	    execsimple(state);
+	    if (donedebug != 2)
+		execsimple(state);
 	    state->pc = next;
 	    goto sublist_done;
 	}