diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2013-09-22 17:28:35 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2013-09-22 17:28:35 +0000 |
commit | f8caf955c3775ce75e26a7247df8959d1c2230cc (patch) | |
tree | e3eb5e1bdb728245e5fa1f77bb5b3b94e2ae6980 /bin/ps/print.c | |
parent | 9a50a70472a4c05f1f8bfd17e5a13abd50327b78 (diff) |
Stop merging the per-thread and per-process flags when reporting
them via sysctl(KERN_PROC). In struct kinfo_proc the per-process
flags move to p_psflags, leaving the per-thread flags in p_flags.
Flag descriptions in ps(1) updated to be less obtuse.
discussed with matthew@ some time ago; ok jca@, manpage bits ok jmc@
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r-- | bin/ps/print.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c index 46d06c66c82..835d345dadb 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.54 2013/03/23 21:12:31 tedu Exp $ */ +/* $OpenBSD: print.c,v 1.55 2013/09/22 17:28:34 guenther Exp $ */ /* $NetBSD: print.c,v 1.27 1995/09/29 21:58:12 cgd Exp $ */ /*- @@ -255,13 +255,13 @@ state(const struct kinfo_proc *kp, VARENT *ve) *cp++ = '<'; else if (kp->p_nice > NZERO) *cp++ = 'N'; - if (flag & P_TRACED) + if (kp->p_psflags & PS_TRACED) *cp++ = 'X'; if (flag & P_SYSTRACE) *cp++ = 'x'; if (flag & P_WEXIT && kp->p_stat != SZOMB) *cp++ = 'E'; - if (flag & PS_ISPWAIT) + if (kp->p_psflags & PS_ISPWAIT) *cp++ = 'V'; if (flag & P_SYSTEM) *cp++ = 'K'; @@ -270,7 +270,7 @@ state(const struct kinfo_proc *kp, VARENT *ve) *cp++ = '>'; if (kp->p_eflag & EPROC_SLEADER) *cp++ = 's'; - if ((flag & P_CONTROLT) && kp->p__pgid == kp->p_tpgid) + if ((kp->p_psflags & PS_CONTROLT) && kp->p__pgid == kp->p_tpgid) *cp++ = '+'; *cp = '\0'; |