Give SSH applications a second to gracefully shutdown

Right now, SSH applications will receive two termination signals
immediately after another. First SIGTERM then SIGKILL. With this commit
applications get a one second break in order to shutdown properly before
they are killed anyway.

Change-Id: Ie9e33943c40e50400bea7f2a31d132710d21acba
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Wolfgang Bremer
2017-01-12 00:25:53 +01:00
parent 824fc105c5
commit 24b2347ace

View File

@@ -96,7 +96,7 @@ QString RemoteLinuxSignalOperation::interruptProcessByNameCommandLine(const QStr
void RemoteLinuxSignalOperation::killProcess(qint64 pid)
{
run(QString::fromLatin1("%1; %2").arg(signalProcessByPidCommandLine(pid, 15),
run(QString::fromLatin1("%1; sleep 1; %2").arg(signalProcessByPidCommandLine(pid, 15),
signalProcessByPidCommandLine(pid, 9)));
}