Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern When a process is being traced (debugged) and a cat...



details:   https://anonhg.NetBSD.org/src/rev/b22979c9511e
branches:  trunk
changeset: 565291:b22979c9511e
user:      matt <matt%NetBSD.org@localhost>
date:      Sat Apr 03 19:46:10 2004 +0000

description:
When a process is being traced (debugged) and a catchable signal arrives,
make sure to save its ksiginfo_t for eventual delivery.  This makes debugging
SA_SIGINFO signal handlers work.

diffstat:

 sys/kern/kern_sig.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r e88405822a0d -r b22979c9511e sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c       Sat Apr 03 19:43:08 2004 +0000
+++ b/sys/kern/kern_sig.c       Sat Apr 03 19:46:10 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sig.c,v 1.192 2004/04/03 19:43:08 matt Exp $      */
+/*     $NetBSD: kern_sig.c,v 1.193 2004/04/03 19:46:10 matt Exp $      */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.192 2004/04/03 19:43:08 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.193 2004/04/03 19:46:10 matt Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_compat_sunos.h"
@@ -1060,6 +1060,13 @@
                        if (prop & SA_TTYSTOP && p->p_pgrp->pg_jobc == 0)
                                return;
                }
+       } else {
+               /*
+                * If the process is being traced and the signal is being
+                * caught, make sure to save any ksiginfo.
+                */
+               if (sigismember(&p->p_sigctx.ps_sigcatch, signum))
+                       ksiginfo_put(p, ksi);
        }
 
        if (prop & SA_CONT)



Home | Main Index | Thread Index | Old Index