aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2018-12-14 10:12:59 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2018-12-14 11:26:30 +0000
commita5cf6f194d79f67a99263cf7d6f07d41b79d5239 (patch)
tree33cdd354840bb3cd5db804b7f9fdf0b8be277878 /src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp
parent2710a9b0e57d7055cd1fcb81dd20ad51e1557fce (diff)
SSH: Fix exit status/exit code interpretation
A "regular" exit of the ssh binary with exit code 255 means that the remote process has crashed. Change-Id: I82e6e44079041459e78e4f8f7e7b6e5cbcaa6c44 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp')
-rw-r--r--src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp b/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp
index e3cc959a5d..4f447214f5 100644
--- a/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp
+++ b/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp
@@ -139,7 +139,7 @@ QProcess::ProcessState SshDeviceProcess::state() const
QProcess::ExitStatus SshDeviceProcess::exitStatus() const
{
- return d->exitStatus == QSsh::SshRemoteProcess::NormalExit
+ return d->exitStatus == QSsh::SshRemoteProcess::NormalExit && d->exitCode != 255
? QProcess::NormalExit : QProcess::CrashExit;
}
@@ -223,9 +223,9 @@ void SshDeviceProcess::handleProcessStarted()
emit started();
}
-void SshDeviceProcess::handleProcessFinished()
+void SshDeviceProcess::handleProcessFinished(const QString &error)
{
- d->errorMessage = d->process->errorString();
+ d->errorMessage = error;
d->exitCode = d->process->exitCode();
d->setState(SshDeviceProcessPrivate::Inactive);
emit finished();