我时常遇到这个错误,但不确定如何调试。
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/tornado/ioloop.py", line 662, in start
event_pairs = self._impl.poll(poll_timeout)
IOError: [Errno 4] Interrupted system call
有谁知道这意味着什么/什么时候发生?
我正在使用 python 2.7 和 tornado 3.2.1
更新:这段代码在ioloop.py
try:
event_pairs = self._impl.poll(poll_timeout)
except Exception as e:
# Depending on python version and IOLoop implementation,
# different exception types may be thrown and there are
# two ways EINTR might be signaled:
# * e.errno == errno.EINTR
# * e.args is like (errno.EINTR, 'Interrupted system call')
if (getattr(e, 'errno', None) == errno.EINTR or
(isinstance(getattr(e, 'args', None), tuple) and
len(e.args) == 2 and e.args[0] == errno.EINTR)):
continue
else:
raise
最佳答案
看来你应该升级你的 Tornado 版本;此错误(从 poll
返回的 EINTR
)似乎是 fixed in the latest versions .
关于python - Tornado 中断的系统调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30048580/