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=50e8aada7b3f4cd3c14acdeee796427123db7dab;hb=e88be95edf1f80781646cfdf717ec1b663264179;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..50e8aada7 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(); }