diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2013-08-12 20:43:29 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2013-08-12 20:43:29 +0000 |
commit | 260fc866468e3fb9f8f739d0c67b72fe8f1c91ac (patch) | |
tree | 6dec7ae136f05a4716616fc2996da1633e9ccb43 /sys | |
parent | 8b9478e165facd00de10d84cfde1ec83e0ecafc8 (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')
-rw-r--r-- | sys/kern/kern_proc.c | 10 | ||||
-rw-r--r-- | sys/sys/proc.h | 14 |
2 files changed, 14 insertions, 10 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; diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 03c034ae1c6..92892f16501 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.h,v 1.168 2013/06/06 13:09:37 haesbaert Exp $ */ +/* $OpenBSD: proc.h,v 1.169 2013/08/12 20:43:28 bluhm Exp $ */ /* $NetBSD: proc.h,v 1.44 1996/04/22 01:23:21 christos Exp $ */ /*- @@ -412,12 +412,14 @@ struct proc { #endif #define P_BITS \ - ("\20\02CONTROLT\03INMEM\04SIGPAUSE\05PPWAIT\06PROFIL\07SELECT" \ - "\010SINTR\011SUGID\012SYSTEM\013TIMEOUT\014TRACED\015WAITED\016WEXIT" \ - "\017EXEC\020PWEUPC\021ISPWAIT\022COREDUMPING\023SUGIDEXEC\024SUSPSINGLE" \ + ("\20\01INKTR\02CONTROLT\03INMEM\04SIGSUSPEND" \ + "\05PPWAIT\06PROFIL\07SELECT\010SINTR" \ + "\011SUGID\012SYSTEM\013TIMEOUT\014TRACED" \ + "\015WAITED\016WEXIT\017EXEC\020OWEUPC" \ + "\021ISPWAIT\022COREDUMP\023SUGIDEXEC\024SUSPSINGLE" \ "\025NOZOMBIE\026INEXEC\027SYSTRACE\030CONTINUED" \ - "\031SINGLEEXIT\032SINGLEUNWIND" \ - "\033THREAD\034SUSPSIG\035SOFTDEP\036STOPPED\037CPUPEG") + "\031SINGLEEXIT\032SINGLEUNWIND\033THREAD\034SUSPSIG" \ + "\035SOFTDEP\036STOPPED\037CPUPEG\040EXITING") /* Macro to compute the exit signal to be delivered. */ #define P_EXITSIG(p) \ |