Revision bf988c29 lib/utils.py
b/lib/utils.py | ||
---|---|---|
203 | 203 |
fcntl.fcntl(fd, fcntl.F_SETFL, status | os.O_NONBLOCK) |
204 | 204 |
|
205 | 205 |
while fdmap: |
206 |
for fd, event in poller.poll(): |
|
206 |
try: |
|
207 |
pollresult = poller.poll() |
|
208 |
except EnvironmentError, eerr: |
|
209 |
if eerr.errno == errno.EINTR: |
|
210 |
continue |
|
211 |
raise |
|
212 |
except select.error, serr: |
|
213 |
if serr[0] == errno.EINTR: |
|
214 |
continue |
|
215 |
raise |
|
216 |
|
|
217 |
for fd, event in pollresult: |
|
207 | 218 |
if event & select.POLLIN or event & select.POLLPRI: |
208 | 219 |
data = fdmap[fd][1].read() |
209 | 220 |
# no data from read signifies EOF (the same as POLLHUP) |
Also available in: Unified diff