Commits

Anonymous committed b91303a

merge r1766 into 2.3.x branch

Comments (0)

Files changed (1)

cherrypy/_cpwsgiserver.py

             # accept() by default
             return
         except socket.error, x:
+            if hasattr(errno, "EINTR") and x.args[0] == errno.EINTR:
+                # I *think* this is right. EINTR should occur when a signal
+                # is received during the accept() call; all docs say retry
+                # the call, and I *think* I'm reading it right that Python
+                # will then go ahead and poll for and handle the signal
+                # elsewhere. See http://www.cherrypy.org/ticket/707.
+                return
             msg = x.args[1]
             if msg == "Bad file descriptor":
                 # Our socket was closed