forked from qt-creator/qt-creator
QNX: Fixed killing processes on QNX and BlackBerry
The commands were mixed up in previous commit, we have to use pidin on BlackBerry, at least the older ones. Change-Id: Ibff1f386c6570814a4bccfef5404e60854222f24 Reviewed-by: Mehdi Fekari <mfekari@blackberry.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
This commit is contained in:
committed by
Tobias Nätterlund
parent
34ef3f244e
commit
295c688469
@@ -40,35 +40,6 @@ QnxDeviceProcessSignalOperation::QnxDeviceProcessSignalOperation(
|
||||
{
|
||||
}
|
||||
|
||||
static QString signalProcessByNameBlackBerryCommandLine(const QString &filePath, int sig)
|
||||
{
|
||||
QString executable = filePath;
|
||||
return QString::fromLatin1("for PID in $(pidin -F \"%a %A\" | grep \"%1\" | awk '/%1/ {print $1}'); "
|
||||
"do "
|
||||
"kill -%2 $PID; "
|
||||
"done").arg(executable.replace(QLatin1String("/"), QLatin1String("\\/"))).arg(sig);
|
||||
}
|
||||
|
||||
QString QnxDeviceProcessSignalOperation::killProcessByNameCommandLine(
|
||||
const QString &filePath) const
|
||||
{
|
||||
return QString::fromLatin1("%1; %2").arg(signalProcessByNameBlackBerryCommandLine(filePath, 15),
|
||||
signalProcessByNameBlackBerryCommandLine(filePath, 9));
|
||||
}
|
||||
|
||||
QString QnxDeviceProcessSignalOperation::interruptProcessByNameCommandLine(
|
||||
const QString &filePath) const
|
||||
{
|
||||
return signalProcessByNameBlackBerryCommandLine(filePath, 2);
|
||||
}
|
||||
|
||||
|
||||
BlackBerryDeviceProcessSignalOperation::BlackBerryDeviceProcessSignalOperation(
|
||||
const QSsh::SshConnectionParameters sshParameters)
|
||||
: RemoteLinux::RemoteLinuxSignalOperation(sshParameters)
|
||||
{
|
||||
}
|
||||
|
||||
static QString signalProcessByNameQnxCommandLine(const QString &filePath, int sig)
|
||||
{
|
||||
QString executable = filePath;
|
||||
@@ -78,13 +49,42 @@ static QString signalProcessByNameQnxCommandLine(const QString &filePath, int si
|
||||
"done").arg(executable.replace(QLatin1String("/"), QLatin1String("\\/"))).arg(sig);
|
||||
}
|
||||
|
||||
QString BlackBerryDeviceProcessSignalOperation::killProcessByNameCommandLine(const QString &filePath) const
|
||||
QString QnxDeviceProcessSignalOperation::killProcessByNameCommandLine(
|
||||
const QString &filePath) const
|
||||
{
|
||||
return QString::fromLatin1("%1; %2").arg(signalProcessByNameQnxCommandLine(filePath, 15),
|
||||
signalProcessByNameQnxCommandLine(filePath, 9));
|
||||
}
|
||||
|
||||
QString BlackBerryDeviceProcessSignalOperation::interruptProcessByNameCommandLine(const QString &filePath) const
|
||||
QString QnxDeviceProcessSignalOperation::interruptProcessByNameCommandLine(
|
||||
const QString &filePath) const
|
||||
{
|
||||
return signalProcessByNameQnxCommandLine(filePath, 2);
|
||||
}
|
||||
|
||||
|
||||
BlackBerryDeviceProcessSignalOperation::BlackBerryDeviceProcessSignalOperation(
|
||||
const QSsh::SshConnectionParameters sshParameters)
|
||||
: RemoteLinux::RemoteLinuxSignalOperation(sshParameters)
|
||||
{
|
||||
}
|
||||
|
||||
static QString signalProcessByNameBlackBerryCommandLine(const QString &filePath, int sig)
|
||||
{
|
||||
QString executable = filePath;
|
||||
return QString::fromLatin1("for PID in $(pidin -F \"%a %A\" | grep \"%1\" | awk '/%1/ {print $1}'); "
|
||||
"do "
|
||||
"kill -%2 $PID; "
|
||||
"done").arg(executable.replace(QLatin1String("/"), QLatin1String("\\/"))).arg(sig);
|
||||
}
|
||||
|
||||
QString BlackBerryDeviceProcessSignalOperation::killProcessByNameCommandLine(const QString &filePath) const
|
||||
{
|
||||
return QString::fromLatin1("%1; %2").arg(signalProcessByNameBlackBerryCommandLine(filePath, 15),
|
||||
signalProcessByNameBlackBerryCommandLine(filePath, 9));
|
||||
}
|
||||
|
||||
QString BlackBerryDeviceProcessSignalOperation::interruptProcessByNameCommandLine(const QString &filePath) const
|
||||
{
|
||||
return signalProcessByNameBlackBerryCommandLine(filePath, 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user