aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--proc/ChangeLog5
-rw-r--r--proc/mgt.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/proc/ChangeLog b/proc/ChangeLog
index 08f100a2..22e4b642 100644
--- a/proc/ChangeLog
+++ b/proc/ChangeLog
@@ -1,3 +1,8 @@
+2001-08-02 Marcus Brinkmann <marcus@gnu.org>
+
+ * mgt.c (genpid): Before checking if NEXTPID is free, check if it
+ is greater than WRAP, and if yes, start over.
+
2001-07-13 Marcus Brinkmann <marcus@gnu.org>
* host.c (S_proc_getexecdata): New variable PORTS_ALLOCATED.
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;