]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.workbench/src/org/simantics/workbench/internal/SimanticsWorkbenchApplication.java
Allow "doNotSynchronizeOntologies" to work.
[simantics/platform.git] / bundles / org.simantics.workbench / src / org / simantics / workbench / internal / SimanticsWorkbenchApplication.java
index aaacddc460addfea176ea7f9ef45794cb7e7ee8e..e69f9066994f62d7fe41c30400ef628a6db5284e 100644 (file)
@@ -193,7 +193,9 @@ public class SimanticsWorkbenchApplication implements IApplication, IExecutableE
                 try {
                     Thread.sleep(delayMs);
                     LOGGER.warn("Delayed shutdown forced the application to exit with code {}.", exitCode);
-                    System.exit(exitCode);
+                    // Method halt is used instead of System.exit, because running
+                    // of shutdown hooks hangs the application in some cases.
+                    Runtime.getRuntime().halt(exitCode);
                 } catch (InterruptedException e) {
                     e.printStackTrace();
                 }
@@ -219,6 +221,7 @@ public class SimanticsWorkbenchApplication implements IApplication, IExecutableE
                 SimanticsArguments.EXPERIMENT,
                 SimanticsArguments.DISABLE_INDEX,
                 SimanticsArguments.DATABASE_ID,
+                SimanticsArguments.DO_NOT_SYNCHRONIZE_ONTOLOGIES
         };
         IArguments result = Arguments.parse(args, accepted);
         return result;