aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/include
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-08-27 17:07:11 +0200
committerGitHub Enterprise <[email protected]>2024-08-27 17:07:11 +0200
commitba16864865dbbb3f69783d210b4f07f599906a73 (patch)
tree17efb792f14f5fc8df7831593ab4d764e6617193 /src/zencore/include
parentMake sure `noexcept` functions does not leak exceptions (#136) (diff)
downloadzen-ba16864865dbbb3f69783d210b4f07f599906a73.tar.xz
zen-ba16864865dbbb3f69783d210b4f07f599906a73.zip
zenserver process launch/termination improvements (#138)
* zenserver process launch/termination improvements * fix GetPidStatus to return error code on Linux * fix linux FindProcess() * cleanup IsZombieProcess
Diffstat (limited to 'src/zencore/include')
-rw-r--r--src/zencore/include/zencore/process.h1
-rw-r--r--src/zencore/include/zencore/thread.h4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/zencore/include/zencore/process.h b/src/zencore/include/zencore/process.h
index 48a2eb0d7..d1394cd9a 100644
--- a/src/zencore/include/zencore/process.h
+++ b/src/zencore/include/zencore/process.h
@@ -27,6 +27,7 @@ public:
ZENCORE_API [[nodiscard]] bool IsRunning() const;
ZENCORE_API [[nodiscard]] bool IsValid() const;
ZENCORE_API bool Wait(int TimeoutMs = -1);
+ ZENCORE_API bool Wait(int TimeoutMs, std::error_code& OutEc);
ZENCORE_API int WaitExitCode();
ZENCORE_API int GetExitCode();
ZENCORE_API bool Terminate(int ExitCode);
diff --git a/src/zencore/include/zencore/thread.h b/src/zencore/include/zencore/thread.h
index 9362802a1..8fb781571 100644
--- a/src/zencore/include/zencore/thread.h
+++ b/src/zencore/include/zencore/thread.h
@@ -138,8 +138,8 @@ public:
ZENCORE_API explicit NamedEvent(std::string_view EventName);
ZENCORE_API ~NamedEvent();
ZENCORE_API void Close();
- ZENCORE_API void Set();
- ZENCORE_API bool Wait(int TimeoutMs = -1);
+ ZENCORE_API std::error_code Set();
+ ZENCORE_API bool Wait(int TimeoutMs = -1);
NamedEvent(NamedEvent&& Rhs) noexcept : m_EventHandle(Rhs.m_EventHandle) { Rhs.m_EventHandle = nullptr; }