Commit b45361b0 authored by Aurel's avatar Aurel

do not fail if we get the 'try again' error code


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@235 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 0a67db5d
...@@ -10,7 +10,7 @@ except ImportError: ...@@ -10,7 +10,7 @@ except ImportError:
c_uint32 = c_uint c_uint32 = c_uint
c_uint64 = c_ulonglong c_uint64 = c_ulonglong
from os import close from os import close
from errno import EINTR from errno import EINTR, EAGAIN
libc = cdll.LoadLibrary('libc.so.6') libc = cdll.LoadLibrary('libc.so.6')
epoll_create = libc.epoll_create epoll_create = libc.epoll_create
...@@ -65,7 +65,7 @@ class Epoll(object): ...@@ -65,7 +65,7 @@ class Epoll(object):
timeout) timeout)
if n == -1: if n == -1:
e = errno.value e = errno.value
if e == EINTR: if e in (EINTR, EAGAIN):
continue continue
else: else:
raise OSError(e, 'epoll_wait failed') raise OSError(e, 'epoll_wait failed')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment