[issue5661] asyncore should catch EPIPE while sending() and receiving()

Charles-François Natali report at bugs.python.org
Sat Oct 29 15:23:43 CEST 2011


Charles-François Natali <neologix at free.fr> added the comment:

> The test fails when use_poll is True.
> The difference between using poll() and poll2():

poll uses select(2), while poll2 uses poll(2) (duh, that's confusing).
It seems that on OS X Snow Leopard, poll(2) sets the POLLPRI flag upon EPIPE (and probably doesn't return the FD in the exception set for select(2)...).
Not sure whether it's legal, but it's the only OS to do that (POLLPRI usually used for OOB data). Also, note that Tiger doesn't behave that way.
OS X often offers such surprises :-)

> What about forcing self.use_poll to False, before calling
> loop_waiting_for_flag() ? The drawback being that the test will be run
> twice with the same environment.

I just added an handle_expt() handler, and it works fine.

Closing, thanks for the patch!

----------
assignee: josiahcarlson -> 
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5661>
_______________________________________


More information about the Python-bugs-list mailing list