[Interest] Detecting if the application is already running from another user account
Nye
kshegunov at gmail.com
Fri Jun 3 15:14:11 CEST 2016
Hello,
Yes, you are correct, I forgot all about that although I was thinking more
of a platform-specific solution. Also the class is somewhat inconvenient as
the behaviour is a bit different on Windows and *nix.
You could try some platform-specific code handling it (e.g. Windows does
allow for global mutexes to be created through the win API), or using
advisory file locking, which would be my choice.
Also opening a local server socket the first time the application is
started could be used to deduce whether the process is running if that
suits you better.
Perhaps QLockFile is a better option (http://doc.qt.io/qt-5/qlockfile.html)
in this case?
Kind regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160603/b15950f2/attachment.html>
More information about the Interest
mailing list