From 510681905e08bb5541d621b631d01cd7bb350228 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Sun, 27 Oct 1996 13:29:22 +0000 Subject: [PATCH] Move static variable nextpid out from fork1(). Now top(1) can print last pid value. --- sys/kern/kern_fork.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index be8831448992..ab1836fd0f7f 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;