octave-maintainers
[Top][All Lists]
Advanced

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

Re: Win32 CTRL-C handling (Was: interrupt handing and the GUI (bug #3767


From: John W. Eaton
Subject: Re: Win32 CTRL-C handling (Was: interrupt handing and the GUI (bug #37672))
Date: Thu, 21 Nov 2013 11:07:53 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9

On 11/20/2013 07:21 PM, Michael Goffioul wrote:

The attached patch solves the problem of interrupting system calls like
"system('sleep 10')" in the GUI. By avoiding installing a SIGINT handler
before AllocConsole is called, one can use GenerateConsoleCtrlEvent,
allowing to propagate the CTRL-C sequence to child processes.

John, could you test it in MinGW? If you're ok with it, I'll apply the
patch to the default branch.

With this patch, I think we have a decent CTRL-C handling under Win32,
even when using the GUI.

Thanks for finding this fix.

Everything seems to be working correctly for me now except
interrupting readline when using octave-cli.  I started octave-cli by
double-clicking it in the Windows file browser.  Then if I have
something like

  octave-cli:1> x = 1

Ctrl-C at this point doesn't interrupt readline and give me a new
prompt with the input cleared.  Instead, it doesn't appear to do
anything.  The same thing happens if I start Octave from a Windows
command prompt, so I don't think this is specific to the MSYS shell.

I'm using hg id

  43c199e83ed7+ tip

The only change I've made is to apply your patch.

jwe





reply via email to

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