diff options
| author | Dan Engelbrecht <[email protected]> | 2023-11-16 18:50:27 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-11-16 18:50:27 +0100 |
| commit | 573907447db3e19d49c0bcaf3f659cf2d599c738 (patch) | |
| tree | 9374a390ad5ab89ce6991398e2eb11154a3dcb4e /src/zencore/thread.cpp | |
| parent | add wipe prevention via file in data root dir (#548) (diff) | |
| download | zen-573907447db3e19d49c0bcaf3f659cf2d599c738.tar.xz zen-573907447db3e19d49c0bcaf3f659cf2d599c738.zip | |
blocking queue fix (#550)
* make BlockingQueue::m_CompleteAdding non-atomic
* ZenCacheDiskLayer::Flush logging
* name worker threads in ZenCacheDiskLayer::DiscoverBuckets
* name worker threads in gcv2
* improved logging in ZenServerInstance
* scrub threadpool naming
* remove waitpid handling, we should just call wait to kill zombie processes
Diffstat (limited to 'src/zencore/thread.cpp')
| -rw-r--r-- | src/zencore/thread.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/zencore/thread.cpp b/src/zencore/thread.cpp index 1174f902f..a55bc5d69 100644 --- a/src/zencore/thread.cpp +++ b/src/zencore/thread.cpp @@ -668,20 +668,7 @@ ProcessHandle::Wait(int TimeoutMs) for (int SleepedTimeMS = 0;; SleepedTimeMS += SleepMs) { int WaitState = 0; - int Res = waitpid(m_Pid, &WaitState, WNOHANG | WCONTINUED | WUNTRACED); -# if 1 - ZEN_UNUSED(Res); -# else - if (Res == -1) - { - int32_t LastError = zen::GetLastError(); - if (LastError == ECHILD || LastError == ESRCH) - { - return true; - } - ThrowSystemError(static_cast<uint32_t>(LastError), "Process::Wait waitpid failed"sv); - } -# endif + waitpid(m_Pid, &WaitState, WNOHANG | WCONTINUED | WUNTRACED); if (kill(m_Pid, 0) < 0) { |