Burkhard Carstens wrote:
> Am Donnerstag, 28. September 2006 22:41 schrieb John vd Waeter:
> > 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
>
> Put you PID in that file. That way, another instance can read that file
> (if it exists) and check, if a process with that PID is still active.
> If not, it's a likely, that the previous instance crashed ..
>
> Sure, this -might- also give a false positive (prev. inst. crashed, and
> another process got the very same PID in the meantime ..), but that's
> pretty unlikely ..
That's why it's always smart to check the /proc/[pid]/cmdline too.
Thanks!
--
Al
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives