X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Finternal%2Fosgi%2FGogoShellKiller.java;h=332f5cb8c0b72d2cf68eba0d4520893276c05220;hb=a9b4ba6cd79a32b092e24ebfa907ecf90f0cf938;hp=9de7a4fd13f081497909bc6c08041e321a433400;hpb=7a6b6170a008b82ad0c4feebca5cd9273a573a2a;p=lgpl%2Fargeo-commons.git 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;