summaryrefslogtreecommitdiffstats
path: root/bin/ps/print.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r--bin/ps/print.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c
index 5aa27c0..46b979b 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -862,6 +862,26 @@ out:
return;
}
+void
+loginclass(KINFO *k, VARENT *ve)
+{
+ VAR *v;
+ char *s;
+
+ v = ve->var;
+ /*
+ * Don't display login class for system processes;
+ * login classes are used for resource limits,
+ * and limits don't apply to system processes.
+ */
+ if (k->ki_p->ki_flag & P_SYSTEM) {
+ (void)printf("%-*s", v->width, " -");
+ return;
+ }
+ s = k->ki_p->ki_loginclass;
+ (void)printf("%-*s", v->width, *s ? s : "-");
+}
+
int
s_comm(KINFO *k)
{
OpenPOWER on IntegriCloud