Re: Is program open already?



In article <4388489c$0$18242$ba620e4c@xxxxxxxxxxxxxx>
maghardsoft@xxxxxxxxx "Boss" writes:

> Hello.
> Well, all the answers are very interresting, but i suggest you take
> attention to this :
> - using a file to identify the running of your program is not a good
> solution in a
> network environnement with many users because a file is PERSISTENT ;
> therefore, if your program crashes (i know, it never append ..), the
> file is
> not removed and your program is definitively locked.

I think it rather depends on what you want to achieve; I _like_
that idea that the application is locked and that a user phone me
to report a problem. I find this better than "just restarting"
when perhaps there is some database corruption that could get
much worse unless corrective action is taken immediately.

Inspecting the "lock" file also lets me know which user was
running the app when it failed, so I can ask that user what they
saw happen...

Just my 2p

Pete
--
"We have not inherited the earth from our ancestors,
we have borrowed it from our descendants."
.