Renamed CLion process check function

This commit is contained in:
Nav
2022-09-15 00:35:06 +01:00
parent c9a8220500
commit 01651be95b
4 changed files with 4 additions and 4 deletions

View File

@@ -24,7 +24,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
Logger::debug("Handling Detach packet"); Logger::debug("Handling Detach packet");
try { try {
if (Process::isProcessManagedByClion(Process::getParentProcessId())) { if (Process::isManagedByClion(Process::getParentProcessId())) {
targetControllerConsole.suspendTargetController(); targetControllerConsole.suspendTargetController();
} }

View File

@@ -125,7 +125,7 @@ namespace Bloom::DebugServer::Gdb
std::bind(&GdbRspDebugServer::onTargetExecutionStopped, this, std::placeholders::_1) std::bind(&GdbRspDebugServer::onTargetExecutionStopped, this, std::placeholders::_1)
); );
if (Process::isProcessManagedByClion(Process::getParentProcessId())) { if (Process::isManagedByClion(Process::getParentProcessId())) {
Logger::warning( Logger::warning(
"Bloom's process is being managed by CLion - Bloom will automatically shutdown upon detaching from GDB." "Bloom's process is being managed by CLion - Bloom will automatically shutdown upon detaching from GDB."
); );

View File

@@ -13,7 +13,7 @@ namespace Bloom
return getppid(); return getppid();
} }
bool Process::isProcessManagedByClion(::pid_t processId) { bool Process::isManagedByClion(::pid_t processId) {
static auto cachedResult = std::optional<bool>(); static auto cachedResult = std::optional<bool>();
if (cachedResult.has_value()) { if (cachedResult.has_value()) {

View File

@@ -28,7 +28,7 @@ namespace Bloom
* @param processId * @param processId
* @return * @return
*/ */
static bool isProcessManagedByClion(::pid_t processId); static bool isManagedByClion(::pid_t processId);
private: private:
static std::optional<::proc_t*> getProcessInfo(::pid_t processId); static std::optional<::proc_t*> getProcessInfo(::pid_t processId);