[issue808164] socket.close() doesn't play well with __del__

Daniel Stutzbach report at bugs.python.org
Tue Mar 31 21:49:14 CEST 2009


Daniel Stutzbach <daniel at stutzbachenterprises.com> added the comment:

Daniel,

_closedsocket is a global, so it isn't safe to be used within __del__
during shutdown.

In the py3k branch, socket.__del__ calls socket._real_close which
references the global _socket.  So it's not safe their, either.

----------
nosy: +stutzbach
versions: +Python 2.7, Python 3.0, Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue808164>
_______________________________________


More information about the Python-bugs-list mailing list