From: Adam Dickmeiss Date: Mon, 2 Jul 2012 13:51:10 +0000 (+0200) Subject: SocketManager::processEvent returns 1 on EINTR X-Git-Tag: v1.3.1~1 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=b44e3f59721a74d2c99a7bac337114f677564b99;p=yazpp-moved-to-github.git SocketManager::processEvent returns 1 on EINTR This changes behavior a bit, but ensures that it returns if we receive a signal. --- diff --git a/src/yaz-socket-manager.cpp b/src/yaz-socket-manager.cpp index c3fc491..2cb2fde 100644 --- a/src/yaz-socket-manager.cpp +++ b/src/yaz-socket-manager.cpp @@ -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); }