-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
runtests.py could detect if the interpreter process crashes #40
Comments
I've implemented a small change for my own code that makes a big difference: wrap the contents of read_to_prompt in: try:
....
except KeyboardError:
print 'Cancelled. Input so far:'
print ''
print self.buf
exit(1) And then change cleanup() to: def cleanup(self):
#print "cleaning up"
if self.p:
try:
os.killpg(self.p.pid, signal.SIGTERM)
except OSError:
pass
self.p = None Then you can ctrl+c out of something and see what happened. This is a HUGE improvement over the current usability, for a very trivial code change. |
@boxed that's a good improvement for sure. I pushed a slight variation on that. Thanks. |
Fixes: #40 - Simplify exception handling by combining keyboard exception into other exception handler. Print out output buffer on all exceptions.
Just pushed a fix that should resolve this. @tbu- can you confirm that it works for you? |
Works for me, immediately errors out. Thanks for the fix. |
Fixes: kanaka#40 - Simplify exception handling by combining keyboard exception into other exception handler. Print out output buffer on all exceptions.
Fixes: kanaka#40 - Simplify exception handling by combining keyboard exception into other exception handler. Print out output buffer on all exceptions.
Would be faster than waiting for timeouts.
The text was updated successfully, but these errors were encountered: