You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a subprocess using asyncio-glib and having stdout as a PIPE, the EOF is never received. This happens because the selector doesn't listen for the GLib HUP signal.
A minimal non-working example:
import asyncio
from asyncio import subprocess
from asyncio_glib import GLibEventLoopPolicy
async def main():
proc = await asyncio.create_subprocess_exec('ls', '-la', '/tmp', stdout=subprocess.PIPE)
async for line in proc.stdout:
print(line)
print('DONE')
if __name__ == '__main__':
asyncio.set_event_loop_policy(GLibEventLoopPolicy())
asyncio.run(main())
The print('DONE') line is never reached. When running this wihtout the GLibEventLoopPolicy, it does work.
The text was updated successfully, but these errors were encountered:
When running a subprocess using asyncio-glib and having stdout as a PIPE, the EOF is never received. This happens because the selector doesn't listen for the GLib HUP signal.
A minimal non-working example:
The print('DONE') line is never reached. When running this wihtout the GLibEventLoopPolicy, it does work.
The text was updated successfully, but these errors were encountered: