diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/command_queue.c | 2 | ||||
-rw-r--r-- | lib/qpnexus.c | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/command_queue.c b/lib/command_queue.c index 81ccebe5..69c8eca6 100644 --- a/lib/command_queue.c +++ b/lib/command_queue.c @@ -66,7 +66,7 @@ cq_action(mqueue_block mqb, mqb_flag_t flag) { int result; int i; - struct marshal *wyatt = mqb; + struct marshal *wyatt = mqb->arg0; if (flag == mqb_action) { diff --git a/lib/qpnexus.c b/lib/qpnexus.c index a12a760b..d8a8bbc6 100644 --- a/lib/qpnexus.c +++ b/lib/qpnexus.c @@ -200,11 +200,18 @@ qpn_start_bgp(void* arg) * Not main thread. 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. + * we shouldn't be able to do so. Avoid blocking SIGFPE, + * SIGILL, SIGSEGV, SIGBUS as this is undefined by POSIX. + * Don't block SIGPIPE so that is gets ignored on this thread. */ sigfillset (&newmask); sigdelset (&newmask, SIGTRAP); sigdelset (&newmask, SIGKILL); + sigdelset (&newmask, SIGPIPE); + sigdelset (&newmask, SIGFPE); + sigdelset (&newmask, SIGILL); + sigdelset (&newmask, SIGSEGV); + sigdelset (&newmask, SIGBUS); qpt_thread_sigmask(SIG_BLOCK, &newmask, NULL); qpn->mts = mqueue_thread_signal_init(qpn->mts, qpn->thread_id, SIGMQUEUE); |