Use QProcess::processId()
KProcess::pid() can be dropped and just use QProcess::processId()
This commit is contained in:
committed by
Chih-Hsuan Yen
parent
645a0539f4
commit
62be87604c
+1
-1
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user