|
From: | Michael Goffioul |
Subject: | Re: Win32 CTRL-C handling (Was: interrupt handing and the GUI (bug #37672)) |
Date: | Thu, 21 Nov 2013 11:10:41 -0500 |
On 11/20/2013 07:21 PM, Michael Goffioul wrote:Thanks for finding this fix.
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.
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.
[Prev in Thread] | Current Thread | [Next in Thread] |