Ronal Abraham <ronalabra...@gmail.com> added the comment:

Reproducing the program here:

    import asyncio
    
    async def test():
        process = await asyncio.create_subprocess_shell(
            "sleep 2 && echo done",
            stdout=asyncio.subprocess.PIPE,
        )
        await asyncio.sleep(1)
        process.kill()
        await process.wait()
        # process._transport.close()
    
    asyncio.run(test())

Can I use the high-level API to kill a subprocess cleanly without having to 
access the protected member process._transport? Seems like an oversight perhaps?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43884>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to