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 <>
From 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:33Justin.Lebarsetrecipients: + Justin.Lebar, asvetlov, yselivanov
2020-03-26 17:06:33Justin.Lebarsetmessageid: <>
2020-03-26 17:06:33Justin.Lebarlinkissue40078 messages
2020-03-26 17:06:33Justin.Lebarcreate