Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Ensuring only one copy of a perl script is running at a time (race)

by PockMonk (Beadle)
on Dec 19, 2006 at 17:28 UTC ( #590712=note: print w/replies, xml ) Need Help??


in reply to Re^2: Ensuring only one copy of a perl script is running at a time (race)
in thread Ensuring only one copy of a perl script is running at a time

You will be happy to learn that I do use flock on opening the file so there is no danger of what you describe happening.

Rather than locking a file for the duration of the script, I simply lock it while changing its status etc. As posted, this allows me greater flexibility to post more info than just in use/not in use by using the file content to write codes to. Thanks anyway!

Dan
  • Comment on Re^3: Ensuring only one copy of a perl script is running at a time (race)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://590712]
help
Chatterbox?
[Corion]: choroba: I avoided the "fun" of emergency shopping for a new flat iron by trying the flat iron without the timer that sat between it and the mains power. Seems as if just the timer is broken.
[Corion]: marto: Heh, would be cool!
Corion munches on the traditional German winter fruit, strawberries. Imported from Spain at the price of EUR 0.77 per 150g - not really cheap but surprisingly good for a winter produce

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2017-01-20 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (174 votes). Check out past polls.