From owner-cvs-src@FreeBSD.ORG Sat Jul 23 01:55:21 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.ORG Delivered-To: cvs-src@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 950A816A41F; Sat, 23 Jul 2005 01:55:21 +0000 (GMT) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.FreeBSD.org (Postfix) with ESMTP id E96CB43D46; Sat, 23 Jul 2005 01:55:20 +0000 (GMT) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.13.4/8.13.4) with ESMTP id j6N1tJUK028554; Sat, 23 Jul 2005 05:55:19 +0400 (MSD) (envelope-from ache@nagual.pp.ru) Received: (from ache@localhost) by nagual.pp.ru (8.13.4/8.13.4/Submit) id j6N1tJ45028552; Sat, 23 Jul 2005 05:55:19 +0400 (MSD) (envelope-from ache) Date: Sat, 23 Jul 2005 05:55:17 +0400 From: Andrey Chernov To: Greg Lehey Message-ID: <20050723015517.GA28428@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Greg Lehey , src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG References: <200507230146.j6N1koqL061690@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200507230146.j6N1koqL061690@repoman.freebsd.org> User-Agent: Mutt/1.5.9i Cc: cvs-src@FreeBSD.ORG, src-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/games/fortune/fortune fortune.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jul 2005 01:55:21 -0000 On Sat, Jul 23, 2005 at 01:46:50AM +0000, Greg Lehey wrote: > grog 2005-07-23 01:46:50 UTC > > FreeBSD src repository > > Modified files: > games/fortune/fortune fortune.c > Log: > Use a random number to seed the random number generator. Goodby, Rush > Limbaugh. > > This should have already worked properly if random(4) has been > initialized correctly, but it seems that this is frequently not the > case. Instead, use the microsecond part of the current time as the > seed. It is already properly and truly randomly initialized, instead of any microseconds tricks. Do you miss srandomdev(); here? -- http://ache.pp.ru/