New submission from Ruslan Kuprieiev :
subprocess keeps the list of active processes in its `_active` list. Whenever
you try to Popen a new process, it is immediately (like right in the first line
of Popen.__init__ [1]) trying to go clean up the old ones. If one of the
processes in that list
Ruslan Kuprieiev added the comment:
Hi Eryk!
Thanks for a swift reply! So the current plan for fixing it is:
1) disable _cleanup, _active, and remove _internal_poll() for windows
2) ignore EBADF(OSError: [WinError 6] The handle is invalid) in terminate() and
probably some other methods
Change by Ruslan Kuprieiev :
--
pull_requests: +14176
pull_request: https://github.com/python/cpython/pull/14360
___
Python tracker
<https://bugs.python.org/issue37
Ruslan Kuprieiev added the comment:
Thanks for pointing that out! I've submitted a tiny patch to skip
``_collect()`` and ``__del__``. Please find it in the Github PR attached.
Looking forward to your feedback!
--
___
Python tracker
&
Ruslan Kuprieiev added the comment:
The `_active` code is pretty old and has not changed since 2.7, so it makes
sense to backport it for now(also, should be very trivial to do that). To me,
it doesn't seem dangerous to backport that, but I would love to hear what Eryk
and others