summaryrefslogtreecommitdiff
path: root/sys/kern/kern_proc.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2013-08-12 20:43:29 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2013-08-12 20:43:29 +0000
commit260fc866468e3fb9f8f739d0c67b72fe8f1c91ac (patch)
tree6dec7ae136f05a4716616fc2996da1633e9ccb43 /sys/kern/kern_proc.c
parent8b9478e165facd00de10d84cfde1ec83e0ecafc8 (diff)
The ps flags are split between thread and process. It is useful
for ddb to show both. So or them together in the ps overview and list them explicitly for the specific thread. Also sync the ddb bit names with the define names. OK miod@
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r--sys/kern/kern_proc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index 576cff8449a..1258b937742 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_proc.c,v 1.51 2013/08/08 23:25:06 syl Exp $ */
+/* $OpenBSD: kern_proc.c,v 1.52 2013/08/12 20:43:28 bluhm Exp $ */
/* $NetBSD: kern_proc.c,v 1.14 1996/02/09 18:59:41 christos Exp $ */
/*
@@ -395,8 +395,9 @@ proc_printit(struct proc *p, const char *modif,
else
pst = pstat[(int)p->p_stat - 1];
- (*pr)("PROC (%s) pid=%d stat=%s flags=%b\n",
- p->p_comm, p->p_pid, pst, p->p_flag, P_BITS);
+ (*pr)("PROC (%s) pid=%d stat=%s\n", p->p_comm, p->p_pid, pst);
+ (*pr)(" flags process=%b proc=%b\n",
+ p->p_p->ps_flags, P_BITS, p->p_flag, P_BITS);
(*pr)(" pri=%u, usrpri=%u, nice=%d\n",
p->p_priority, p->p_usrpri, p->p_p->ps_nice);
(*pr)(" forw=%p, list=%p,%p\n",
@@ -474,7 +475,8 @@ db_show_all_procs(db_expr_t addr, int haddr, db_expr_t count, char *modif)
"%-12.12s %-16s\n",
ppr ? ppr->ps_pid : -1,
pr->ps_pgrp ? pr->ps_pgrp->pg_id : -1,
- pr->ps_cred->p_ruid, p->p_stat, p->p_flag,
+ pr->ps_cred->p_ruid, p->p_stat,
+ p->p_flag | p->p_p->ps_flags,
(p->p_wchan && p->p_wmesg) ?
p->p_wmesg : "", p->p_comm);
break;