Title: asyncore.file_dispatcher does not use dup()'ed fd
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: josiahcarlson Nosy List: christianbecke, giampaolo.rodola, josiahcarlson
Priority: normal Keywords: patch

Created on 2008-11-17 00:20 by christianbecke, last changed 2008-11-19 18:33 by josiahcarlson. This issue is now closed.

File name Uploaded Description Edit
asyncore_file_dispatcher_use_duped_fd.diff christianbecke, 2008-11-17 00:20 Patch against use dup()'ed fd in map
Messages (2)
msg75947 - (view) Author: Christian Becke (christianbecke) Date: 2008-11-17 00:20
asyncore.file_dispatcher stores the file descriptor passed to
asyncore.file_dispatcher.__init__ into the map, not the dup()'ed one
created by asyncore.file_wrapper. Because of this, a "select.error (9,
'Bad file descriptor')" is raised in asyncore.loop() if the fd passed to
asyncore.file_dispatcher.__init__ is closed while the loop is running.
Attached patch fixes the issue.
msg76065 - (view) Author: Josiah Carlson (josiahcarlson) * (Python triager) Date: 2008-11-19 18:33
Oy.  You are right.  Fixed in Py3k in r67286, in trunk (2.7) in r67287, 
and 2.6-maintenance in r67288.
Date User Action Args
2008-11-19 18:33:30josiahcarlsonsetstatus: open -> closed
resolution: fixed
messages: + msg76065
2008-11-17 03:53:35giampaolo.rodolasetnosy: + giampaolo.rodola
2008-11-17 02:31:53benjamin.petersonsetassignee: josiahcarlson
nosy: + josiahcarlson
2008-11-17 00:20:29christianbeckecreate