Revert "kernel: Don't disturb about-to-be reaped zombies."
authorYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Thu, 2 Jun 2011 05:17:39 +0000 (14:17 +0900)
committerYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Thu, 2 Jun 2011 05:17:39 +0000 (14:17 +0900)
p_nthreads == 0 just means that the process's threads have all exited,
but not necessarily means it's about to be reaped.  We still want it
to show up in the ps or top in case it gets stuck during the exit.

Pointed-out-by: dillon@
This reverts commit 9458c398c0b97d30032a6541f8ab452cd93f5a86.

sys/kern/kern_proc.c

index c4d6eb6..cb067f0 100644 (file)
@@ -949,11 +949,6 @@ sysctl_kern_proc(SYSCTL_HANDLER_ARGS)
 
                        if (!PRISON_CHECK(cr1, p->p_ucred))
                                continue;
-
-                       /* let dying zombies reaped quietly */
-                       if (doingzomb && p->p_nthreads == 0)
-                               continue;
-
                        PHOLD(p);
                        error = sysctl_out_proc(p, req, flags);
                        PRELE(p);