projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the licence file to the Windows installer. Fixes #3934
[ghc-hetmet.git]
/
rts
/
win32
/
ConsoleHandler.c
diff --git
a/rts/win32/ConsoleHandler.c
b/rts/win32/ConsoleHandler.c
index
2cd10ec
..
19057a3
100644
(file)
--- a/
rts/win32/ConsoleHandler.c
+++ b/
rts/win32/ConsoleHandler.c
@@
-5,10
+5,8
@@
#include "Rts.h"
#include <windows.h>
#include "ConsoleHandler.h"
#include "Rts.h"
#include <windows.h>
#include "ConsoleHandler.h"
-#include "SchedAPI.h"
#include "Schedule.h"
#include "RtsUtils.h"
#include "Schedule.h"
#include "RtsUtils.h"
-#include "RtsFlags.h"
#include "AsyncIO.h"
#include "RtsSignals.h"
#include "AsyncIO.h"
#include "RtsSignals.h"
@@
-119,6
+117,12
@@
void initDefaultHandlers(void)
}
}
}
}
+void resetDefaultHandlers(void)
+{
+ if ( !SetConsoleCtrlHandler(shutdown_handler, FALSE) ) {
+ errorBelch("warning: failed to uninstall default console handler");
+ }
+}
/*
* Function: blockUserSignals()
/*
* Function: blockUserSignals()
@@
-234,6
+238,9
@@
static BOOL WINAPI generic_handler(DWORD dwCtrlType)
stg_pending_buf[stg_pending_events] = dwCtrlType;
stg_pending_events++;
}
stg_pending_buf[stg_pending_events] = dwCtrlType;
stg_pending_events++;
}
+
+ // we need to wake up awaitEvent()
+ abandonRequestWait();
#endif
return TRUE;
}
#endif
return TRUE;
}