Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: A flock()alypse now

by ferrency (Deacon)
on Jul 02, 2002 at 18:46 UTC ( #178959=note: print w/replies, xml ) Need Help??


in reply to Re: A flock()alypse now
in thread A flock()alypse now

Yeah, that would work too :)

It would be "simplest" if you are familiar with dealing with read/write filehandles. Unfortunately I'm not that familiar with those techniques right now. So it's not "simplest" for me until I learn a bit more.

Thanks for the alternate solution, and a pointer towards more things to learn.

Alan

Replies are listed 'Best First'.
Re: Re: Re: A flock()alypse now
by tomhukins (Curate) on Jul 02, 2002 at 20:20 UTC

    This approach causes data loss if:

    • the process is terminated for any reason (user intervention, exceeding resource limits, system crash)
    • the disk fills up during execution

    If you don't want to risk losing data, use the sentinel locking approach already mentioned by others in this thread.

    However, if the weaknesses of using only a read/write filehandle aren't a problem for you, you might want to look into FileHandle::Rollback.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2019-12-13 05:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?