summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2004-01-07 02:13:51 +0000
committermillert <millert@openbsd.org>2004-01-07 02:13:51 +0000
commitd0af958b33900a53100583be24a0f64b2c72e0e7 (patch)
tree3f300fdee891e9ce8d897b7457df6a4e54007fb2 /lib/libc
parentKNF (diff)
downloadwireguard-openbsd-d0af958b33900a53100583be24a0f64b2c72e0e7.tar.xz
wireguard-openbsd-d0af958b33900a53100583be24a0f64b2c72e0e7.zip
Implement KERN_PROC2 sysctl from NetBSD. This will allow us to
have ps and friends be independent of changes in struct proc et al in the kernel. OK deraadt@
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/sysctl.314
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3
index f47d4df0704..21457a4a0c8 100644
--- a/lib/libc/gen/sysctl.3
+++ b/lib/libc/gen/sysctl.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sysctl.3,v 1.118 2004/01/02 21:44:03 mcbride Exp $
+.\" $OpenBSD: sysctl.3,v 1.119 2004/01/07 02:13:51 millert Exp $
.\"
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@@ -366,7 +366,8 @@ information.
.It Dv KERN_OSTYPE No " string no"
.It Dv KERN_OSVERSION No " string no"
.It Dv KERN_POSIX1 No " integer no"
-.It Dv KERN_PROC No " struct proc no"
+.It Dv KERN_PROC No " struct kinfo_proc no"
+.It Dv KERN_PROC2 No " struct kinfo_proc2 no"
.It Dv KERN_PROC_ARGS No " node not applicable"
.It Dv KERN_PROF No " node not applicable"
.It Dv KERN_RAWPARTITION No " integer no"
@@ -590,6 +591,15 @@ The third and fourth level names are as follows:
.It Dv KERN_PROC_TTY No " A tty device"
.It Dv KERN_PROC_UID No " A user ID"
.El
+.It Dv KERN_PROC2
+Like
+.Dv KERN_PROC
+but an array of
+.Li struct kinfo_proc2
+structures is returned.
+The fifth level name is the size of the
+.Li struct kinfo_proc2
+and the sixth level name is the number of structures to return.
.It Dv KERN_PROC_ARGS
Returns the arguments or environment of a process.
The third level name is the PID of the process.