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 stefan
Recipients asvetlov, stefan, vstinner, yselivanov
Date 2019-01-08.01:54:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <6c654727-4b7f-0074-9211-6c02337731a5@seefeld.name>
In-reply-to <1546910858.5.0.924059982783.issue35635@roundup.psfhosted.org>
Content
> The limitation is a consequence of how Linux works.
> Unix has no cross-platform API for non-blocking waiting for child process finish except handling SIGCHILD signal.

Why does the `wait()` have to be non-blocking ? We can call it once in 
response to the reception of a `SIGCHILD`, where we know the call 
wouldn't block. Then we can pass the `pid` to whatever event loop 
created the subprocess to do the cleanup there...

> On the other hand signal handlers in Python should work in the main thread.

That's fine.

> Your trick with a loop creation in the main thread and actual running in another thread can work, but asyncio doesn't guarantee it.
> The behavior can be broken in next releases, sorry.

Yeah, I observed some strange issues that looked like they could be 
fixed by someone intimately familiar with `asyncio`. But given the 
documented limitation, it seemed wise not to descend into that rabbit 
hole, and so I (at least temporarily) abandoned the entire approach.

--

Stefan

       ...ich hab' noch einen Koffer in Berlin...
History
Date User Action Args
2019-01-08 01:54:30stefansetrecipients: + stefan, vstinner, asvetlov, yselivanov
2019-01-08 01:54:28stefanlinkissue35635 messages
2019-01-08 01:54:28stefancreate