Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

flock() usage

by kidd (Curate)
on Jul 01, 2002 at 14:46 UTC ( #178572=perlquestion: print w/ replies, xml ) Need Help??
kidd has asked for the wisdom of the Perl Monks concerning the following question:

Hello... Im creating a script wich handles a lot of files, and its intended to be used by several people at the same time.

I know there is a way you can lock a file so while its opened no one can edit it at the same time.

I've seen several scripts use flock() but I never used it so I don't know how to.

If someone could point me to a tutorial or give some of the basics of this function it would be great, and if you have another suggestion please tell me...

Comment on flock() usage
Replies are listed 'Best First'.
Re: flock() usage
by broquaint (Abbot) on Jul 01, 2002 at 14:53 UTC
Re: flock() usage
by screamingeagle (Curate) on Jul 01, 2002 at 17:48 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://178572]
Approved by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2015-08-28 02:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (334 votes), past polls