Richard Oudkerk added the comment:
Rather than
self.sock = None
I would do
self.sock.close()
which should work better for non-refcounted Pythons.
Of course it would be better to do this immediately after forking (i.e. before
any more fds are created), otherwise you could still accidentally zap the fd of
some other object.
If you can't do this immediately after forking then maybe it is better to move
inherited potentially broken objects to a garbage list to prevent garbage
collection.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue17981>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com