This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Justin.Lebar
Recipients Justin.Lebar, asvetlov, yselivanov
Date 2020-03-26.17:06:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1585242393.56.0.193315651182.issue40078@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-03-26 17:06:33Justin.Lebarsetrecipients: + Justin.Lebar, asvetlov, yselivanov
2020-03-26 17:06:33Justin.Lebarsetmessageid: <1585242393.56.0.193315651182.issue40078@roundup.psfhosted.org>
2020-03-26 17:06:33Justin.Lebarlinkissue40078 messages
2020-03-26 17:06:33Justin.Lebarcreate