From owner-cvs-all Wed Aug 23 15:49:52 2000 Delivered-To: cvs-all@freebsd.org Received: from alcanet.com.au (mail.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with SMTP id 9484137B422; Wed, 23 Aug 2000 15:49:46 -0700 (PDT) Received: by border.alcanet.com.au id <115202>; Thu, 24 Aug 2000 08:49:30 +1000 Content-return: prohibited Date: Thu, 24 Aug 2000 08:49:28 +1000 From: Peter Jeremy Subject: Re: cvs commit: src/games/fortune/datfiles fortunes In-reply-to: <20000823184240.B13773@pavilion.net>; from joe@pavilion.net on Wed, Aug 23, 2000 at 06:42:40PM +0100 To: Josef Karthauser Cc: Nate Williams , Warner Losh , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Mail-followup-to: Josef Karthauser , Nate Williams , Warner Losh , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Message-Id: <00Aug24.084930est.115202@border.alcanet.com.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.2.4i References: <200008231604.KAA11402@nomad.yogotech.com> <20000814003636.A74639@pavilion.net> <200008140753.AAA08038@netplex.com.au> <20000819124824.E88550@lucifer.bart.nl> <20000822161835.B807@dragon.nuxi.com> <20000823091714.D650@pavilion.net> <200008231648.KAA02382@billy-club.village.org> <200008231704.LAA02617@billy-club.village.org> <200008231707.LAA12343@nomad.yogotech.com> <20000823184240.B13773@pavilion.net> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 2000-Aug-23 18:42:40 +0100, Josef Karthauser wrote: >If we had an incrementing number we need locking and a counter file. Which isn't that difficult. Perl provides access to flock() and fcntl() so there would be nothing preventing the commit script from open(SERIAL, '+>/path/to/serial/number'); flock(SERIAL, 2); $serial = 0 + ; print SERIAL $serial + 1, "\n"; close(SERIAL); (with approprate error checking added). I agree that this would add a serialisation operation to the commit process, but the lock should only be held for a fraction of a second and so shouldn't noticably slow down commits. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message