mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-01 23:30:40 -08:00
User break (Ctrl+C) is now captured under windows
This commit is contained in:
parent
7ef23a5341
commit
3daeb3ca60
1 changed files with 13 additions and 0 deletions
|
|
@ -170,6 +170,18 @@ LONG WINAPI W32_exception_filter(struct _EXCEPTION_POINTERS* ep)
|
|||
|
||||
return excpt_result;
|
||||
}
|
||||
|
||||
BOOL WINAPI W32_console_ctrl_handler(DWORD type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
/* Catch CTRL-C */
|
||||
case CTRL_C_EVENT:
|
||||
handle_signal(SIGINT);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
|
|
@ -182,6 +194,7 @@ init_unixint(void)
|
|||
#endif
|
||||
#ifdef _MSC_VER
|
||||
SetUnhandledExceptionFilter(W32_exception_filter);
|
||||
SetConsoleCtrlHandler(W32_console_ctrl_handler, TRUE);
|
||||
#endif
|
||||
ECL_SET(@'si::*interrupt-enable*', Ct);
|
||||
ecl_interrupt_enable = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue