dont go into an infinite loop if we shut down before the log manager was fully created

(since the appContext creates a log manager if one doesn't exist, and that create will fail
if we're shutting down, and it'll create a log manager to log the fact that its failing, etc)
This commit is contained in:
jrandom
2004-04-26 03:32:59 +00:00
committed by zzz
parent 4ce9fb5b5a
commit 5bf1658d9a

View File

@ -102,7 +102,11 @@ public class LogManager {
t.setName("LogWriter"); t.setName("LogWriter");
t.setDaemon(true); t.setDaemon(true);
t.start(); t.start();
Runtime.getRuntime().addShutdownHook(new ShutdownHook()); try {
Runtime.getRuntime().addShutdownHook(new ShutdownHook());
} catch (IllegalStateException ise) {
// shutdown in progress, fsck it
}
//System.out.println("Created logManager " + this + " with context: " + context); //System.out.println("Created logManager " + this + " with context: " + context);
} }
private LogManager() {} private LogManager() {}