close scilab with cross must close the process. 24/16924/1
Cedric Delamarre [Wed, 29 Jul 2015 09:58:05 +0000 (11:58 +0200)]
Change-Id: If88493977f0d289e7e30e9e50ca16aec60f0551f

scilab/modules/ast/src/cpp/system_env/configvariable.cpp

index 58db82a..10c28b7 100644 (file)
@@ -15,6 +15,7 @@
 #include "context.hxx"
 #include "configvariable.hxx"
 #include "macrofile.hxx"
+#include "threadmanagement.hxx"
 
 extern "C"
 {
@@ -114,6 +115,11 @@ bool ConfigVariable::m_bForceQuit = false;
 void ConfigVariable::setForceQuit(bool _bForceQuit)
 {
     m_bForceQuit = _bForceQuit;
+    // unlock scilabReadAndExecCommand thread which wait for a command.
+    if (m_bForceQuit)
+    {
+        ThreadManagement::SendCommandStoredSignal();
+    }
 }
 
 bool ConfigVariable::getForceQuit(void)