[New-bugs-announce] [issue4501] asyncore's urgent data management and connection closed events are broken when using poll()
Giampaolo Rodola'
report at bugs.python.org
Wed Dec 3 02:10:55 CET 2008
New submission from Giampaolo Rodola' <billiejoex at users.sourceforge.net>:
I discovered that some pyftpdlib [1] tests fail when using poll()
instead of select().
The problem is in asyncore.readwrite() function which erroneously calls
handle_read_event() in case of a POLLPRI event.
The patches modify readwrite() function so that:
- POLLPRI is now treated as synonym for "there is urgent data to read"
so handle_expt_event() is called.
- POLLHUP, POLLERR and POLLINVAL are now treated as synonyms for "the
connection has been closed" (Twisted behaves exactly the same) so
handle_close() is called.
Both pyftpdlib and asyncore tests passed on Linux Debian Etch and
FreeBSD 7.0-RC1.
[1] http://code.google.com/p/pyftpdlib/
----------
components: Library (Lib)
files: asyncore.patch
keywords: patch
messages: 76807
nosy: giampaolo.rodola, josiah.carlson, josiahcarlson
severity: normal
status: open
title: asyncore's urgent data management and connection closed events are broken when using poll()
type: behavior
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1
Added file: http://bugs.python.org/file12206/asyncore.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4501>
_______________________________________
More information about the New-bugs-announce
mailing list