Implement the RTS side of GHC.Environment.getFullArgs
[ghc-hetmet.git] / rts / RtsStartup.c
index 1d0fec5..a363c13 100644 (file)
@@ -199,6 +199,7 @@ hs_init(int *argc, char **argv[])
 
     /* Parse the flags, separating the RTS flags from the programs args */
     if (argc != NULL && argv != NULL) {
+       setFullProgArgv(*argc,*argv);
        setupRtsFlags(argc, *argv, &rts_argc, rts_argv);
        setProgArgv(*argc,*argv);
     }
@@ -213,9 +214,6 @@ hs_init(int *argc, char **argv[])
     synchroniseSystem();             // calls initParallelSystem etc
 #endif /* PAR */
 
-    /* Perform initialisation of adjustor thunk layer. */
-    initAdjustor();
-
     /* initialise scheduler data structures (needs to be done before
      * initStorage()).
      */
@@ -459,9 +457,6 @@ hs_exit(void)
     freeThreadLabelTable();
 #endif
 
-    /* free hash table storage */
-    exitHashTable();
-
 #ifdef RTS_GTK_FRONTPANEL
     if (RtsFlags.GcFlags.frontpanel) {
        stopFrontPanel();
@@ -489,6 +484,9 @@ hs_exit(void)
     shutdownAsyncIO();
 #endif
 
+    /* free hash table storage */
+    exitHashTable();
+
     // Finally, free all our storage
     freeStorage();