Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!munnari!otc!softway!necisa!boyd From: boyd@necisa.necisa.oz (Boyd Roberts) Newsgroups: comp.unix.wizards Subject: Re: pid rollover? Message-ID: <763@necisa.necisa.oz> Date: 5 Feb 89 23:17:57 GMT References: <460@oglvee.UUCP> <1800007@spdyne> <923@auspex.UUCP> <12118@rpp386.Dallas.TX.US> Organization: NEC Information Systems Australia Pty. Ltd. Lines: 21 Reply-To: In article <12118@rpp386.Dallas.TX.US> jfh@rpp386.Dallas.TX.US (John F. Haugh II) writes: > for (pp = proc;pp < v.ve_proc;pp++) > if (pp->p_stat && pp->p_pid == mpid) /* oops, exists */ > goto again; > Guess again, bozo. You've also got to check for p->p_pgrp clashes. You can't have mpid == an active process group id. Enough of this discussion. Obviously 30000 was chosen as a "nice" number that fits into a signed 16 bit int. And, yes, I'm sure it's not interesting modulo Jon Bon Jovi's short size. Who cares about p->p_pid? As long as it's unique and != any active pgrp. Boyd Roberts NEC Information Systems Australia boyd@necisa.necisa.oz ``When the going gets wierd, the weird turn pro...''