aboutsummaryrefslogtreecommitdiff
path: root/sys/ddb
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2021-01-01 00:00:05 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2021-01-01 00:00:05 +0000
commit47877889f2b823f4c2fa135f5f3955ce0b3bdca1 (patch)
tree55da18dd472ae2d967d5708030fd947f11aed905 /sys/ddb
parent68dc94c7d314b02ef80fe972f524a2b3c6e68a1c (diff)
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_ps.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c
index df2db88e97a1..da655d11da02 100644
--- a/sys/ddb/db_ps.c
+++ b/sys/ddb/db_ps.c
@@ -107,7 +107,7 @@ void
db_ps(db_expr_t addr, bool hasaddr, db_expr_t count, char *modif)
{
struct proc *p;
- int i, j;
+ int i;
ps_mode = modif[0] == 'a' ? PRINT_ARGS : PRINT_NONE;
@@ -125,14 +125,12 @@ db_ps(db_expr_t addr, bool hasaddr, db_expr_t count, char *modif)
db_ps_proc(p);
/*
- * Do zombies.
+ * Processes such as zombies not in allproc.
*/
- for (i = 0; i < pidhashlock + 1 && !db_pager_quit; i++) {
- for (j = i; j <= pidhash && !db_pager_quit; j += pidhashlock + 1) {
- LIST_FOREACH(p, &pidhashtbl[j], p_hash) {
- if (p->p_state == PRS_ZOMBIE)
- db_ps_proc(p);
- }
+ for (i = 0; i <= pidhash && !db_pager_quit; i++) {
+ LIST_FOREACH(p, &pidhashtbl[i], p_hash) {
+ if (p->p_list.le_prev == NULL)
+ db_ps_proc(p);
}
}
}