From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8223 invoked from network); 9 Jun 2000 14:38:54 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Jun 2000 14:38:54 -0000 Received: (qmail 13775 invoked by alias); 9 Jun 2000 14:38:46 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11839 Received: (qmail 13761 invoked from network); 9 Jun 2000 14:38:45 -0000 Date: Fri, 9 Jun 2000 10:38:35 -0400 From: Clint Adams To: zsh-workers@sunsite.auc.dk Subject: PATCH: trap handling segfault Message-ID: <20000609103835.A22587@scowler.net> References: <20000609100241.B21890@scowler.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0.1i In-Reply-To: <20000609100241.B21890@scowler.net>; from schizo@debian.org on Fri, Jun 09, 2000 at 10:02:41AM -0400 This patch doesn't crash the snippet I posted, and it prints BYE after the script in 11735. I'm going to commit this under the assumption that someone with a better understanding will reverse it if there are horrible side effects. Index: signals.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/signals.c,v retrieving revision 1.6 diff -u -r1.6 signals.c --- signals.c 2000/06/03 16:26:47 1.6 +++ signals.c 2000/06/09 14:35:34 @@ -853,7 +853,7 @@ if (sigtrapped[sig]) unsettrap(sig); sigtrapped[sig] = st->flags; - if (st->flags) { + if (st->flags && (st->list != NULL)) { Eprog prog = (st->flags & ZSIG_FUNC) ? ((Shfunc) st->list)->funcdef : (Eprog) st->list; /* prevent settrap from saving this */