Subject: Re: PID_MAX and NO_PID
To: Luke Mewburn <lukem@netbsd.org>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: tech-kern
Date: 12/18/2002 11:55:24
On Wed, Dec 18, 2002 at 07:40:24PM +1100, Luke Mewburn wrote:
> On Wed, Dec 18, 2002 at 09:27:44AM +0100, Jaromir Dolecek wrote:
>   | 
>   | There is another issue that some of compat/* have 16bit
>   | PIDs. So we could safely raise PID_MAX to little bit less
>   | than SHRT_MAX-1, i.e. 32766. After that, care has to be
>   | taken.
> 
> Which ones are they?
> How insane would it be to restrict it to SHRT_MAX-1 if those COMPAT
> options are enabled, otherwise 99999 ?

Another option might be, by default at least, to do something like we
do for ptys: allocate pids for native processes from the > 16-bit part
of the space first, saving pids for iBCS2 binaries in the low part of
the space.  If we believe that iBCS2 binaries are unlikely to need to
refer to native processes by pid (possible, though handling getppid()
might be a bit iffy) this might work.

-- 
 Thor Lancelot Simon	                                      tls@rek.tjls.com
   But as he knew no bad language, he had called him all the names of common
 objects that he could think of, and had screamed: "You lamp!  You towel!  You
 plate!" and so on.              --Sigmund Freud