Merge pull request #9604 from hyperlogic/feature/allow-multiple-instances

Allow multiple instances to run if environment variable is set
This commit is contained in:
Clément Brisset 2017-02-07 15:32:31 -08:00 committed by GitHub
commit eb0a316b6f

View file

@ -74,6 +74,11 @@ int main(int argc, const char* argv[]) {
instanceMightBeRunning = !sharedMemory.create(1, QSharedMemory::ReadOnly);
#endif
// allow multiple interfaces to run if this environment variable is set.
if (QProcessEnvironment::systemEnvironment().contains("HIFI_ALLOW_MULTIPLE_INSTANCES")) {
instanceMightBeRunning = false;
}
if (instanceMightBeRunning) {
// Try to connect and send message to existing interface instance
QLocalSocket socket;