-
-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
open_process() sometimes "swallows" exceptions #1844
Comments
Doing infinite loop with bash also prevents it from terminating the subprocess: async with await trio.open_process("bash -c 'while true; do sleep 1; done'", shell=True):
... |
If you are curious about the infinite loop in the subprocess, it was on purpose. I was reimplementing Is the silent wait expected behaviour? It was confusing to me. I think I would want the subprocess to be terminated on exceptions, rather than wait forever. Alternatively, is there a way to tell In the meantime I will learn to scroll the traceback after pushing Ctrl-C on mysterious hangs :) |
I had an error in my code:
Running the above felt as if the program just hangs:
If I press Ctrl-C, I finally get my
TypeError
printed out. It looks as if it was buffered before:(Of course, I haven't noticed
TypeError
at first, because the interesting part comes before deepKeyboardInterrupt
traceback.)I would expect Trio not to hide exceptions from me :-)
Trio 0.17.0, MacOS 10.14.6, Python 3.9.0.
Full output, seems to block on `await wait_child_exiting()`
The text was updated successfully, but these errors were encountered: