diff libgui/src/octave-gui.cc @ 17922:b5bf26a054bd

interrupt interpreter thread in GUI instead of calling "raise (SIGINT)" * thread-manager.h, thread-manager.cc: New files. * libgui/src/module.mk: Update file lists. * octave-gui.cc (octave_start_gui): Block SIGINT at startup. * octave-interpreter.h, octave-interpreter.cc (octave_interpreter::thread_manager): New data member. (octave_interpreter::execute): Register current thread and unblock interrupt signal. (octave_interpreter::interrupt): Call thread_manager::interrupt instead of calling ::raising (SIGINT).
author John W. Eaton <jwe@octave.org>
date Tue, 12 Nov 2013 19:24:49 -0500
parents f3e25230b1f3
children 345a8027dc8b
line wrap: on
line diff
--- a/libgui/src/octave-gui.cc	Wed Nov 13 02:28:34 2013 -0500
+++ b/libgui/src/octave-gui.cc	Tue Nov 12 19:24:49 2013 -0500
@@ -51,6 +51,7 @@
 #include "resource-manager.h"
 #include "main-window.h"
 #include "octave-gui.h"
+#include "thread-manager.h"
 
 // Allow the Octave interpreter to start as in CLI mode with a
 // QApplication context so that it can use Qt for things like plotting
@@ -118,6 +119,8 @@
 int
 octave_start_gui (int argc, char *argv[], bool start_gui)
 {
+  octave_thread_manager::block_interrupt_signal ();
+
   qInstallMsgHandler (message_handler);
 
   if (start_gui)