diff options
author | rwatson <rwatson@FreeBSD.org> | 2001-02-12 17:59:01 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2001-02-12 17:59:01 +0000 |
commit | 5deffec764c31c695f2d3fe3fbfb5d68e963981f (patch) | |
tree | f782d976c8a1431e0ee71e38a3c0c57f4b3694e0 /sys | |
parent | 64c001d954b285cf694f4623d48a8e6a4d96e78c (diff) | |
download | FreeBSD-src-5deffec764c31c695f2d3fe3fbfb5d68e963981f.zip FreeBSD-src-5deffec764c31c695f2d3fe3fbfb5d68e963981f.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_fork.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 |