Another way, that is easier to control, is to use mutexes.
Mutex is a place in memory that is locked until someone free it. So
you can check if that place (usually mapped to a name, alto I do not
remember at the moment how Linux implement it) exists, and if so, you
stop your own execution, otherwise you can continue the loading.

Ido

On 9/28/06, Bogusław Brandys <[EMAIL PROTECTED]> wrote:
Alejandro Lucas Baldres wrote:
> My plataform i386 with Linux (ubuntu dapper 6.06), the future of program
> is free and opensource.
> I want the program disallow more then one instance.

The simplest solution: let program check if /tmp/<filename> file exists
and create it,then on exit delete.If file exists then instance is
already running.
More complex would be using IPC (maybe others could describe)

Regards
Boguslaw

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to