Message365095
From https://bugs.python.org/issue1187312 about regular subprocesses:
> So as long as the application keeps a reference to the
> subprocess object, it can wait for it; auto-reaping only
> starts when the last reference was dropped [in Popen.__del__].
asyncio subprocesses seem to behave differently. When we notice the process has exited in BaseSubprocessTransport._process_exited, we call _try_finish(), which -- if all pipes are closed -- calls _call_connection_lost and sets self._proc to None.
At this point, my understanding is that once self._proc is GC'ed, we'll run Popen.__del__ and may reap the pid.
I would expect asyncio subprocesses to behave the same way as regular Popen objects wrt pid reaping. |
|
Date |
User |
Action |
Args |
2020-03-26 17:06:33 | Justin.Lebar | set | recipients:
+ Justin.Lebar, asvetlov, yselivanov |
2020-03-26 17:06:33 | Justin.Lebar | set | messageid: <1585242393.56.0.193315651182.issue40078@roundup.psfhosted.org> |
2020-03-26 17:06:33 | Justin.Lebar | link | issue40078 messages |
2020-03-26 17:06:33 | Justin.Lebar | create | |
|