STINNER Victor <victor.stin...@gmail.com> added the comment: "it seems that OpenSSL socket calls can fail with EINTR: ..."
You are easily test by raising a signal: see Lib/test/test_eintr.py which stress Python functions by sending a signal every 100 ms while Python is blocked in a syscall. If there is a bug, sure, it must be fixed ;-) It was very tricky to handle EINTR properly in the socket module. While most Python functions are thin wrapper to syscalls with no timeout, almost every socket functions have a timeout. So I wrote sock_call() to factorize the code. This function calls select() internally to check if the socket is "ready", but also updates the timeout, etc. A few other Python are retried on EINTR and update a timeout, like select.select(), time.sleep(), threading.Lock.acquire() and signal.sigtimedwait(). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32275> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com