summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgdt <gdt>2004-07-13 13:47:25 +0000
committergdt <gdt>2004-07-13 13:47:25 +0000
commitb77971317724a97b72a8566b3a54d36ef7c76a07 (patch)
tree25e17e5ec53eb9625e2f872e3053913e10177973
parent25dac85507ca3a107351a9f84173b5bcaea8a450 (diff)
2004-07-13 Greg Troxel <gdt@poblano.ir.bbn.com>
* sigevent.c: Don't block SIGTRAP and SIGKILL. Blocking SIGTRAP confuses gdb, at least on NetBSD 2.0_BETA, where the block succeeds.
-rw-r--r--lib/ChangeLog6
-rw-r--r--lib/sigevent.c9
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 6bb039de..108a2023 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,9 @@
+2004-07-13 Greg Troxel <gdt@poblano.ir.bbn.com>
+
+ * sigevent.c: Don't block SIGTRAP and SIGKILL. Blocking SIGTRAP
+ confuses gdb, at least on NetBSD 2.0_BETA, where the block
+ succeeds.
+
2004-07-09 Paul Jakma <paul@dishone.st>
* Merge Kunihiro's 'show route-map' change and add
diff --git a/lib/sigevent.c b/lib/sigevent.c
index fa5edf4a..6a2fd80c 100644
--- a/lib/sigevent.c
+++ b/lib/sigevent.c
@@ -61,8 +61,15 @@ quagga_signal_timer (struct thread *t)
sigm = THREAD_ARG (t);
- /* block all signals */
+ /*
+ * Block most signals, but be careful not to defer SIGTRAP because
+ * doing so breaks gdb, at least on NetBSD 2.0. Avoid asking to
+ * block SIGKILL, just because we shouldn't be able to do so.
+ */
sigfillset (&newmask);
+ sigdelset (&newmask, SIGTRAP);
+ sigdelset (&newmask, SIGKILL);
+
if ( (sigprocmask (SIG_BLOCK, &newmask, &oldmask)) < 0)
{
zlog_err ("quagga_signal_timer: couldnt block signals!");