--- src/sys/kern/kern_exit.c 2005/10/09 20:12:34 1.45 +++ src/sys/kern/kern_exit.c 2005/10/09 21:38:04 1.46 @@ -115,6 +115,7 @@ void exit1(int rv) { struct proc *p = curproc; + struct lwp *lp; struct proc *q, *nq; struct vmspace *vm; struct vnode *vtmp; @@ -126,8 +127,10 @@ exit1(int rv) panic("Going nowhere without my init!"); } - sysmsg_rundown(p, 1); - caps_exit(p->p_thread); + lp = &p->p_lwp; /* XXX lwp kill other threads */ + + sysmsg_rundown(lp, 1); + caps_exit(lp->lwp_thread); aio_proc_rundown(p); /* are we a task leader? */