aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/process.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-04-18 17:48:45 +0200
committerGitHub Enterprise <[email protected]>2024-04-18 17:48:45 +0200
commitf84af894f6c751e3643647229ae2e95d54c0ea31 (patch)
tree5b9c1554e276f455785cf0626881ca789816f975 /src/zencore/process.cpp
parentsafer oplog import (#52) (diff)
downloadzen-f84af894f6c751e3643647229ae2e95d54c0ea31.tar.xz
zen-f84af894f6c751e3643647229ae2e95d54c0ea31.zip
capture zenserver output on error (#51)
* capture spawned server output and output on launch error * fix logging and launch validation in tests
Diffstat (limited to 'src/zencore/process.cpp')
-rw-r--r--src/zencore/process.cpp11
1 files changed, 8 insertions, 3 deletions
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