Michael Van Canneyt wrote:
On Wed, 14 Jun 2006, Andreas Berger wrote:
Does Lazarus have a cross-platform way of guaranteeing that only one
instance of the program can run? I know how to do this in windows but
would like to use a cross-platform approach for my Lazarus apps. It
would also be nice (but not necessary) if I could receive a handle or
other access method of the first running instance.
You can do the same as on Windows, only the actual calls will differ.
It would be nice to wrap these calls in a component...
Michael.
Good news is that in Turbo Power OnGuard component that I'm porting to
fpc/lazarus there is a unit for this.However under linux there is no
certain way to do it.It is done by using defined filename but
unfortunately there is no way to automatically delete this file on
crash.When application crashes this file must be removed manually :-(
I have found also situation when mutex used under windows is not
released when application hang (this is however rare)
Regards
Boguslaw Brandys
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives