Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Wordcode functions with empty bodies



> If you can
> find a particular chunk of code which seems to be doing something wrong
> (shorter than the complete traps test) I'll have a look at it sometime.

While I'm waiting, there's something obviously wrong with the way exit
tests are unset, but this looks too simple to be the source of everyone's
problems --- which generically stem from the fact that traps can take two
forms which are stored in the same place but manipulated in different ways.

Index: Src/signals.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/signals.c,v
retrieving revision 1.7
diff -u -r1.7 signals.c
--- Src/signals.c	2000/06/09 14:40:54	1.7
+++ Src/signals.c	2000/06/14 12:40:24
@@ -837,9 +837,9 @@
 	    exitfn = removehashnode(shfunctab, "TRAPEXIT");
 	} else {
 	    exitfn = sigfuncs[SIGEXIT];
-	    sigfuncs[SIGEXIT] = NULL;
 	}
-	unsettrap(SIGEXIT);
+	sigfuncs[SIGEXIT] = NULL;
+	sigtrapped[SIGEXIT] = 0;
     }
 
     if (savetraps) {

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxxx>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070



Messages sorted by: Reverse Date, Date, Thread, Author