Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Avoid multiple process writing to a file at the same time

by kkavitha (Initiate)
on Sep 30, 2009 at 11:10 UTC ( [id://798289]=perlquestion: print w/replies, xml ) Need Help??

kkavitha has asked for the wisdom of the Perl Monks concerning the following question:

I have a perl project, one of the module in this project is writing some data into a file(specific to host). While running this project more than once at the same time, data in the file gets collpased. Because, more than one process is writing to the file at the same time. How to lock the file handle of that file? How to unlock the file handle once writing/reading done?

Thanks N Advance, Kavitha

  • Comment on Avoid multiple process writing to a file at the same time

Replies are listed 'Best First'.
Re: Avoid multiple process writing to a file at the same time
by ccn (Vicar) on Sep 30, 2009 at 11:15 UTC
Re: Avoid multiple process writing to a file at the same time
by BioLion (Curate) on Sep 30, 2009 at 11:39 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 14:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found