From 573907447db3e19d49c0bcaf3f659cf2d599c738 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Thu, 16 Nov 2023 18:50:27 +0100 Subject: 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 --- src/zencore/thread.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/zencore/thread.cpp') 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(LastError), "Process::Wait waitpid failed"sv); - } -# endif + waitpid(m_Pid, &WaitState, WNOHANG | WCONTINUED | WUNTRACED); if (kill(m_Pid, 0) < 0) { -- cgit v1.2.3