forked from qt-creator/qt-creator
Utils: Fix interrupting local processes on *nix
Change-Id: I6e722379ad62c98d1e8e6d445c1eeea171ff141b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -10,7 +10,9 @@
|
||||
#include <qt_windows.h>
|
||||
#else
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
@@ -127,7 +129,7 @@ void ProcessHelper::interruptPid(qint64 pid)
|
||||
#ifdef Q_OS_WIN
|
||||
EnumWindows(sendInterruptMessageToAllWindowsOfProcess_enumWnd, pid);
|
||||
#else
|
||||
Q_UNUSED(pid)
|
||||
::kill(pid, SIGINT);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -459,8 +459,7 @@ private:
|
||||
m_handle->kill();
|
||||
break;
|
||||
case ControlSignal::Interrupt:
|
||||
if (m_setup.m_useCtrlCStub) // bypass launcher and interrupt directly
|
||||
ProcessHelper::interruptPid(m_handle->processId());
|
||||
ProcessHelper::interruptPid(m_handle->processId());
|
||||
break;
|
||||
case ControlSignal::KickOff:
|
||||
QTC_CHECK(false);
|
||||
|
||||
Reference in New Issue
Block a user