[comp.lang.perl] semaphores/locking

tchrist@convex.COM (Tom Christiansen) (03/21/91)

(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