]> source.dussan.org Git - sonarqube.git/commitdiff
Revert "SONAR-6036 Try deleting the memory mapped file at JVM termination"
authorEric Hartmann <hartmann.eric@gmail.com>
Sat, 21 Feb 2015 06:51:55 +0000 (07:51 +0100)
committerEric Hartmann <hartmann.eric@gmail.com>
Sat, 21 Feb 2015 06:51:55 +0000 (07:51 +0100)
This reverts commit 5bea5d7c5dfddf7f824977dd8e3bf93faac66be8.

server/sonar-process/src/main/java/org/sonar/process/ProcessCommands.java

index 192f71226cbea177c1b4f4d67cb5c241fd31afba..0edd51d34565770dea8853d048edd5347e4be84f 100644 (file)
@@ -82,10 +82,7 @@ public class ProcessCommands {
     }
 
     try {
-      File file = new File(directory, "sharedmemory");
-      file.deleteOnExit();
-
-      sharedMemory = new RandomAccessFile(file, "rw");
+      sharedMemory = new RandomAccessFile(new File(directory, "sharedmemory"), "rw");
       mappedByteBuffer = sharedMemory.getChannel().map(FileChannel.MapMode.READ_WRITE, 0, MAX_SHARED_MEMORY);
     } catch (IOException e) {
       throw new IllegalArgumentException("Unable to create shared memory : ", e);