in reply to Re: Re: Determine if script is already running
in thread Determine if script is already running
Nitrox,
As I indicated in my first post. Using a lock file by itself, regardless of type, will not guarantee only a single copy of a script is running in Unix. This is because it is possible to delete a file that is locked. Using the /tmp directory most likely increases the odds of deletion by its nature. The subsequent instance of the script is able to create and lock the new file - and now you have two copies running. You really need to have multiple methods for validation and checking the process table is a good place to start.
As I indicated in my first post. Using a lock file by itself, regardless of type, will not guarantee only a single copy of a script is running in Unix. This is because it is possible to delete a file that is locked. Using the /tmp directory most likely increases the odds of deletion by its nature. The subsequent instance of the script is able to create and lock the new file - and now you have two copies running. You really need to have multiple methods for validation and checking the process table is a good place to start.
Cheers - L~R
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: Determine if script is already running
by Nitrox (Chaplain) on Mar 04, 2003 at 21:44 UTC | |
by Limbic~Region (Chancellor) on Mar 04, 2003 at 21:53 UTC |
In Section
Seekers of Perl Wisdom