pid rollover?

Boyd Roberts boyd at necisa.necisa.oz
Mon Feb 6 09:17:57 AEST 1989


In article <12118 at rpp386.Dallas.TX.US> jfh at 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 at necisa.necisa.oz

``When the going gets wierd, the weird turn pro...''



More information about the Comp.unix.wizards mailing list