in reply to Lock File
If I can find the original node, I'll update with a link to it.use Fcntl 'LOCK_EX', 'LOCK_NB'; unless (flock DATA, LOCK_EX | LOCK_NB) { $logger->fatal("Found duplicate script run. Stopping"); exit; } __DATA__ This exists to allow the locking code at the beginning of the file to +work. DO NOT REMOVE THESE LINES!
Cheers,
Darren
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Lock File
by eyepopslikeamosquito (Archbishop) on Nov 03, 2010 at 08:44 UTC | |
Re^2: Lock File
by JavaFan (Canon) on Nov 03, 2010 at 13:28 UTC | |
by Anonymous Monk on Nov 03, 2010 at 16:38 UTC |