Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 taking refuge in the Monastery: (9)
As of 2021-03-04 12:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (104 votes). Check out past polls.

    Notices?