I am developing under ubuntu 16.04. The issue I run into is: I want to detect whether the user has already started the application, if yes, it exits directly.
I have tried using QLocalServer
, QSharedMemory
to achieve that.
But the problem is:
If the program crash without properly close the local server or destroy the shared memory, the local socket/shared memory will remain in the OS and prevent the user to launch the program again.
How to deal with this?