about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2000-06-14 14:19:20 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2000-06-14 14:19:20 +0000
commitae8c986107bc092abb35fecd639e4323f8d69ec7 (patch)
tree62f0a6bb2837c2b0669af5a94b4904512190f01f
parenta908cdd155ed5e400e148a75a02bd57a050f7b82 (diff)
downloadzsh-ae8c986107bc092abb35fecd639e4323f8d69ec7.tar.gz
zsh-ae8c986107bc092abb35fecd639e4323f8d69ec7.tar.xz
zsh-ae8c986107bc092abb35fecd639e4323f8d69ec7.zip
11895: trap exit problem when exiting from function scope
-rw-r--r--ChangeLog5
-rw-r--r--Src/signals.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f264e0c5a..9ac384183 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-06-14  Peter Stephenson  <pws@cambridgesiliconradio.com>
+
+	* 11895: Src/signals.c: exit traps weren't cleared from the
+	list properly, resulting in memory management problems.
+
 2000-06-14  Sven Wischnowsky  <wischnow@zsh.org>
 
 	* 11885: Src/parse.c: nix kaboom with `time time'
diff --git a/Src/signals.c b/Src/signals.c
index 264b68a53..543d4ab9b 100644
--- a/Src/signals.c
+++ b/Src/signals.c
@@ -837,9 +837,9 @@ endtrapscope(void)
 	    exitfn = removehashnode(shfunctab, "TRAPEXIT");
 	} else {
 	    exitfn = sigfuncs[SIGEXIT];
-	    sigfuncs[SIGEXIT] = NULL;
 	}
-	unsettrap(SIGEXIT);
+	sigfuncs[SIGEXIT] = NULL;
+	sigtrapped[SIGEXIT] = 0;
     }
 
     if (savetraps) {