Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH (?): Debug trap bug?
- X-seq: zsh-workers 16013
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH (?): Debug trap bug?
- Date: Thu, 11 Oct 2001 16:41:30 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Can anybody tell me how the code before this patch could be right, or why
this patch would be wrong? If not, I'll commit it to both trunk and branch.
Index: Src/exec.c
===================================================================
--- Src/exec.c 2001/09/24 15:40:12 1.10
+++ Src/exec.c 2001/10/11 16:36:32
@@ -886,11 +886,18 @@
state->pc--;
sublist_done:
- cmdsp = csp;
noerrexit = oldnoerrexit;
- if (sigtrapped[SIGDEBUG])
+ if (sigtrapped[SIGDEBUG]) {
+ exiting = donetrap;
+ ret = lastval;
dotrap(SIGDEBUG);
+ lastval = ret;
+ donetrap = exiting;
+ noerrexit = oldnoerrexit;
+ }
+
+ cmdsp = csp;
/* Check whether we are suppressing traps/errexit *
* (typically in init scripts) and if we haven't *
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author