diff options
author | wosch <wosch@FreeBSD.org> | 1996-10-27 13:29:22 +0000 |
---|---|---|
committer | wosch <wosch@FreeBSD.org> | 1996-10-27 13:29:22 +0000 |
commit | 6a2b58912d99ed7a63c93c709562c58759be8db5 (patch) | |
tree | aed62b5ce8f01b2d8522f6aa84ee674370387b03 | |
parent | 5e5384dadc51c083f793636ed6c8c929b1979ac2 (diff) | |
download | FreeBSD-src-6a2b58912d99ed7a63c93c709562c58759be8db5.zip FreeBSD-src-6a2b58912d99ed7a63c93c709562c58759be8db5.tar.gz |
Move static variable nextpid out from fork1(). Now top(1) can print
last pid value.
-rw-r--r-- | sys/kern/kern_fork.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index be88314..ab1836f 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_fork.c 8.6 (Berkeley) 4/8/94 - * $Id: kern_fork.c,v 1.25 1996/08/22 03:50:18 julian Exp $ + * $Id: kern_fork.c,v 1.26 1996/09/03 14:21:51 bde Exp $ */ #include "opt_ktrace.h" @@ -113,6 +113,7 @@ rfork(p, uap, retval) int nprocs = 1; /* process 0 */ +static int nextpid = 0; static int fork1(p1, flags, retval) @@ -124,7 +125,7 @@ fork1(p1, flags, retval) register uid_t uid; struct proc *newproc; int count; - static int nextpid, pidchecked = 0; + static int pidchecked = 0; fle_p ep ; ep = fork_list; |