Message51655
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 |
|
Date |
User |
Action |
Args |
2007-08-23 15:56:00 | admin | link | issue1628205 messages |
2007-08-23 15:56:00 | admin | create | |
|