From 5deffec764c31c695f2d3fe3fbfb5d68e963981f Mon Sep 17 00:00:00 2001 From: rwatson Date: Mon, 12 Feb 2001 17:59:01 +0000 Subject: o Export the nextpid variable via SYSCTL as kern.lastpid, decreasing by one the number of variables needed for top and other setgid kmem utilities that could only be accessed via /dev/kmem previously. Submitted by: Thomas Moestl Reviewed by: freebsd-audit --- sys/kern/kern_fork.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 8a9e835..ee5b602 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -148,6 +148,8 @@ rfork(p, uap) int nprocs = 1; /* process 0 */ static int nextpid = 0; +SYSCTL_INT(_kern, OID_AUTO, lastpid, CTLFLAG_RD, &nextpid, 0, + "Last used PID"); /* * Random component to nextpid generation. We mix in a random factor to make -- cgit v1.1