X-Git-Url: https://git.argeo.org/?p=lgpl%2Fargeo-commons.git;a=blobdiff_plain;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Finternal%2Fosgi%2FGogoShellKiller.java;fp=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Finternal%2Fosgi%2FGogoShellKiller.java;h=332f5cb8c0b72d2cf68eba0d4520893276c05220;hp=9de7a4fd13f081497909bc6c08041e321a433400;hb=b95462873703848193e56fcbe997693630db6121;hpb=55d88fba80cec198a0f11ba7545e19878c51fc5e diff --git a/org.argeo.cms/src/org/argeo/cms/internal/osgi/GogoShellKiller.java b/org.argeo.cms/src/org/argeo/cms/internal/osgi/GogoShellKiller.java index 9de7a4fd1..332f5cb8c 100644 --- a/org.argeo.cms/src/org/argeo/cms/internal/osgi/GogoShellKiller.java +++ b/org.argeo.cms/src/org/argeo/cms/internal/osgi/GogoShellKiller.java @@ -30,7 +30,7 @@ class GogoShellKiller extends Thread { return; System.exit(0); // No non-deamon threads left, forcibly halting the VM - //Runtime.getRuntime().halt(0); + // Runtime.getRuntime().halt(0); } private ThreadGroup getRootThreadGroup(ThreadGroup tg) { @@ -56,7 +56,7 @@ class GogoShellKiller extends Thread { Thread[] threads = new Thread[rootThreadGroup.activeCount()]; rootThreadGroup.enumerate(threads, true); for (Thread thread : threads) { - if (thread.getName().equals("pipe-gosh --login --noshutdown")) + if (thread.getName() != null && thread.getName().equals("pipe-gosh --login --noshutdown")) return thread; } return null;