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 <tmoestl@gmx.net>
Reviewed by:	freebsd-audit
This commit is contained in:
Robert Watson 2001-02-12 17:59:01 +00:00
parent 8684bec007
commit d941d4752c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=72418

View File

@ -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