Issue 4332: asyncore.file_dispatcher does not use dup()'ed fd (original) (raw)

Issue4332

Created on 2008-11-17 00:20 by christianbecke, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
asyncore_file_dispatcher_use_duped_fd.diff christianbecke,2008-11-17 00:20 Patch against asyncore.py: 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.
History
Date User Action Args
2022-04-11 14:56:41 admin set github: 48582
2008-11-19 18:33:30 josiahcarlson set status: open -> closedresolution: fixedmessages: +
2008-11-17 03:53:35 giampaolo.rodola set nosy: + giampaolo.rodola
2008-11-17 02:31:53 benjamin.peterson set assignee: josiahcarlsonnosy: + josiahcarlson
2008-11-17 00:20:29 christianbecke create