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