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 aeros
Recipients aeros, asvetlov, benjamin.peterson, nanjekyejoannah, njs, vstinner, yselivanov
Date 2019-11-05.22:07:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> My the main question is: how to detect if the new watcher can be used or asyncio should fallback to threaded based solution?

Perhaps in the __init__ we could do something like this:

class PidfdChildWatcher(AbstractChildWatcher):

    def __init__(self):
        if not hasattr(os, "pidfd_open"):
             raise RuntimeError("os.pidfd_open() is unavailable.")


> My WIP progress patch is attached. It passes all asyncio tests.

I think we could also specifically look for race conditions with `./python -m test test_asyncio.test_subprocess -F -j4`, rather than relying on the tests passing with a single job. The other child watchers have been particularly infamous when it comes race conditions and resource leaks. 

I'd be glad to work on testing and opening a PR to asyncio if needed (while giving Benjamin credit for the patch of course).
Date User Action Args
2019-11-05 22:07:22aerossetrecipients: + aeros, vstinner, benjamin.peterson, njs, asvetlov, yselivanov, nanjekyejoannah
2019-11-05 22:07:22aerossetmessageid: <>
2019-11-05 22:07:22aeroslinkissue38692 messages
2019-11-05 22:07:22aeroscreate