From: Eric Hartmann Date: Sat, 21 Feb 2015 06:51:55 +0000 (+0100) Subject: Revert "SONAR-6036 Try deleting the memory mapped file at JVM termination" X-Git-Tag: 5.1-RC1~119 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=52d65ce9ab51bb7dcc3868137cfa0f29393e59e3;p=sonarqube.git Revert "SONAR-6036 Try deleting the memory mapped file at JVM termination" This reverts commit 5bea5d7c5dfddf7f824977dd8e3bf93faac66be8. --- diff --git a/server/sonar-process/src/main/java/org/sonar/process/ProcessCommands.java b/server/sonar-process/src/main/java/org/sonar/process/ProcessCommands.java index 192f71226cb..0edd51d3456 100644 --- a/server/sonar-process/src/main/java/org/sonar/process/ProcessCommands.java +++ b/server/sonar-process/src/main/java/org/sonar/process/ProcessCommands.java @@ -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);