FIX part of #2301, and #1619
[ghc-hetmet.git] / rts / win32 / ConsoleHandler.c
index 2cd10ec..25472cf 100644 (file)
@@ -119,6 +119,12 @@ void initDefaultHandlers(void)
     }
 }
 
+void resetDefaultHandlers(void)
+{
+    if ( !SetConsoleCtrlHandler(shutdown_handler, FALSE) ) {
+       errorBelch("warning: failed to uninstall default console handler");
+    }
+}
 
 /*
  * Function: blockUserSignals()