blob: ae83244d9bd3c18f20baddb86c7adf7381d4ec38 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#include "processinterface.h"
#include "qtcassert.h"
namespace Utils {
/*!
* \brief controlSignalToInt
* \param controlSignal
* \return Converts the ControlSignal enum to the corresponding unix signal
*/
int ProcessInterface::controlSignalToInt(ControlSignal controlSignal)
{
switch (controlSignal) {
case ControlSignal::Terminate: return 15;
case ControlSignal::Kill: return 9;
case ControlSignal::Interrupt: return 2;
case ControlSignal::KickOff: QTC_CHECK(false); return 0;
}
return 0;
}
} // Utils
|