Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Order of flock and open

by converter (Priest)
on Apr 30, 2003 at 16:46 UTC ( #254377=note: print w/ replies, xml ) Need Help??


in reply to Order of flock and open

Since flock() can fail after a successful open(), you should make sure that your open() isn't destructive. In other words, if you're opening a file for writing, open it in such a way that if the file exists and contains data it won't be truncated.

Check out the links to Dominus' File Locking Tricks and Traps slides in the Question about Flock and die thread for more details.


Comment on Re: Order of flock and open
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2015-08-03 10:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (30 votes), past polls