forked from qt-creator/qt-creator
Utils: Add the ability to interrupt inferiors via the process stub
This will be handy once we want to debug processes running as root. The mechanism is the same as for "killProcess", and currently unused. Change-Id: I2c5e5b77577ca32ed1118fcc81c03c6320db8800 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
@@ -604,6 +604,18 @@ bool ConsoleProcess::start()
|
||||
return true;
|
||||
}
|
||||
|
||||
void ConsoleProcess::interruptProcess()
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
// Not used.
|
||||
#else
|
||||
if (d->m_stubSocket && d->m_stubSocket->isWritable()) {
|
||||
d->m_stubSocket->write("i", 1);
|
||||
d->m_stubSocket->flush();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void ConsoleProcess::killProcess()
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
|
||||
Reference in New Issue
Block a user