本文介绍了Tornado 中断系统调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不时收到此错误,不知道如何调试.
I'm getting this error from time to time and not sure how can be debugged.
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
有人知道这是什么意思/什么时候发生吗?
Does anyone know what this means / when is happening?
我使用的是 python 2.7 和 tornado 3.2.1
I'm using python 2.7 and 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
)似乎是已在最新版本中修复.
It seems you should upgrade your version of Tornado; this bug (EINTR
returned from poll
) appears to be fixed in the latest versions.
这篇关于Tornado 中断系统调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!