]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7168 fix Main JVM and ES JVM sharing same space of sharedMemory
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Thu, 7 Jan 2016 13:18:09 +0000 (14:18 +0100)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Wed, 13 Jan 2016 12:42:43 +0000 (13:42 +0100)
Main JVM is using sharedMemory when sonar.enableStopCommand=true is passed to command line (used by orchestrator to stop SQ) and in such case, it used to use the same sharedMemory space as the first child process it started

server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Monitor.java

index c86748780f7023b4cf7100ee3bd1b8f730e17793..2655bb013490ac165d15cb028fda8674fc2cfc13 100644 (file)
@@ -48,7 +48,7 @@ public class Monitor {
   private RestartRequestWatcherThread restartWatcher;
   @CheckForNull
   private TerminatorThread terminator;
-  static int nextProcessId = 0;
+  static int nextProcessId = 1;
 
   Monitor(JavaProcessLauncher launcher, SystemExit exit) {
     this.launcher = launcher;