1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-11 20:31:11 +01:00

11736: Fix TRAPEXIT scoping.

This commit is contained in:
Bart Schaefer 2000-06-03 16:26:47 +00:00
parent 43d443f602
commit 709ce3829c
2 changed files with 5 additions and 1 deletions

View file

@ -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

View file

@ -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);