forked from qt-creator/qt-creator
SshProcessInterface: Fix sending control signals
For QDB devices make sure to only use `appcontroller --stop` when the process was also started with the appcontroller. Otherwise fall back to the SshProcessInterface implementation. Change-Id: I482f7ac9783f57eb8d85bb2b536ff00d428a2c3f Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -41,7 +41,11 @@ private:
|
|||||||
{
|
{
|
||||||
QTC_ASSERT(controlSignal != ControlSignal::Interrupt, return);
|
QTC_ASSERT(controlSignal != ControlSignal::Interrupt, return);
|
||||||
QTC_ASSERT(controlSignal != ControlSignal::KickOff, return);
|
QTC_ASSERT(controlSignal != ControlSignal::KickOff, return);
|
||||||
runInShell({Constants::AppcontrollerFilepath, {"--stop"}});
|
if (m_setup.m_commandLine.executable().path() == Constants::AppcontrollerFilepath) {
|
||||||
|
runInShell({Constants::AppcontrollerFilepath, {"--stop"}});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SshProcessInterface::handleSendControlSignal(controlSignal);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ protected:
|
|||||||
qint64 processId() const;
|
qint64 processId() const;
|
||||||
bool runInShell(const Utils::CommandLine &command, const QByteArray &data = {});
|
bool runInShell(const Utils::CommandLine &command, const QByteArray &data = {});
|
||||||
|
|
||||||
private:
|
|
||||||
virtual void handleSendControlSignal(Utils::ControlSignal controlSignal);
|
virtual void handleSendControlSignal(Utils::ControlSignal controlSignal);
|
||||||
|
|
||||||
|
private:
|
||||||
void start() final;
|
void start() final;
|
||||||
qint64 write(const QByteArray &data) final;
|
qint64 write(const QByteArray &data) final;
|
||||||
void sendControlSignal(Utils::ControlSignal controlSignal) final;
|
void sendControlSignal(Utils::ControlSignal controlSignal) final;
|
||||||
|
|||||||
Reference in New Issue
Block a user