Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpthread Honor SA_NODEFER in pthread__deliver_signal()...
details: https://anonhg.NetBSD.org/src/rev/02e7480365b4
branches: trunk
changeset: 555713:02e7480365b4
user: cl <cl%NetBSD.org@localhost>
date: Tue Nov 25 22:45:33 2003 +0000
description:
Honor SA_NODEFER in pthread__deliver_signal(). This should help code which
makes a longjmp out of a signal handler.
Also add missing si_code argument to debugging printf in pthread__kill().
diffstat:
lib/libpthread/pthread_sig.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r c28931b5e63e -r 02e7480365b4 lib/libpthread/pthread_sig.c
--- a/lib/libpthread/pthread_sig.c Tue Nov 25 22:44:16 2003 +0000
+++ b/lib/libpthread/pthread_sig.c Tue Nov 25 22:45:33 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_sig.c,v 1.29 2003/11/25 22:36:32 christos Exp $ */
+/* $NetBSD: pthread_sig.c,v 1.30 2003/11/25 22:45:33 cl Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_sig.c,v 1.29 2003/11/25 22:36:32 christos Exp $");
+__RCSID("$NetBSD: pthread_sig.c,v 1.30 2003/11/25 22:45:33 cl Exp $");
/* We're interposing a specific version of the signal interface. */
#define __LIBC12_SOURCE__
@@ -755,7 +755,7 @@
{
SDPRINTF(("(pthread__kill %p) target %p sig %d code %d\n", self, target,
- si->si_signo));
+ si->si_signo, si->si_code));
if (__sigismember14(&target->pt_sigmask, si->si_signo)) {
/* Record the signal for later delivery. */
@@ -840,7 +840,8 @@
*/
oldmask = target->pt_sigmask;
__sigplusset(&target->pt_sigmask, &act.sa_mask);
- __sigaddset14(&target->pt_sigmask, si->si_signo);
+ if ((act.sa_flags & SA_NODEFER) == 0)
+ __sigaddset14(&target->pt_sigmask, si->si_signo);
if (target->pt_trapuc) {
olduc = target->pt_trapuc;
Home |
Main Index |
Thread Index |
Old Index