in reply to lock files vs. non-predictable file names
withsystem("/bin/rm $lock_file");
Again you're saving launching another process.unlink($lock_file);
One algorithmic problem with your lockfile approach is that if your process dies (for whatever reason) without removing the lockfile all subsequent runs of the program will think there's already an instance running; even though there isn't.
one last thing.... use strict. Learn what it is and start using it. It will save you much pain as you continue to learn and use perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: lock files vs. non-predictable file names
by RuphSkunk (Acolyte) on Aug 26, 2000 at 01:40 UTC |