Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!agate!usenet.ins.cwru.edu!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) Newsgroups: comp.lang.perl Subject: Re: lockf mods Message-ID: <1991Feb9.004504.17548@NCoast.ORG> Date: 9 Feb 91 00:45:04 GMT References: <1991Feb1.074602.25583@robobar.co.uk> <1991Feb02.132117.26077@convex.com> <1991Feb4.214044.2422@robobar.co.uk> Reply-To: allbery@ncoast.ORG (Brandon S. Allbery KB8JRR) Followup-To: comp.lang.perl Organization: North Coast Public Access Un*x (ncoast) Lines: 18 As quoted from <1991Feb4.214044.2422@robobar.co.uk> by ronald@robobar.co.uk (Ronald S H Khoo): +--------------- | I probably meant to say "possibly include a flock() emulator written in | terms of lockf() for sites without flock()" so that perl programs | written with the *perl* flock() function have some chance of working | on stock System V machines ? Is this reasonable? Does flock() map | onto lockf() well enough for this approach to work ? +--------------- Sure. Just lock from bytes 0 to the maximum system file size (*not* to the end of the file! That would still let any process append to the file). ++Brandon -- Me: Brandon S. Allbery VHF/UHF: KB8JRR on 220, 2m, 440 Internet: allbery@NCoast.ORG Packet: KB8JRR @ WA8BXN America OnLine: KB8JRR AMPR: KB8JRR.AmPR.ORG [44.70.4.88] uunet!usenet.ins.cwru.edu!ncoast!allbery Delphi: ALLBERY