[project @ 2004-05-10 10:26:07 by simonmar]
[ghc-hetmet.git] / ghc / rts / RtsStartup.c
index edbf88a..824c22f 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: RtsStartup.c,v 1.78 2003/09/26 12:12:35 panne Exp $
+ * $Id: RtsStartup.c,v 1.80 2004/03/19 23:17:06 panne Exp $
  *
  * (c) The GHC Team, 1998-2002
  *
@@ -199,7 +199,7 @@ hs_init(int *argc, char **argv[])
 #endif
 
 #ifdef HAVE_LOCALE_H
-    setlocale(LC_ALL,"");
+    setlocale(LC_CTYPE,"");
 #endif
 
     /* Record initialization times */
@@ -324,14 +324,14 @@ hs_exit(void)
     /* start timing the shutdown */
     stat_startExit();
     
-    /* stop all running tasks */
-    exitScheduler();
-    
 #if !defined(GRAN)
     /* Finalize any remaining weak pointers */
     finalizeWeakPointersNow();
 #endif
     
+    /* stop all running tasks */
+    exitScheduler();
+    
 #if defined(GRAN)
     /* end_gr_simulation prints global stats if requested -- HWL */
     if (!RtsFlags.GranFlags.GranSimStats.Suppressed)