in reply to Re: self detecting script
in thread self detecting script
So, the obvious solution to this is to put the lockfile cleanup into an END block. However, even that will not work all the time. For example, if you are using a module which was compiled from an XS and that module takes a core dump, you will leave the lockfile behind.
All this is to say that lockfiles have their weaknesses. One way to overcome these flaws is by trying to run your program and checking the presence of the lockfile for, say, average duration of script times a factor of 2. This way, if the lockfile still exists, then it must be a stray file which should be deleted so the script can run.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: self detecting script
by mpeters (Chaplain) on Sep 15, 2005 at 19:57 UTC | |
by gri6507 (Deacon) on Sep 15, 2005 at 20:45 UTC | |
by mpeters (Chaplain) on Sep 15, 2005 at 22:01 UTC | |
by sgifford (Prior) on Sep 15, 2005 at 21:17 UTC | |
|
Re^3: self detecting script
by phaylon (Curate) on Sep 15, 2005 at 18:53 UTC |