From owner-freebsd-questions@FreeBSD.ORG Tue May 9 15:05:32 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 71FC616A40D for ; Tue, 9 May 2006 15:05:32 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 079E143D75 for ; Tue, 9 May 2006 15:05:26 +0000 (GMT) (envelope-from wmoran@collaborativefusion.com) Received: from vanquish.pgh.priv.collaborativefusion.com (vanquish.pgh.priv.collaborativefusion.com [192.168.2.61]) (AUTH: PLAIN wmoran, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Tue, 09 May 2006 11:05:24 -0400 id 00056421.4460AFB4.0001747D Date: Tue, 9 May 2006 11:04:44 -0400 From: Bill Moran To: Frank Steinborn Message-Id: <20060509110444.95acb749.wmoran@collaborativefusion.com> In-Reply-To: <20060509141318.88A0FB822@shodan.nognu.de> References: <000a01c67362$f3d1f3d0$01010101@avalon.lan> <200605091622.30492.nvass@teledomenet.gr> <20060509141318.88A0FB822@shodan.nognu.de> Organization: Collaborative Fusion X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.17; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: nospam@mgedv.net, freebsd-questions@freebsd.org, nvass@teledomenet.gr Subject: Re: kern.randompid: jot generation senseful? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2006 15:05:32 -0000 On Tue, 9 May 2006 16:13:18 +0200 Frank Steinborn 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.