On Thu, 16 Oct 2008, Brad Campbell wrote:

> G'day all,
> 
> I've been having a play with simpleipc.pp for trying to do cross-platform
> single instance detection.
> 
> Ordinarily it behaves perfectly, but I just noticed on Linux that it all comes
> crashing down if the server application crashes without removing the pipe.
> 
> I then have to manually remove the pipe to be able to start the server again.
> 
> Has anyone come up against this, or similar previously?
> I'm somewhat stumped as to how to go about solving this as I can't find a
> reliable way of detecting a listener on the end of the pipe.

You could write the server process id to a file, and detect whether the process
is still alive.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to