diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2000-06-14 15:14:49 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2000-06-14 15:14:49 +0000 |
commit | 4611530c455e66de32bb28e3588924efc88608ce (patch) | |
tree | 4f3118468394d4907aa2b8bf57c5e53cfeb0df61 /Src | |
parent | ae8c986107bc092abb35fecd639e4323f8d69ec7 (diff) | |
download | zsh-4611530c455e66de32bb28e3588924efc88608ce.tar.gz zsh-4611530c455e66de32bb28e3588924efc88608ce.tar.xz zsh-4611530c455e66de32bb28e3588924efc88608ce.zip |
11901: two more trap saving bugs
Diffstat (limited to 'Src')
-rw-r--r-- | Src/signals.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Src/signals.c b/Src/signals.c index 543d4ab9b..7ec517b7f 100644 --- a/Src/signals.c +++ b/Src/signals.c @@ -671,8 +671,11 @@ dosavetrap(int sig, int level) newshf->funcdef = dupeprog(shf->funcdef, 0); } st->list = newshf; - } else { + } else if (sigtrapped[sig]) { st->list = sigfuncs[sig] ? dupeprog(sigfuncs[sig], 0) : NULL; + } else { + DPUTS(sigfuncs[sig], "BUG: sigfuncs not null for untrapped signal"); + st->list = NULL; } if (!savetraps) savetraps = znewlinklist(); @@ -789,6 +792,7 @@ removetrap(int sig) * As in dosavetrap(), don't call removeshfuncnode() because * that calls back into unsettrap(); */ + sigfuncs[sig] = NULL; return removehashnode(shfunctab, func); } else if (sigfuncs[sig]) { freeeprog(sigfuncs[sig]); |