aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zencore/thread.cpp')
-rw-r--r--src/zencore/thread.cpp15
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)
{