Commit 5ef0cb54 authored by Alexander Semke's avatar Alexander Semke

Fixind maximasession on windows.

parent b9233f89
...@@ -202,7 +202,7 @@ void MaximaSession::readStdOut() ...@@ -202,7 +202,7 @@ void MaximaSession::readStdOut()
#ifndef Q_OS_WIN #ifndef Q_OS_WIN
QString out=QLatin1String(m_process->pty()->readAll()); QString out=QLatin1String(m_process->pty()->readAll());
#else #else
QString out=m_process->readAllStandardOutput(); QString out=QLatin1String(m_process->readAllStandardOutput());
#endif #endif
out.remove(QLatin1Char('\r')); out.remove(QLatin1Char('\r'));
...@@ -357,10 +357,13 @@ void MaximaSession::interrupt(MaximaExpression* expr) ...@@ -357,10 +357,13 @@ void MaximaSession::interrupt(MaximaExpression* expr)
if(expr==m_expressionQueue.first()) if(expr==m_expressionQueue.first())
{ {
disconnect(expr, nullptr, this, nullptr); disconnect(expr, nullptr, this, nullptr);
//TODO for non unix platforms sending signals probably won't work m_process->kill();
#ifndef Q_OS_WIN
const int pid=m_process->pid(); const int pid=m_process->pid();
kill(pid, SIGINT); kill(pid, SIGINT);
#else
//TODO: interrupt the process on windows
#endif
qDebug()<<"done interrupting"; qDebug()<<"done interrupting";
}else }else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment