octave-maintainers
[Top][All Lists]
Advanced

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

Re: interrupt handing and the GUI (bug #37672)


From: Daniel J Sebald
Subject: Re: interrupt handing and the GUI (bug #37672)
Date: Sun, 10 Nov 2013 21:02:38 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 11/10/2013 07:48 PM, Michael Goffioul wrote:
On Sun, Nov 10, 2013 at 3:55 PM, John W. Eaton <address@hidden
<mailto:address@hidden>> wrote:

    On 11/10/2013 01:25 PM, Daniel J Sebald wrote:

        On 11/10/2013 11:07 AM, John W. Eaton wrote:

        Yes, this doesn't sound good. I sort of like the way it already
        exists,
        i.e., that the GUI interprets the SIGINT based upon what window is
        active, and if it is the terminal window that is active issue an
        interrupt back to the OS with the target being the Octave-core
        thread
        which the GUI knows because it is the one that launched the
        Octave-core
        thread and should have a record of process information.


    My understanding is that signals are per-process, not per-thread, so
    there is no way to direct the signal to a specific thread.  If there
    were, then the solution would just be to direct the signal to the
    correct thread.  But I don't see any way to do that.


When reading this [1] it seems that pthread_sigprocmask may help in
directing signal handlers in specific threads.

Michael.

[1]
http://stackoverflow.com/questions/11679568/signal-handling-with-multiple-threads-in-linux

OK, now I'm not sure again whether multiple threads in a process can all be set up to handle SIGINT. It sounds like posix threads might allow that, but generally not true?

Dan


reply via email to

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