summaryrefslogtreecommitdiff
path: root/proc/mgt.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2001-08-02 03:30:12 +0000
committerMarcus Brinkmann <marcus@gnu.org>2001-08-02 03:30:12 +0000
commit7623ec54a0fe4d5a5cc065de9478825854406a06 (patch)
treef6f0fda27fda1117ad060b5c1890fd23b9174796 /proc/mgt.c
parent347e5e932ccd4b01fe3e6531a3b897624ce37c21 (diff)
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.
Diffstat (limited to 'proc/mgt.c')
-rw-r--r--proc/mgt.c6
1 files changed, 6 insertions, 0 deletions
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;