Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Stop masking raise(SIGSTOP) in a vfork...



details:   https://anonhg.NetBSD.org/src/rev/dce84b32d4e6
branches:  trunk
changeset: 319147:dce84b32d4e6
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sat May 19 05:01:42 2018 +0000

description:
Stop masking raise(SIGSTOP) in a vfork(2)ed child that called PT_TRACE_ME.

Sponsored by <The NetBSD Foundation>

diffstat:

 sys/kern/kern_sig.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 0a5ec2833715 -r dce84b32d4e6 sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c       Sat May 19 02:42:58 2018 +0000
+++ b/sys/kern/kern_sig.c       Sat May 19 05:01:42 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sig.c,v 1.345 2018/05/19 02:42:58 kamil Exp $     */
+/*     $NetBSD: kern_sig.c,v 1.346 2018/05/19 05:01:42 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.345 2018/05/19 02:42:58 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.346 2018/05/19 05:01:42 kamil Exp $");
 
 #include "opt_ptrace.h"
 #include "opt_dtrace.h"
@@ -1781,7 +1781,9 @@
                                 * XXX Don't hold proc_lock for p_lflag,
                                 * but it's not a big deal.
                                 */
-                               if (p->p_slflag & PSL_TRACED ||
+                               if ((ISSET(p->p_slflag, PSL_TRACED) &&
+                                    !(ISSET(p->p_lflag, PL_PPWAIT) &&
+                                    (p->p_pptr == p->p_opptr))) ||
                                    ((p->p_lflag & PL_ORPHANPG) != 0 &&
                                    prop & SA_TTYSTOP)) {
                                        /* Ignore the signal. */



Home | Main Index | Thread Index | Old Index