zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: fix idiocy with POSIX_TRAPS
@ 2010-09-14 12:49 Peter Stephenson
  0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 2010-09-14 12:49 UTC (permalink / raw)
  To: Zsh hackers list

I managed to introduce an undefined variable.

Index: Src/signals.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/signals.c,v
retrieving revision 1.60
diff -p -u -r1.60 signals.c
--- Src/signals.c	12 Sep 2010 18:56:41 -0000	1.60
+++ Src/signals.c	14 Sep 2010 12:48:24 -0000
@@ -951,7 +951,7 @@ endtrapscope(void)
 {
     LinkNode ln;
     struct savetrap *st;
-    int exittr;
+    int exittr = 0;
     void *exitfn = NULL;
 
     /*
@@ -959,9 +959,8 @@ endtrapscope(void)
      * after all the other traps have been put back.
      * Don't do this inside another trap.
      */
-    if (intrap)
-	exittr = 0;
-    else if (!isset(POSIXTRAPS) && (exittr = sigtrapped[SIGEXIT])) {
+    if (!intrap &&
+	!isset(POSIXTRAPS) && (exittr = sigtrapped[SIGEXIT])) {
 	if (exittr & ZSIG_FUNC) {
 	    exitfn = removehashnode(shfunctab, "TRAPEXIT");
 	} else {

-- 
Peter Stephenson <pws@csr.com>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-14 12:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-14 12:49 PATCH: fix idiocy with POSIX_TRAPS Peter Stephenson

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).