[Qt-interest] [OT] How to create single instance app?

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Fri May 7 17:27:32 CEST 2010


Konrad Rosenbaum wrote on Friday, May 07, 2010 4:24 PM:

> ...
> Single instance per what?
> ...
> * per universe?
> 
> Short answer: put a lock file in an appropriate place

That would then be Alpha Centauri, I guess. Unfortunatelly it then takes some time to create and query the state of the lock file, with a "ping time" of 4.35 years it takes roughly 9 years for your app to start (or it might then even decide to quit ;) But it would be guaranteed to be unique - at least in the Alpha Centauri system and friends :)

Refer also to http://heasarc.gsfc.nasa.gov/docs/cosmic/nearest_star_info.html

Have a nice week-end,
  Oliver
-- 
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22



More information about the Qt-interest-old mailing list