SshProcessInterface: Remove pidArgumentForKill()

This interface method wasn't really sensible.

Change-Id: Ia47c893886ec06a2263b96d161578d46d2df5ffa
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2022-04-29 13:18:42 +02:00
parent 54628488a4
commit 340b61889d
7 changed files with 111 additions and 59 deletions

View File

@@ -57,7 +57,7 @@ public:
private:
QString fullCommandLine(const CommandLine &commandLine) const final;
QString pidArgumentForKill() const final;
void sendControlSignal(Utils::ControlSignal controlSignal) final;
const QString m_pidFile;
};
@@ -95,9 +95,14 @@ QString QnxProcessImpl::fullCommandLine(const CommandLine &commandLine) const
return fullCommandLine;
}
QString QnxProcessImpl::pidArgumentForKill() const
void QnxProcessImpl::sendControlSignal(Utils::ControlSignal controlSignal)
{
return QString::fromLatin1("`cat %1`").arg(m_pidFile);
QTC_ASSERT(controlSignal != ControlSignal::KickOff, return);
const QString args = QString::fromLatin1("-%1 `cat %2`")
.arg(controlSignalToInt(controlSignal)).arg(m_pidFile);
CommandLine command = { "kill", args, CommandLine::Raw };
// Note: This blocking call takes up to 2 ms for local remote.
runInShell(command);
}
const char QnxVersionKey[] = "QnxVersion";