octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Special code for handling interrupts on Windows systems


From: Michael Goffioul
Subject: Re: Special code for handling interrupts on Windows systems
Date: Thu, 21 Feb 2013 12:34:25 -0500

On Thu, Feb 21, 2013 at 12:18 PM, John W. Eaton <address@hidden> wrote:
On 02/21/2013 12:13 PM, Michael Goffioul wrote:
On Thu, Feb 21, 2013 at 10:39 AM, John W. Eaton <address@hidden
<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.

So how is it that my build without that code works?  Control-C seems to interrupt a loop (for example) and take me back to the top-level.

I can't answer, as I don't know what part of the code you've actually disabled.

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]