This repository has been archived by the owner. It is now read-only.
Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upasyncio.create_subprocess_exec with IO redirection hangs if no global loop set #478
Comments
|
A similar issue has been reported (#390), and the hanging problem has been fixed in PR #391. However, you still need to attach the event loop to the child watcher explicitly in order to manage subprocesses without relying on the asyncio policy to provide the event loop (specific to Unix):
Also related: #421, see this comment. |
|
@vxgmichel thanks for the information! Attaching loop to the child watcher helps. So this is already fixed and will be included in the next Python 3.5 release? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.


If I set global event loop to None (
asyncio.set_event_loop(None)) and explicitly pass everywhere event loop,asyncio.create_subprocess_execwith I/O redirection will hang.In following example
proc.communicate()will never return:With
PYTHONASYNCIODEBUG=x:Tested on Ubuntu 16.04, with Python 3.5.2.