From 484644676af2f83434f0f9bed9b23d7cecab16e8 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Sat, 1 Nov 2008 01:19:35 +0000 Subject: 25985: don't try to disable signal traps if getsignum returns -1. --- ChangeLog | 5 +++++ Src/hashtable.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 81839bc43..83fce61ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-11-01 Clint Adams + + * 25985: Src/hashtable.c: don't try to disable signal traps if + getsignum returns -1. + 2008-10-31 Oliver Kiddle * 25983: Fix bug in hash builtin with empty hash entry name diff --git a/Src/hashtable.c b/Src/hashtable.c index bc2a4f22e..e12aca852 100644 --- a/Src/hashtable.c +++ b/Src/hashtable.c @@ -819,8 +819,10 @@ disableshfuncnode(HashNode hn, UNUSED(int flags)) hn->flags |= DISABLED; if (!strncmp(hn->nam, "TRAP", 4)) { int signum = getsignum(hn->nam + 4); - sigtrapped[signum] &= ~ZSIG_FUNC; - unsettrap(signum); + if (signum != -1) { + sigtrapped[signum] &= ~ZSIG_FUNC; + unsettrap(signum); + } } } -- cgit 1.4.1