Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Safely read/write a file simultaneously

by haukex (Bishop)
on May 17, 2018 at 08:01 UTC ( #1214716=note: print w/replies, xml ) Need Help??


in reply to Safely read/write a file simultaneously

Whether or not rename(2) will be atomic depends very much on the operating and file systems. Unfortunately File::Copy's move adds another layer of uncertainty, since it doesn't guarantee to use rename under the hood. But then again, when the rename operation is atomic, it's a great way for updating a file with one writer and many readers (multiple writers still need to coordinate). You might be interested in my module File::Replace.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2020-11-25 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?