X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.workbench%2Fsrc%2Forg%2Fsimantics%2Fworkbench%2Finternal%2FSimanticsWorkbenchApplication.java;h=e69f9066994f62d7fe41c30400ef628a6db5284e;hb=refs%2Fchanges%2F20%2F2820%2F1;hp=aaacddc460addfea176ea7f9ef45794cb7e7ee8e;hpb=93622c2baf328a90b122dd749b63676c72c839f5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/SimanticsWorkbenchApplication.java b/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/SimanticsWorkbenchApplication.java index aaacddc46..e69f90669 100644 --- a/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/SimanticsWorkbenchApplication.java +++ b/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/SimanticsWorkbenchApplication.java @@ -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;