Patches item #1628205, was opened at 2007-01-04 13:37 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1628205&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Modules Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Maxim Sobolev (sobomax) Assigned to: Nobody/Anonymous (nobody) Summary: socket.readline() interface doesn't handle EINTR properly Initial Comment: The socket.readline() interface doesn't handle EINTR properly. Currently, when EINTR received exception is not handled and all data that has been in the buffer is lost. There is no way to recover that data from the code that uses the interface. Correct behaviour would be to catch EINTR and restart recv(). Patch is attached. Following is the real world example of how it affects httplib module: File "/usr/local/lib/python2.4/xmlrpclib.py", line 1096, in __call__ return self.__send(self.__name, args) File "/usr/local/lib/python2.4/xmlrpclib.py", line 1383, in __request verbose=self.__verbose File "/usr/local/lib/python2.4/xmlrpclib.py", line 1131, in request errcode, errmsg, headers = h.getreply() File "/usr/local/lib/python2.4/httplib.py", line 1137, in getreply response = self._conn.getresponse() File "/usr/local/lib/python2.4/httplib.py", line 866, in getresponse response.begin() File "/usr/local/lib/python2.4/httplib.py", line 336, in begin version, status, reason = self._read_status() File "/usr/local/lib/python2.4/httplib.py", line 294, in _read_status line = self.fp.readline() File "/usr/local/lib/python2.4/socket.py", line 325, in readline data = recv(1) error: (4, 'Interrupted system call') -Maxim ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1628205&group_id=5470 _______________________________________________ Patches mailing list Patches@python.org http://mail.python.org/mailman/listinfo/patches