From: Steven A. <au...@wa...> - 2005-01-23 22:11:45
|
Brian D. Carlstrom wrote: > Shutdown hooks are being run when Runtime.exit is called but not if the > "main" method returns normally. The javadoc for Runtime.addShutdownHook > confirms that it should run in this case: > > http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html#addShutdownHook(java.lang.Thread) > > The Java virtual machine shuts down in response to two kinds of events: > - The program exits normally, when the last non-daemon thread exits or > when the exit (equivalently, System.exit) method is invoked It seems clear that our behavior is broken. I am not positive, though, about the replacement of calls to VM.sysExit() with calls to VM.exit(). I will want to examine this more closely before I take in this patch. I don't have the time to do so right now, but I should be able to do it tonight or tomorrow (Monday). > PS: I didn't see any reply on my PIC compilation option patch. The > second post seems to have gone through. Any comments? It seems like it's obviously the right thing to do. I've now handled this in a separate letter. --Steve Augart |