Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/kern/kern_sig.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/kern/kern_sig.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.343 retrieving revision 1.344 diff -u -p -r1.343 -r1.344 --- src/sys/kern/kern_sig.c 2018/05/06 13:40:51 1.343 +++ src/sys/kern/kern_sig.c 2018/05/16 00:42:15 1.344 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sig.c,v 1.343 2018/05/06 13:40:51 kamil Exp $ */ +/* $NetBSD: kern_sig.c,v 1.344 2018/05/16 00:42:15 kamil Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.343 2018/05/06 13:40:51 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.344 2018/05/16 00:42:15 kamil Exp $"); #include "opt_ptrace.h" #include "opt_dtrace.h" @@ -1720,10 +1720,10 @@ issignal(struct lwp *l) * If traced, always stop, and stay stopped until released * by the debugger. If the our parent is our debugger waiting * for us and we vforked, don't hang as we could deadlock. - * - * XXX: support PT_TRACE_ME called after vfork(2) */ - if ((p->p_slflag & PSL_TRACED) != 0 && signo != SIGKILL) { + if (ISSET(p->p_slflag, PSL_TRACED) && signo != SIGKILL && + !(ISSET(p->p_lflag, PL_PPWAIT) && + (p->p_pptr == p->p_opptr))) { /* * Take the signal, but don't remove it from the * siginfo queue, because the debugger can send