Skip to content
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

Exit Sage ungracefully upon SIGQUIT #14029

Closed
jdemeyer opened this issue Jan 28, 2013 · 8 comments
Closed

Exit Sage ungracefully upon SIGQUIT #14029

jdemeyer opened this issue Jan 28, 2013 · 8 comments

Comments

@jdemeyer
Copy link

When Sage is somehow totally stuck, one can still quit Sage using SIGQUIT (CTRL-\ on the keyboard). It would be useful if this would give a nice traceback. In other words: treat SIGQUIT like SIGSEGV, except that it should always exit Sage, never raise an exception.

Depends on #13908
Depends on #13996

CC: @nexttime @pjbruin

Component: c_lib

Author: Jeroen Demeyer

Reviewer: Peter Bruin

Merged: sage-5.13.beta2

Issue created by migration from https://trac.sagemath.org/ticket/14029

@jdemeyer jdemeyer added this to the sage-5.11 milestone Jan 28, 2013
@jdemeyer jdemeyer self-assigned this Jan 28, 2013
@jdemeyer

This comment has been minimized.

@jdemeyer jdemeyer changed the title SIGQUIT: exit Sage ungracefully with traceback Exit Sage ungracefully upon SIGQUIT Jan 28, 2013
@jdemeyer
Copy link
Author

Changed dependencies from #13908 to #13908, #13996

@jdemeyer
Copy link
Author

Author: Jeroen Demeyer

@jdemeyer
Copy link
Author

Attachment: 14029_SIGQUIT.patch.gz

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@pjbruin
Copy link
Contributor

pjbruin commented Oct 29, 2013

comment:7

This looks like a useful feature to me. The patch looks good and behaves as expected, and all doctests pass.

The fact that sage-CSI is run does mean that if GDB is available, it now takes about 10 seconds before you are back at the shell. Pressing ^\ a second time does not immediately interrupt sage-CSI. I'm not sure why; is the ^\ somehow intercepted by GDB? Pressing ^C during these 10 seconds does generate a Python KeyboardInterrupt in sage-CSI, but does not immediately get you back to the shell either.

Anyway, the issues in the above paragraph are only slightly annoying and should probably be addressed elsewhere than in this ticket (if at all), so no reason against a positive review.

@pjbruin
Copy link
Contributor

pjbruin commented Oct 29, 2013

Reviewer: Peter Bruin

@jdemeyer
Copy link
Author

comment:8

Replying to @pjbruin:

The fact that sage-CSI is run does mean that if GDB is available, it now takes about 10 seconds before you are back at the shell. Pressing ^\ a second time does not immediately interrupt sage-CSI. I'm not sure why; is the ^\ somehow intercepted by GDB? Pressing ^C during these 10 seconds does generate a Python KeyboardInterrupt in sage-CSI, but does not immediately get you back to the shell either.

That's right indeed. It seems that, once GDB gets hold of a process, there is no easy way to get out.

@jdemeyer
Copy link
Author

Merged: sage-5.13.beta2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants