Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

RE: Re: Flocking

by takshaka (Friar)
on Jun 23, 2000 at 06:42 UTC ( [id://19545]=note: print w/replies, xml ) Need Help??


in reply to Re: Flocking
in thread Flocking

flock blocks until the lock is acquired. That is, LOCK_EX doesn't return until all current shared locks are released, and LOCK_SH doesn't return until any exclusive lock is released. Normally, you don't check to see if a file has been locked, you simply ask for the lock and go about your business.

This is all in the perlfunc manpage, though the 5.6 docs are clearer...

Two potentially non-obvious but traditional flock
semantics are that it waits indefinitely until the
lock is granted, and that its locks merely
advisory.  Such discretionary locks are more
flexible, but offer fewer guarantees.  This means
that files locked with flock may be modified by
programs that do not also use flock.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://19545]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (9)
As of 2024-04-19 06:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found