diff options
| author | Dan Engelbrecht <[email protected]> | 2024-08-27 17:07:11 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-08-27 17:07:11 +0200 |
| commit | ba16864865dbbb3f69783d210b4f07f599906a73 (patch) | |
| tree | 17efb792f14f5fc8df7831593ab4d764e6617193 /src/zenutil/include | |
| parent | Make sure `noexcept` functions does not leak exceptions (#136) (diff) | |
| download | zen-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/zenutil/include')
| -rw-r--r-- | src/zenutil/include/zenutil/zenserverprocess.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/zenutil/include/zenutil/zenserverprocess.h b/src/zenutil/include/zenutil/zenserverprocess.h index 8aa4a2773..6295ab5c5 100644 --- a/src/zenutil/include/zenutil/zenserverprocess.h +++ b/src/zenutil/include/zenutil/zenserverprocess.h @@ -67,9 +67,10 @@ struct ZenServerInstance ~ZenServerInstance(); int Shutdown(); - bool SignalShutdown(); + bool SignalShutdown(std::error_code& OutEc); uint16_t WaitUntilReady(); [[nodiscard]] bool WaitUntilReady(int Timeout); + [[nodiscard]] bool WaitUntilExited(int Timeout, std::error_code& OutEc); void EnableTermination() { m_Terminate = true; } void DisableShutdownOnDestroy() { m_ShutdownOnDestroy = false; } void Detach(); @@ -102,6 +103,8 @@ struct ZenServerInstance SpawnServer(BasePort, AdditionalServerArgs, WaitTimeoutMs); } + void SpawnServer(std::string_view ServerArgs, bool OpenConsole, int WaitTimeoutMs); + void AttachToRunningServer(int BasePort = 0); std::string GetBaseUri() const; uint16_t GetBasePort() const { return m_BasePort; } |