<mailto:
address@hidden>> wrote:
Does anyone understand what problem the w32_* functions in
liboctave/cruft/misc/cquit.c are trying to solve? They don't
compile properly on 64-bit Windows systems because of the use of the
Eip field in the thread context structure. A binary that I compiled
without them for 64-bit Windows (MinGW) appears to handle Control-C
interrupts at the command line properly. Perhaps these functions
were needed at some time in the past, but are they really needed now?
The main problem is that CTRL-C handling is not performed in the main
thread under Win32, but in a separate thread (created by the system). So
to execute the SIGINT handler synchronously with the main octave thread
(and really interrupt it), that specific code is interrupting the main
thread and overwriting the EIP register to dispatch it to the signal
handler. AFAIK, this code is borrowed from CLISP and was originally
written by Bruno Haible.