Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: A flock()alypse now

by ferrency (Deacon)
on Jul 02, 2002 at 18:46 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://178959]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-03-29 14:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found