summaryrefslogtreecommitdiff
path: root/bin/ps
diff options
context:
space:
mode:
authorRob Pierce <rob@cvs.openbsd.org>2022-02-15 23:16:01 +0000
committerRob Pierce <rob@cvs.openbsd.org>2022-02-15 23:16:01 +0000
commit578221498a85cb3daba50e1815422dcd6de34679 (patch)
tree0d026764b6f8eb70367fbc8c1cc91d08f40b9771 /bin/ps
parent376f2de13ec73b735663ba9764e7846d4030212e (diff)
Reintroduce ps state flag 'c' indicating chrooted process (via PS_BITS).
Ok deraat@
Diffstat (limited to 'bin/ps')
-rw-r--r--bin/ps/print.c4
-rw-r--r--bin/ps/ps.16
2 files changed, 7 insertions, 3 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c
index 7b54ae7d13d..4afa30f70fc 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.81 2022/02/14 18:09:08 rob Exp $ */
+/* $OpenBSD: print.c,v 1.82 2022/02/15 23:16:00 rob Exp $ */
/* $NetBSD: print.c,v 1.27 1995/09/29 21:58:12 cgd Exp $ */
/*-
@@ -289,6 +289,8 @@ printstate(const struct kinfo_proc *kp, VARENT *ve)
else
*cp++ = 'u';
}
+ if (kp->p_psflags & PS_CHROOT)
+ *cp++ = 'c';
*cp = '\0';
if (state == 'R' && kp->p_cpuid != KI_NOCPU) {
diff --git a/bin/ps/ps.1 b/bin/ps/ps.1
index 4ada43512a4..1e64816e754 100644
--- a/bin/ps/ps.1
+++ b/bin/ps/ps.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ps.1,v 1.123 2022/02/14 18:09:08 rob Exp $
+.\" $OpenBSD: ps.1,v 1.124 2022/02/15 23:16:00 rob Exp $
.\" $NetBSD: ps.1,v 1.16 1996/03/21 01:36:28 jtc Exp $
.\"
.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
@@ -30,7 +30,7 @@
.\"
.\" @(#)ps.1 8.3 (Berkeley) 4/18/94
.\"
-.Dd $Mdocdate: February 14 2022 $
+.Dd $Mdocdate: February 15 2022 $
.Dt PS 1
.Os
.Sh NAME
@@ -451,6 +451,8 @@ swapped.
.\" for example,
.\" .Xr lisp 1
.\" in a garbage collect).
+.It c
+The process is chrooted.
.It E
The process is trying to exit.
.It K