From 7623ec54a0fe4d5a5cc065de9478825854406a06 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Thu, 2 Aug 2001 03:30:12 +0000 Subject: 2001-08-02 Marcus Brinkmann * mgt.c (genpid): Before checking if NEXTPID is free, check if it is greater than WRAP, and if yes, start over. --- proc/mgt.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'proc/mgt.c') diff --git a/proc/mgt.c b/proc/mgt.c index 5e28bfc0..1291a80b 100644 --- a/proc/mgt.c +++ b/proc/mgt.c @@ -848,6 +848,12 @@ genpid () int wrapped = 0; + if (nextpid > wrap) + { + nextpid = START_OVER; + wrapped = 1; + } + while (!pidfree (nextpid)) { ++nextpid; -- cgit v1.2.3