|
From: Gunter K. <gu...@pe...> - 2018-05-05 11:52:36
|
Dear all,
td;lr: If we could make a clisp-compiled maxima react to the
CTRL_C_EVENT window sends on encountering a Ctrl+C press we could tell
wxMaxima to interrupt the current command on a Ctrl+G press.
I would need help in creating a Ctrl+C handler, though.
The long version of the story:
If on a Linux system the user presses Ctrl+G wxMaxima and Xmaxima send a
SIGINT signal to maxima - and maxima aborts the current command.
On Windows there is no such signal. But maxima comes with a utility
named winkill.exe that writes to a shared memory location maxima offers.
The sbcl and the gcl flavour of maxima by setting an environment
variable can be instructed to create a 2nd thread that polls this memory
location and interrupts the current calculation on incoming signals.
As the lisps evolve that might no more be necessary: If winkill.exe
would issue an
GenerateConsoleCtrlEvent(CTRL_C_EVENT, m_pid)
an sbcl-based maxima would receive a keyboard interrupt and interrupt
the current program. Unfortunately I cannot test if the same is true
with maxima-gcl.
If maxima is compiled with clisp on linux it reacts to a SIGINT caused
by a Ctrl+C press. On windows it currently doesn't, though. If I issue a
CTRL_BREAK_EVENT instead clisp crashes. Which might be feature that
falls back to an eventual debugger.
Does any of you know if there is a way to make clisp react to the
CTRL_C_EVENT on Windows?
Thanks a lot,
and kind regards,
Gunter.
|