You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by od...@apache.org on 2007/10/15 17:20:32 UTC

svn commit: r584804 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c

Author: odeakin
Date: Mon Oct 15 08:20:32 2007
New Revision: 584804

URL: http://svn.apache.org/viewvc?rev=584804&view=rev
Log:
Adding DetachCurrentThread() call to main.c after discussion on dev list:
http://mail-archives.apache.org/mod_mbox/harmony-dev/200710.mbox/%3c470F9FFB.4050109@googlemail.com%3e

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c?rev=584804&r1=584803&r2=584804&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c Mon Oct 15 08:20:32 2007
@@ -752,7 +752,9 @@
       hymem_free_memory (mainClassJar);
     }
 
-  // by spec we must call DestroyJavaVM without detaching main thread
+  /* Updated in the 6.0 spec, we can now detach the main thread before calling DestroyJavaVM, 
+     and we must if we wish main thread uncaught exception handlers to be called. */
+  (*jvm)->DetachCurrentThread(jvm);
   (*jvm)->DestroyJavaVM (jvm);
   /*if ((*jvm)->DestroyJavaVM(jvm)) {
      hytty_printf (PORTLIB, "Failed to destroy JVM\n");