in reply to Re^2: how to exit if tool is already running
in thread how to exit if tool is already running
I have written a small Tool in perl. ... Sometimes accidentally we clicked twice the tool. (emphasis mine)Given this, the complaint about an atomic procedure seems somewhat pedantic for a small (probably Q&D) tool.
Furthermore, you have a problem if the program dies and doesn't get the chance to clean up the special file.Can be handled by either an exit handler or checking to see if the program is already running.
Or if something else removes the file.Write and/or exclusive locks handle this.
Even if it is not how you would do it (possibly for a full blown application), it may well fit the bill for this task.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: how to exit if tool is already running
by JavaFan (Canon) on Aug 13, 2010 at 14:03 UTC |