From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16480 invoked from network); 11 Oct 2001 16:42:13 -0000 Received: from unknown (HELO sunsite.dk) (130.225.247.90) by ns1.primenet.com.au with SMTP; 11 Oct 2001 16:42:13 -0000 Received: (qmail 22035 invoked by alias); 11 Oct 2001 16:41:47 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16013 Received: (qmail 21989 invoked from network); 11 Oct 2001 16:41:45 -0000 From: Bart Schaefer Message-Id: <1011011164131.ZM18603@candle.brasslantern.com> Date: Thu, 11 Oct 2001 16:41:30 +0000 X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: PATCH (?): Debug trap bug? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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