From f8e6bd8c6b1524cfdcf9e15c552863269c7affbb Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Fri, 3 Feb 2017 10:53:26 -0800 Subject: [PATCH] Allow multiple instances to run if environment variable is set If the environment variable HIFI_ALLOW_MULTIPLE_INSTANCES is present, the value is ignored, then you can have multiple copies of interface running on the same machine. --- interface/src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/interface/src/main.cpp b/interface/src/main.cpp index d33dba535e..39b37e3d19 100644 --- a/interface/src/main.cpp +++ b/interface/src/main.cpp @@ -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;