aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-process/src/main/java/org/sonar/process/DefaultProcessCommands.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-process/src/main/java/org/sonar/process/DefaultProcessCommands.java')
-rw-r--r--server/sonar-process/src/main/java/org/sonar/process/DefaultProcessCommands.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/sonar-process/src/main/java/org/sonar/process/DefaultProcessCommands.java b/server/sonar-process/src/main/java/org/sonar/process/DefaultProcessCommands.java
index dade6ab6265..7a4182d6cee 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/DefaultProcessCommands.java
+++ b/server/sonar-process/src/main/java/org/sonar/process/DefaultProcessCommands.java
@@ -52,6 +52,15 @@ public class DefaultProcessCommands implements ProcessCommands {
return new DefaultProcessCommands(directory, processNumber, false);
}
+ /**
+ * Clears the shared memory space of the specified process number.
+ */
+ public static void reset(File directory, int processNumber) {
+ try (DefaultProcessCommands processCommands = new DefaultProcessCommands(directory, processNumber, true)) {
+ // nothing else to do than open file and reset the space of specified process
+ }
+ }
+
@Override
public boolean isUp() {
return delegate.isUp();