Index: kern/kern_exit.c =================================================================== RCS file: /home/repos/cvs/dragonfly/src/sys/kern/kern_exit.c,v retrieving revision 1.86 diff -u -p -r1.86 kern_exit.c --- kern/kern_exit.c 30 Aug 2007 20:41:00 -0000 1.86 +++ kern/kern_exit.c 8 Jan 2008 00:06:01 -0000 @@ -769,6 +769,13 @@ loop: p->p_usched->heuristic_exiting(td->td_lwp, deadlp); */ + /* + * Finally finished with old proc entry. + * Unlink it from its process group and free it. + */ + proc_remove_zombie(p); + leavepgrp(p); + /* Take care of our return values. */ *res = p->p_pid; if (status) @@ -806,13 +813,6 @@ loop: if (p->p_args && --p->p_args->ar_ref == 0) FREE(p->p_args, M_PARGS); - /* - * Finally finished with old proc entry. - * Unlink it from its process group and free it. - */ - proc_remove_zombie(p); - leavepgrp(p); - if (--p->p_sigacts->ps_refcnt == 0) { kfree(p->p_sigacts, M_SUBPROC); p->p_sigacts = NULL;