kern.randompid: jot generation senseful?
Bill Moran
wmoran at collaborativefusion.com
Tue May 9 15:05:32 UTC 2006
On Tue, 9 May 2006 16:13:18 +0200
Frank Steinborn <steinex at nognu.de> wrote:
> Nikos Vassiliadis wrote:
> > Isn't kern.randompid a boolean? TRUE or FALSE?
>
> No.
>
> > It is just on or off. 1 means PIDs are random.
> > 0 means PIDs are sequential. to be exact, everything
> > not being 0, is TRUE.
>
> That is not true. Peter Pentchev once wrote:
>
> "The kern.randompid sysctl is not a boolean flag, but an estimate of
> the random value that will be added to each newly created pid. For
> more information, read the comments in src/sys/kern/kern_fork.c before
> the sysctl_kern_randompid() function (around line 150). The function
> itself ignores sysctl settings of less than 2."
Yes, but constantly changing the setting is unneeded. Simply set it
to something large, like 10000, and a random number between 2 and 10000
will be added to the pid of each new child.
--
Bill Moran
Collaborative Fusion Inc.
More information about the freebsd-questions
mailing list