Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: fix idiocy with POSIX_TRAPS
- X-seq: zsh-workers 28258
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxx (Zsh hackers list)
- Subject: PATCH: fix idiocy with POSIX_TRAPS
- Date: Tue, 14 Sep 2010 13:49:22 +0100
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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@xxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author