Use QProcess::processId()

KProcess::pid() can be dropped and just use QProcess::processId()
This commit is contained in:
Luís Pereira
2020-12-10 16:49:53 +00:00
committed by Chih-Hsuan Yen
parent 645a0539f4
commit 62be87604c
5 changed files with 4 additions and 26 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ KPtyProcess::~KPtyProcess()
if (state() != QProcess::NotRunning)
{
qWarning() << Q_FUNC_INFO << "the terminal process is still running, trying to stop it by SIGHUP";
::kill(pid(), SIGHUP);
::kill(static_cast<pid_t>(processId()), SIGHUP);
waitForFinished(300);
if (state() != QProcess::NotRunning)
qCritical() << Q_FUNC_INFO << "process didn't stop upon SIGHUP and will be SIGKILL-ed";