From 7ff66821f4fb8b03c2ae0c1f9dde60e8a9719d73 Mon Sep 17 00:00:00 2001 From: enami Date: Thu, 12 Feb 2004 23:47:21 +0000 Subject: [PATCH] Also defer the writing of KTR_EMUL entry. Otherwise, the parent process may sleep with setting KTRFAC_ACTIVE of child process and the child will run without emitting any ktrace entry. --- sys/kern/kern_fork.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index d7e8c1f22a6a..b898f6fc0334 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_fork.c,v 1.113 2003/11/12 21:07:38 dsl Exp $ */ +/* $NetBSD: kern_fork.c,v 1.114 2004/02/12 23:47:21 enami Exp $ */ /*- * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_fork.c,v 1.113 2003/11/12 21:07:38 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_fork.c,v 1.114 2004/02/12 23:47:21 enami Exp $"); #include "opt_ktrace.h" #include "opt_systrace.h" @@ -462,7 +462,7 @@ fork1(struct lwp *l1, int flags, int exitsig, void *stack, size_t stacksize, #ifdef KTRACE if (KTRPOINT(p2, KTR_EMUL)) - ktremul(p2); + p2->p_traceflag |= KTRFAC_TRC_EMUL; #endif /*