diff options
| author | 2011-12-14 07:32:16 +0000 | |
|---|---|---|
| committer | 2011-12-14 07:32:16 +0000 | |
| commit | a2e04e14c7bba4f83f5db2cc788417da45b260c4 (patch) | |
| tree | 31613602daf80e3d277fa49a50b35109d43d5fda /sys/kern/kern_exit.c | |
| parent | *finally* make use of certificate authority file if available ! (diff) | |
| download | wireguard-openbsd-a2e04e14c7bba4f83f5db2cc788417da45b260c4.tar.xz wireguard-openbsd-a2e04e14c7bba4f83f5db2cc788417da45b260c4.zip | |
Handle rthreads consistently in ktrace by moving the flags and vnode into
struct process; KTRFAC_ACTIVE becomes P_INKTR. Also, save the credentials
used to open the file in sys_ktrace() and use them for all writes to the
vnode.
much feedback and ok jsing@
Diffstat (limited to 'sys/kern/kern_exit.c')
| -rw-r--r-- | sys/kern/kern_exit.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 3e029725a0c..ecd63cf0fda 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exit.c,v 1.104 2011/12/11 19:42:28 guenther Exp $ */ +/* $OpenBSD: kern_exit.c,v 1.105 2011/12/14 07:32:16 guenther Exp $ */ /* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */ /* @@ -220,16 +220,14 @@ exit1(struct proc *p, int rv, int flags) #ifdef ACCOUNTING (void)acct_process(p); #endif - } #ifdef KTRACE - /* - * release trace file - */ - p->p_traceflag = 0; /* don't trace the vrele() */ - if (p->p_tracep) - ktrsettracevnode(p, NULL); + /* release trace file */ + if (pr->ps_tracevp) + ktrcleartrace(pr); #endif + } + #if NSYSTRACE > 0 if (ISSET(p->p_flag, P_SYSTRACE)) systrace_exit(p); |
