Emanuel Zephir <emanuelzep...@gmail.com> added the comment:

I believe this to be a bug in the standard library instead of solely being the 
result of an application error.

When a Popen instance is finalized by the garbage collector, the internal 
handle is also finalized and closed despite the instance being put on the 
active list. This results in _cleanup throwing because the handle can no longer 
be used.

I've attached a small reproduction.

----------
nosy: +emanuel
Added file: https://bugs.python.org/file48493/invalid_handle.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37380>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to