about summary refs log tree commit diff
diff options
context:
space:
mode:
-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);