加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Python > 正文

python – 龙卷风中断系统调用

发布时间:2020-12-20 13:49:25 所属栏目:Python 来源:网络整理
导读:我不时收到这个错误,不知道如何调试. 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 有谁知
我不时收到这个错误,不知道如何调试.

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版本;这个错误(EINTR从民意调查返回)似乎是 fixed in the latest versions.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读