[Interest] Detecting if the application is already running from another user account

Etienne Sandré-Chardonnal etienne.sandre at m4x.org
Fri Jun 3 15:49:29 CEST 2016


Dear all,

Thanks for all those suggestions. Of course there are platform specific
solutions, but I'd like to keep the code 100% cross platform everywhere
it's possible.

The issue with file locking, is every OS does not have a system-wide
user-writable standard folder. There is /tmp on linux/unix which is
standard, but AFAIK windows only has per-user temporary file, and system
temp which is not user writable.

Also QLocalSocket doesn't do the job under windows, as two processes can
listen on the same name (only one will receive data), the conflict is not
reported by the API.

It seems there is no very good solution.

Thiago : some times ago, you wrote about an extension of the QSharedMemory
API for having opt-in system wide shared memory in a future Qt release. Was
this abandonned?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160603/e00f0745/attachment.html>


More information about the Interest mailing list