Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Revert previous



details:   https://anonhg.NetBSD.org/src/rev/02ea48f0af92
branches:  trunk
changeset: 319372:02ea48f0af92
user:      kamil <kamil%NetBSD.org@localhost>
date:      Mon May 28 14:07:37 2018 +0000

description:
Revert previous

There is a regression not covered by tests.

diffstat:

 sys/kern/kern_sig.c |  19 ++++---------------
 1 files changed, 4 insertions(+), 15 deletions(-)

diffs (45 lines):

diff -r f3f1f96172fe -r 02ea48f0af92 sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c       Mon May 28 13:22:34 2018 +0000
+++ b/sys/kern/kern_sig.c       Mon May 28 14:07:37 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sig.c,v 1.348 2018/05/28 13:12:54 kamil Exp $     */
+/*     $NetBSD: kern_sig.c,v 1.349 2018/05/28 14:07:37 kamil Exp $     */
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.348 2018/05/28 13:12:54 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.349 2018/05/28 14:07:37 kamil Exp $");
 
 #include "opt_ptrace.h"
 #include "opt_dtrace.h"
@@ -904,24 +904,13 @@
        KASSERT(!cpu_intr_p());
        mutex_enter(proc_lock);
        mutex_enter(p->p_lock);
-
-       if (ISSET(p->p_slflag, PSL_TRACED) && (p->p_pptr != p->p_opptr)) {
-               p->p_xsig = signo;
-               p->p_sigctx.ps_faked = true; // XXX
-               p->p_sigctx.ps_info._signo = signo;
-               p->p_sigctx.ps_info._code = ksi->ksi_code;
-               sigswitch(0, signo, false);
-               // XXX ktrpoint(KTR_PSIG)
-               mutex_exit(p->p_lock);
-               return;
-       }
-
        mask = &l->l_sigmask;
        ps = p->p_sigacts;
 
+       const bool traced = (p->p_slflag & PSL_TRACED) != 0;
        const bool caught = sigismember(&p->p_sigctx.ps_sigcatch, signo);
        const bool masked = sigismember(mask, signo);
-       if (caught && !masked) {
+       if (!traced && caught && !masked) {
                mutex_exit(proc_lock);
                l->l_ru.ru_nsignals++;
                kpsendsig(l, ksi, mask);



Home | Main Index | Thread Index | Old Index