[svlug] Reuse of pid's.

Karen Shaeffer shaeffer at neuralscape.com
Thu Jan 22 22:29:54 PST 2009


On Thu, Jan 22, 2009 at 06:08:44PM -0800, Chris Miller wrote:
> 
> IIRC, Linux handles PIDs as 32-bit unsigned integers.  You'd have to
> create somewhere around 4,294,967,295 processes in the few seconds
> that killall is running in order to encounter this issue.

(smiles ;)

#define PID_MAX_DEFAULT (CONFIG_BASE_SMALL ? 0x1000 : 0x8000)

For most kernels, that is 32768 for a default max pid value.

#define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : \
        (sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT))

If you want more, then you can increase the max to 4,194,304 pids.

Thanks,
Karen
-- 
 Karen Shaeffer
 Neuralscape, Palo Alto, Ca. 94306
 shaeffer at neuralscape.com  http://www.neuralscape.com




More information about the svlug mailing list