zsh-workers
 help / color / mirror / code / Atom feed
* PATCH (?): Debug trap bug?
@ 2001-10-11 16:41 Bart Schaefer
  2001-10-11 17:21 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2001-10-11 16:41 UTC (permalink / raw)
  To: zsh-workers

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   


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-10-13 20:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-11 16:41 PATCH (?): Debug trap bug? Bart Schaefer
2001-10-11 17:21 ` Peter Stephenson
2001-10-13 20:06   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).