From f84af894f6c751e3643647229ae2e95d54c0ea31 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Thu, 18 Apr 2024 17:48:45 +0200 Subject: capture zenserver output on error (#51) * capture spawned server output and output on launch error * fix logging and launch validation in tests --- src/zencore/process.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/zencore/process.cpp') diff --git a/src/zencore/process.cpp b/src/zencore/process.cpp index 8fddc9562..88eb8af0d 100644 --- a/src/zencore/process.cpp +++ b/src/zencore/process.cpp @@ -277,10 +277,8 @@ ProcessHandle::Wait(int TimeoutMs) } int -ProcessHandle::WaitExitCode() +ProcessHandle::GetExitCode() { - Wait(-1); - #if ZEN_PLATFORM_WINDOWS DWORD ExitCode = 0; GetExitCodeProcess(m_ProcessHandle, &ExitCode); @@ -297,6 +295,13 @@ ProcessHandle::WaitExitCode() #endif } +int +ProcessHandle::WaitExitCode() +{ + Wait(-1); + return GetExitCode(); +} + ////////////////////////////////////////////////////////////////////////// #if !ZEN_PLATFORM_WINDOWS || ZEN_WITH_TESTS -- cgit v1.2.3