/* start timing the shutdown */
stat_startExit();
+#if defined(RTS_USER_SIGNALS)
+ freeSignalHandlers();
+#endif
+
#if defined(THREADED_RTS)
ioManagerDie();
#endif
/* stop the ticker */
stopTimer();
-
+
/* reset the standard file descriptors to blocking mode */
resetNonBlockingFd(0);
resetNonBlockingFd(1);
/* free the stable pointer table */
exitStablePtrTable();
+#if defined(PROFILING) || defined(DEBUG)
+ freeProfiling1();
+#endif
+
#if defined(DEBUG)
/* free the thread label table */
freeThreadLabelTable();