Massive patch for the first months work adding System FC to GHC #35
[ghc-hetmet.git] / rts / win32 / ConsoleHandler.c
index d7096db..308b77b 100644 (file)
@@ -46,6 +46,14 @@ initUserSignals(void)
     return;
 }
 
+void
+finiUserSignals(void)
+{
+    if (hConsoleEvent != INVALID_HANDLE_VALUE) {
+        CloseHandle(hConsoleEvent);
+    }
+}
+
 /*
  * Function: shutdown_handler()
  *
@@ -180,10 +188,8 @@ void startSignalHandlers(Capability *cap)
  */
 void markSignalHandlers (evac_fn evac)
 {
-    if (console_handler >= 0) {
-       StgPtr p = deRefStablePtr((StgStablePtr)console_handler);
-       evac((StgClosure**)(void *)&p);
-    }
+    // nothing to mark; the console handler is a StablePtr which is
+    // already treated as a root by the GC.
 }