diff --git a/src/common/threading.cpp b/src/common/threading.cpp index 6081342b0..1f401a887 100644 --- a/src/common/threading.cpp +++ b/src/common/threading.cpp @@ -670,7 +670,11 @@ void Threading::KernelSemaphore::Wait() #elif defined(__APPLE__) semaphore_wait(m_sema); #else - sem_wait(&m_sema); + do + { + if (sem_wait(&m_sema) == 0) [[likely]] + return; + } while (errno == EINTR); #endif }