summaryrefslogtreecommitdiff
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r--sys/kern/kern_fork.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index f5cd1f8eeb2..0c3745ba139 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_fork.c,v 1.132 2011/11/22 23:20:19 joshe Exp $ */
+/* $OpenBSD: kern_fork.c,v 1.133 2011/12/14 07:32:16 guenther Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/*
@@ -367,11 +367,9 @@ fork1(struct proc *curp, int exitsig, int flags, void *stack, pid_t *tidptr,
* Copy traceflag and tracefile if enabled.
* If not inherited, these were zeroed above.
*/
- if (curp->p_traceflag & KTRFAC_INHERIT) {
- p->p_traceflag = curp->p_traceflag;
- if ((p->p_tracep = curp->p_tracep) != NULL)
- vref(p->p_tracep);
- }
+ if ((flags & FORK_THREAD) == 0 && curpr->ps_traceflag & KTRFAC_INHERIT)
+ ktrsettrace(pr, curpr->ps_traceflag, curpr->ps_tracevp,
+ curpr->ps_tracecred);
#endif
/*