summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2000-06-03 16:26:47 +0000
committerBart Schaefer <barts@users.sourceforge.net>2000-06-03 16:26:47 +0000
commit709ce3829cb1c7bfeade8b18b39cd601b9e0decc (patch)
treeea1d8e5c8cbdeae6a869c43eb722a30f9c9cfeab
parent43d443f602422e2d1cb12c1f172c350ef9e781d7 (diff)
downloadzsh-709ce3829cb1c7bfeade8b18b39cd601b9e0decc.tar.gz
zsh-709ce3829cb1c7bfeade8b18b39cd601b9e0decc.tar.xz
zsh-709ce3829cb1c7bfeade8b18b39cd601b9e0decc.zip
11736: Fix TRAPEXIT scoping.
-rw-r--r--ChangeLog4
-rw-r--r--Src/signals.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2b830ac6c..271c54888 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-06-03  Bart Schaefer  <schaefer@brasslantern.com>
+
+	* 11736: Src/signals.c: Fix special scoping of TRAPEXIT.
+
 2000-06-02  Peter Stephenson  <pws@cambridgesiliconradio.com>
 
 	* 11733: Doc/Makefile.in: Solaris sed was behaving strangely with
diff --git a/Src/signals.c b/Src/signals.c
index b8e06d444..9b9ef97aa 100644
--- a/Src/signals.c
+++ b/Src/signals.c
@@ -751,7 +751,7 @@ removetrap(int sig)
      * one, to aid in removing this one.  However, if there's
      * already one at the current locallevel we just overwrite it.
      */
-    if (isset(LOCALTRAPS) && locallevel &&
+    if ((isset(LOCALTRAPS) || sig == SIGEXIT) && locallevel &&
 	(!trapped || locallevel > (sigtrapped[sig] >> ZSIG_SHIFT)))
 	dosavetrap(sig, locallevel);