Author martius
Recipients gvanrossum, martius, vstinner, yselivanov
Date 2014-12-08.11:20:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1418037624.89.0.273221676807.issue21998@psf.upfronthosting.co.za>
In-reply-to
Content
Currently, this is what I do in the child after the fork:

>>> selector = loop._selector
>>> parent_class = selector.__class__.__bases__[0]
>>> selector.unregister = lambda fd: parent_class.unregister(selector, fd)

It replaces unregister() by _BaseSelectorImpl.unregister(), so "our" data structures are still cleaned (the dict _fd_to_key, for instance).

If a fix for this issue is desired in tulip, the first solution proposed by Guido (closing the selector and let the unregister call fail, see the -trivial- patch attached) is probably good enough.
History
Date User Action Args
2014-12-08 11:20:24martiussetrecipients: + martius, gvanrossum, vstinner, yselivanov
2014-12-08 11:20:24martiussetmessageid: <1418037624.89.0.273221676807.issue21998@psf.upfronthosting.co.za>
2014-12-08 11:20:24martiuslinkissue21998 messages
2014-12-08 11:20:24martiuscreate