[issue17981] SysLogHandler closes connection before using it
Richard Oudkerk
report at bugs.python.org
Thu May 16 21:17:31 CEST 2013
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 <report at bugs.python.org>
<http://bugs.python.org/issue17981>
_______________________________________
More information about the Python-bugs-list
mailing list