rpms/python-cherrypy/F-7 python-cherrypy-2.2.1-EINTR.patch, NONE, 1.1 python-cherrypy.spec, 1.13, 1.14

Luke Macken (lmacken) fedora-extras-commits at redhat.com
Sun Nov 4 18:52:57 UTC 2007


Author: lmacken

Update of /cvs/pkgs/rpms/python-cherrypy/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28787

Modified Files:
	python-cherrypy.spec 
Added Files:
	python-cherrypy-2.2.1-EINTR.patch 
Log Message:
* Sat Nov  3 2007 Luke Macken <lmacken at redhat.com> 2.2.1-7
- Apply backported fix from http://www.cherrypy.org/changeset/1766
  to improve CherryPy's SIGSTOP/SIGCONT handling (Bug #364911).
  Thanks to Nils Philippsen for the patch.



python-cherrypy-2.2.1-EINTR.patch:

--- NEW FILE python-cherrypy-2.2.1-EINTR.patch ---
diff -up cherrypy/_cpwsgiserver.py.EINTR cherrypy/_cpwsgiserver.py
--- cherrypy/_cpwsgiserver.py.EINTR	2006-04-25 03:37:45.000000000 +0200
+++ cherrypy/_cpwsgiserver.py	2007-11-03 01:14:20.000000000 +0100
@@ -332,6 +332,22 @@ class CherryPyWSGIServer(object):
             # notice keyboard interrupts on Win32, which don't interrupt
             # 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 in ("Bad file descriptor", "Socket operation on non-socket"):
+                # Our socket was closed.
+                return
+            if msg == "Resource temporarily unavailable":
+                # Just try again. See http://www.cherrypy.org/ticket/479.
+                return
+            raise
     
     def stop(self):
         """Gracefully shutdown a server that is serving forever."""


Index: python-cherrypy.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python-cherrypy/F-7/python-cherrypy.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- python-cherrypy.spec	19 Feb 2007 18:04:16 -0000	1.13
+++ python-cherrypy.spec	4 Nov 2007 18:52:24 -0000	1.14
@@ -2,15 +2,16 @@
 
 Name:           python-cherrypy
 Version:        2.2.1
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        A pythonic, object-oriented web development framework
 Group:          Development/Libraries
 License:        BSD
 URL:            http://www.cherrypy.org/
 Source0:        http://dl.sf.net/cherrypy/CherryPy-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Patch0:         python-cherrypy-tutorial-doc.patch
-Patch1:         python-cherrypy-regression-test.patch
+Patch0:         %{name}-tutorial-doc.patch
+Patch1:         %{name}-regression-test.patch
+Patch2:         %{name}-%{version}-EINTR.patch
 
 BuildArch:      noarch
 
@@ -25,6 +26,7 @@
 %setup -q -n CherryPy-%{version}
 %patch0
 %patch1
+%patch2
 
 
 %build
@@ -55,6 +57,11 @@
 %{python_sitelib}/cherrypy/filters/*.py*
 
 %changelog
+* Sat Nov  3 2007 Luke Macken <lmacken at redhat.com> 2.2.1-7
+- Apply backported fix from http://www.cherrypy.org/changeset/1766
+  to improve CherryPy's SIGSTOP/SIGCONT handling (Bug #364911).
+  Thanks to Nils Philippsen for the patch.
+
 * Mon Feb 19 2007 Luke Macken <lmacken at redhat.com> 2.2.1-6
 - Disable regression tests until we can figure out why they
   are dying in mock.




More information about the fedora-extras-commits mailing list