[issue21602] smtplib.py socket.create_connection() also doesn't handle EINTR properly
New submission from Syou Ei: The smtplib.py also has the same problem. The EINTR cannot be handled properly. 2014-05-21 19:20:15,631 ERROR actions: Notification 'socket_noti' FAILED to send emails to set(['mailt...@tscoss.com']): - [Errno 4] Interrupted system calltrace:Traceback (most recent call last): File "Utils.py", line 719, in sendEmail server = smtplib.SMTP(host, port, timeout=DEFAULT_SOCKET_TIMEOUT) File "/opt/zenoss/lib/python2.7/smtplib.py", line 242, in __init__ (code, msg) = self.connect(host, port) File "/opt/zenoss/lib/python2.7/smtplib.py", line 302, in connect self.sock = self._get_socket(host, port, self.timeout) File "/opt/zenoss/lib/python2.7/smtplib.py", line 277, in _get_socket return socket.create_connection((port, host), timeout) File "/opt/zenoss/lib/python2.7/Write failed: Broken pipecreate_connection -- components: Library (Lib) messages: 219334 nosy: flox, gregory.p.smith, haypo, meishao, neologix, pitrou, tholzer priority: normal severity: normal status: open title: smtplib.py socket.create_connection() also doesn't handle EINTR properly type: behavior versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue21602> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20611] socket.create_connection() doesn't handle EINTR properly
Syou Ei added the comment: http://bugs.python.org/issue21602 The smtplib.py also has the same problem. The EINTR cannot be handled properly. -- nosy: +meishao ___ Python tracker <http://bugs.python.org/issue20611> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20611] socket.create_connection() doesn't handle EINTR properly
Syou Ei added the comment: @neologix, May I attach the patch file of smtplib.py for review? -- ___ Python tracker <http://bugs.python.org/issue20611> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20611] socket.create_connection() doesn't handle EINTR properly
Syou Ei added the comment: @flox Thank you for your comment. So we just only modify the socket.py to handle the system level call, is it right? Please let me attach the patch file of socket.py for 2.7.2. -- Added file: http://bugs.python.org/file35400/socket_2_7_2_patch.py ___ Python tracker <http://bugs.python.org/issue20611> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20611] socket.create_connection() doesn't handle EINTR properly
Changes by Syou Ei : Removed file: http://bugs.python.org/file35400/socket_2_7_2_patch.py ___ Python tracker <http://bugs.python.org/issue20611> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20611] socket.create_connection() doesn't handle EINTR properly
Syou Ei added the comment: @tholzer I've updated socket_2_7_2_patch.py and added the missing break statement. -- Added file: http://bugs.python.org/file35408/socket_2_7_2_patch.py ___ Python tracker <http://bugs.python.org/issue20611> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com