From 4f1109d77a0f2f4ef78ebcc1208800da1b7bd092 Mon Sep 17 00:00:00 2001 From: Peter Repukat Date: Fri, 23 Sep 2022 20:59:29 +0200 Subject: [PATCH] Fix errounous log "Child process with PID 0 died" - 0 pid is appended if parent process dies; ignore that --- GlosSITarget/AppLauncher.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GlosSITarget/AppLauncher.cpp b/GlosSITarget/AppLauncher.cpp index 7bc3f25..e660331 100644 --- a/GlosSITarget/AppLauncher.cpp +++ b/GlosSITarget/AppLauncher.cpp @@ -77,6 +77,9 @@ void AppLauncher::update() } if (Settings::launch.waitForChildProcs) { std::erase_if(pids_, [](auto pid) { + if (pid == 0) { + return true; + } const auto running = IsProcessRunning(pid); if (!running) spdlog::trace("Child process with PID \"{}\" died", pid);