[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: interrupt handing and the GUI (bug #37672)
From: |
Thorsten Liebig |
Subject: |
Re: interrupt handing and the GUI (bug #37672) |
Date: |
Wed, 13 Nov 2013 14:12:48 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
Am 13.11.2013 10:24, schrieb Thorsten Liebig:
>> I checked in a series of changesets that appear to fix the problem on
>> systems with pthreads.
>>
>> http://hg.savannah.gnu.org/hgweb/octave/rev/a38cee8f0a9b
>> http://hg.savannah.gnu.org/hgweb/octave/rev/b6d07dd90f3d
>> http://hg.savannah.gnu.org/hgweb/octave/rev/5c3f22dd0bbb
>> http://hg.savannah.gnu.org/hgweb/octave/rev/2a4acd6548c6
>> http://hg.savannah.gnu.org/hgweb/octave/rev/b5bf26a054bd
>>
>> It works on my Debian system. I ended up using both pthread_sigmask
>> to block SIGINT in all threads and then unblock it in the thread that
>> is running the Octave interpreter. Then I also used pthread_kill to
>> direct the SIGINT signal to the thread that is running the
>> interpreter. That seemed to work. Using only pthread_kill was not
>> enough because it's possible for SIGINT to be generated in other ways
>> and bad things can happen if it is delivered to any thread other than
>> the one running the interpreter.
>>
>> The signals are now sent from some functions in a new class in
>> libgui/src/thread-manager.cc.
>>
>> The implementation for Unix uses the pthread_sigmask and pthread_kill
>> functions.
>>
>> The implementation for Windows is still calling "::raise (SIGINT)". I
>> tried using "GenerateConsoleCtrlEvent (CTRL_C_EVENT, 0)" but that
>> still crashes Octave if it is expecting to be able to longjmp out of
>> the signal handler back to the most recent "safe" location. I don't
>> know how to fix this problem yet. If anyone has a clue, help would be
>> most appreciated.
>>
>> jwe
>>
>>
> I'm going to test your changes.
> But one more remark on Windows:
> I just tried it again on an old mxe-build from Mai.
> With version 3.7.5 the Octave GUI reacted normal to CTRL+C while on Linux it
> never did.
> I reported that here: https://savannah.gnu.org/bugs/?37672#comment1
> But at some point it stopped working and started behaving like the Linux
> version...
> Maybe this help? Maybe you can find out how and why it worked in 3.7.5 in
> Windows??
>
> If you need more infos, please let me know...
>
> regards
> THorsten
>
I'm unable to build the latest tip... :(
In file included from /usr/include/c++/4.7/cwctype:52:0,
from /usr/include/c++/4.7/bits/locale_facets.h:41,
from /usr/include/c++/4.7/bits/basic_ios.h:39,
from /usr/include/c++/4.7/ios:45,
from /usr/include/c++/4.7/ostream:40,
from /usr/include/c++/4.7/iterator:64,
from /usr/include/qt4/QtCore/qlist.h:50,
from /usr/include/qt4/QtCore/qobject.h:50,
from /usr/include/qt4/QtCore/qcoreapplication.h:45,
from /usr/include/qt4/QtGui/qapplication.h:45,
from /usr/include/qt4/QtGui/QApplication:1,
from ../../libgui/src/octave-dock-widget.cc:24:
../libgnu/wctype.h:66:3: error: #error "Please include config.h first."
../libgnu/wctype.h:68:1: error: '_GL_INLINE_HEADER_BEGIN' does not name a type
../libgnu/wctype.h:813:1: error: '_GL_INLINE_HEADER_END' does not name a type
- Re: interrupt handing and the GUI (bug #37672), (continued)
- Re: interrupt handing and the GUI (bug #37672), Michael Goffioul, 2013/11/11
- Re: interrupt handing and the GUI (bug #37672), John W. Eaton, 2013/11/11
- Re: interrupt handing and the GUI (bug #37672), John Swensen, 2013/11/11
- Re: interrupt handing and the GUI (bug #37672), Michael Goffioul, 2013/11/11
- Re: interrupt handing and the GUI (bug #37672), John W. Eaton, 2013/11/13
- Re: interrupt handing and the GUI (bug #37672), Thorsten Liebig, 2013/11/13
- Re: interrupt handing and the GUI (bug #37672),
Thorsten Liebig <=
- Message not available
- Re: interrupt handing and the GUI (bug #37672), John W. Eaton, 2013/11/13
- Re: interrupt handing and the GUI (bug #37672), Michael Goffioul, 2013/11/13
- Re: interrupt handing and the GUI (bug #37672), John W. Eaton, 2013/11/14
- Re: interrupt handing and the GUI (bug #37672), Michael Goffioul, 2013/11/14
- Re: interrupt handing and the GUI (bug #37672), Daniel J Sebald, 2013/11/15
- Re: interrupt handing and the GUI (bug #37672), Michael Goffioul, 2013/11/15
- Re: interrupt handing and the GUI (bug #37672), John W. Eaton, 2013/11/11
Re: interrupt handing and the GUI (bug #37672), Michael D. Godfrey, 2013/11/10
Re: interrupt handing and the GUI (bug #37672), Rik, 2013/11/10