Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!lll-winken!sun-barr!newstop!texsun!convex!news From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.lang.perl Subject: Re: semaphores/locking Keywords: path,truncation Message-ID: <1991Mar21.024942.19189@convex.com> Date: 21 Mar 91 02:49:42 GMT References: <1991Mar21.020236.16244@convex.com> Sender: news@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 13 Nntp-Posting-Host: pixel.convex.com (forget to change the subject line and clobber the references, tim?) From the keyboard of barn@convex.com: :Does anybody have a mechanism for semaphoring exclusive access to :multiple instances of a perl script (for the purpose of accessing files :and directories). I especially desire a mechanism without race conditions :(using Test-And-Set type features of someone's hardware). Thanks! tim_ While I'm not entirely sure what's being asked for here, I'd think flock or fcntl would work. You shouldn't have to get down to the assembly level just to lock a file. --tom