SocketManager::processEvent returns 1 on EINTR
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 2 Jul 2012 13:51:10 +0000 (15:51 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 2 Jul 2012 13:51:10 +0000 (15:51 +0200)
This changes behavior a bit, but ensures that it returns if
we receive a signal.

src/yaz-socket-manager.cpp

index c3fc491..2cb2fde 100644 (file)
@@ -253,7 +253,10 @@ int SocketManager::processEvent()
     while ((res = yaz_poll(fds, no_fds, timeout, 0)) < 0 && pass < 10)
     {
         if (errno == EINTR)
-            continue;
+        {
+            delete [] fds;
+            return 1;
+        }
         yaz_log(YLOG_ERRNO|YLOG_WARN, "yaz_poll");
         yaz_log(YLOG_WARN, "errno=%d timeout=%d", errno, timeout);
     }