Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^9: avoiding a race (roll over)

by BrowserUk (Patriarch)
on Sep 29, 2010 at 21:57 UTC ( [id://862717] : note . print w/replies, xml ) Need Help??


in reply to Re^8: avoiding a race (roll over)
in thread avoiding a race

once an hour has passed you get an e-mail for every single repeat of the same error

To quote my psuedo-code:

a) If it is older than 1 hour: you delete the file; send an email; then move on

As for whether the OP knows what he wants. Not my call. If he changes his spec, then I'd offer a different solution.

I'd also probably close the miniscule window by using O_CREAT | O_EXCL, as discused way back there somewhere.