Set a console Ctrl handler for Windows
authorDavid Lichteblau <david@lichteblau.com>
Mon, 10 Dec 2012 12:56:17 +0000 (13:56 +0100)
committerDavid Lichteblau <david@lichteblau.com>
Fri, 21 Dec 2012 19:32:21 +0000 (20:32 +0100)
commit935edfc8f060a4fda050a66fcb7e631a81c490c6
tree4e1b275d7d2616721ce10a8abb9bf9dacc7b44e5
parent79721a8731b8582ad8df664c2c4e04bd3d6090c6
Set a console Ctrl handler for Windows

Install a Lisp callback using SetConsoleCtrlHandler, allowing users
to interrupt SBCL using C-c in the Windows console.

We cannot currently control the size of the stack available to us in
this handler, but since we are mainly only calling INTERRUPT-THREAD,
even a small stack might be sufficient for our purposes.

Thanks to Anton Kovalenko.
src/code/target-signal.lisp
src/code/warm-mswin.lisp