summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/hashtable.c6
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  <clint@zsh.org>
+
+	* 25985: Src/hashtable.c: don't try to disable signal traps if
+	getsignum returns -1.
+
 2008-10-31  Oliver Kiddle  <opk@zsh.org>
 
 	* 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);
+	}
     }
 }