[issue3006] subprocess.Popen causes socket to remain open after close
Kevin Watters
report at bugs.python.org
Fri Aug 1 19:42:09 CEST 2008
Kevin Watters <kevinwatters at gmail.com> added the comment:
I found a workaround for this issue (attached) via the kernel32.dll
function SetHandleInformation. You can patch the socket class to set all
newly created sockets as uninheritable.
It's not perfect--another thread could still spawn a subprocess in
between. We probably need some kind of API for setting socket inheritance.
Added file: http://bugs.python.org/file11029/socketinherit.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3006>
_______________________________________
More information about the Python-bugs-list
mailing list