Is there a way to mark a perl script to be ran as a single process only?
The problem:
I have a perl script that takes 3-5 seconds to run (Very large databases)
If I mess up and double click on the submit button, a second process is
spawned off. This completely slows down the first process and takes twice
as long to process. As for a test, I clicked the submit button 20 times
and it spawned off 20 processes and totally slowed down the server for a
long while.
I want the server to reject the script from running more then 1 process.
Is this a perl thing where I have to encode in the script to check for
other copies being ran? Or is there an access right that can be set where
it only allows 1 copy to be ran?
This is not a public script. There are 5 people that access this script on
a regular basis.
Thanks in advance.