Martin Richard added the comment: Hi,
Actually, closing and creating a new loop in the child doesn't work either, at least on Linux. When, in the child, we call loop.close(), it performs: self.remove_reader(self._ssock) (in selector_events.py, _close_self_pipe() around line 85) Both the parent and the child still refer to the same underlying epoll structure, at that moment, and calling remove_reader() has an effect on the parent process too (which will never watch the self-pipe again). I attached a test case that demonstrates the issue (and the workaround, commented). ---------- nosy: +martius Added file: http://bugs.python.org/file37306/test2.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21998> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com