/* -----------------------------------------------------------------------------
- * $Id: RtsStartup.c,v 1.15 1999/07/02 09:31:54 simonmar Exp $
+ * $Id: RtsStartup.c,v 1.17 1999/07/06 15:33:23 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
end_init();
}
+/*
+ * Shutting down the RTS - two ways of doing this, one which
+ * calls exit(), one that doesn't.
+ *
+ * (shutdownHaskellAndExit() is called by System.exitWith).
+ */
+void
+shutdownHaskellAndExit(int n)
+{
+ OnExitHook();
+ shutdownHaskell();
+ stg_exit(n);
+}
+
void
shutdownHaskell(void)
{
/*
- * called from STG-land to exit the program cleanly
+ * called from STG-land to exit the program
*/
void
#ifdef PAR
par_exit(n);
#else
- OnExitHook();
exit(n);
#endif
}
+