forked from qt-creator/qt-creator
SshProcessInterface: Don't use DeviceShell for control signals
It looks like starting device shell is fragile in some circumstances. Fixes: QTCREATORBUG-28072 Change-Id: I1a51d1fb939bd42884a55e1492de808bee89219f Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -483,7 +483,17 @@ qint64 SshProcessInterface::processId() const
|
|||||||
|
|
||||||
bool SshProcessInterface::runInShell(const CommandLine &command, const QByteArray &data)
|
bool SshProcessInterface::runInShell(const CommandLine &command, const QByteArray &data)
|
||||||
{
|
{
|
||||||
return d->m_devicePrivate->runInShell(command, data).exitCode == 0;
|
QtcProcess process;
|
||||||
|
CommandLine cmd = {d->m_device->filePath("/bin/sh"), {"-c"}};
|
||||||
|
QString tmp;
|
||||||
|
ProcessArgs::addArg(&tmp, command.executable().path());
|
||||||
|
ProcessArgs::addArgs(&tmp, command.arguments());
|
||||||
|
cmd.addArg(tmp);
|
||||||
|
process.setCommand(cmd);
|
||||||
|
process.setWriteData(data);
|
||||||
|
process.start();
|
||||||
|
QTC_CHECK(process.waitForFinished()); // otherwise we may start producing killers for killers
|
||||||
|
return process.exitCode() == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SshProcessInterface::start()
|
void SshProcessInterface::start()
|
||||||
|
Reference in New Issue
Block a user