Problem when program crashes. File is not deleted. Maybe refresh file every 5 minutes or so, put a timestamp in it. If timestamp older then 5 minutes, program appearantly crashed, new instance may start.

John


Bogusław Brandys 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




--
John vd Waeter
mailto:[EMAIL PROTECTED]
http://www.jvdw.nl
http://www.shotinthedark.nl

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

Reply via email to