]> source.dussan.org Git - tigervnc.git/commitdiff
Fixed a problem with crashing on select() returning EINTR error.
authorConstantin Kaplinsky <const@tightvnc.com>
Fri, 9 Sep 2005 08:32:02 +0000 (08:32 +0000)
committerConstantin Kaplinsky <const@tightvnc.com>
Fri, 9 Sep 2005 08:32:02 +0000 (08:32 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@311 3789f03b-4d11-0410-bbf8-ca57d06f2519

x0vncserver/x0vncserver.cxx

index e0d05f0317df3e4bb6889cf88d81fc3015af9fa7..ca96fd7c75fefc9053b2b05574e55a3c8c05f707 100644 (file)
@@ -467,7 +467,14 @@ int main(int argc, char** argv)
       }
 
       int n = select(FD_SETSIZE, &rfds, 0, 0, &tv);
-      if (n < 0) throw rdr::SystemException("select",errno);
+      if (n < 0) {
+        if (errno == EINTR) {
+          vlog.debug("interrupted select() system call");
+          continue;
+        } else {
+          throw rdr::SystemException("select", errno);
+        }
+      }
 
       if (FD_ISSET(listener.getFd(), &rfds)) {
         Socket* sock = listener.accept();