pdns/pdns-fix-crash-on-sigstop.patch

17 lines
462 B
Diff

diff -ur pdns-2.9.22.orig/pdns/unix_semaphore.cc pdns-2.9.22/pdns/unix_semaphore.cc
--- pdns-2.9.22.orig/pdns/unix_semaphore.cc 2010-12-14 17:18:02.667000233 +0100
+++ pdns-2.9.22/pdns/unix_semaphore.cc 2010-12-14 17:18:08.138000485 +0100
@@ -156,7 +156,11 @@
int Semaphore::wait()
{
- return sem_wait(m_pSemaphore);
+ int ret;
+ do
+ ret = sem_wait(m_pSemaphore);
+ while (ret == -1 && errno == EINTR);
+ return ret;
}
int Semaphore::tryWait()
{