Opened 8 years ago
Closed 8 years ago
#14029 closed enhancement (fixed)
Exit Sage ungracefully upon SIGQUIT
Reported by: | jdemeyer | Owned by: | jdemeyer |
---|---|---|---|
Priority: | major | Milestone: | sage-5.13 |
Component: | c_lib | Keywords: | |
Cc: | leif, pbruin | Merged in: | sage-5.13.beta2 |
Authors: | Jeroen Demeyer | Reviewers: | Peter Bruin |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #13908, #13996 | Stopgaps: |
Description (last modified by )
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.
Attachments (1)
Change History (10)
comment:1 Changed 8 years ago by
- Description modified (diff)
- Summary changed from SIGQUIT: exit Sage ungracefully with traceback to Exit Sage ungracefully upon SIGQUIT
comment:2 Changed 8 years ago by
- Dependencies changed from #13908 to #13908, #13996
comment:3 Changed 8 years ago by
- Status changed from new to needs_review
Changed 8 years ago by
comment:4 Changed 8 years ago by
- Cc leif added
comment:5 Changed 8 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:6 Changed 8 years ago by
- Cc pbruin added
comment:7 follow-up: ↓ 8 Changed 8 years ago by
- Reviewers set to Peter Bruin
- Status changed from needs_review to positive_review
comment:8 in reply to: ↑ 7 Changed 8 years ago by
Replying to pbruin:
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 interruptsage-CSI
. I'm not sure why; is the^\
somehow intercepted by GDB? Pressing^C
during these 10 seconds does generate a PythonKeyboardInterrupt
insage-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.
comment:9 Changed 8 years ago by
- Merged in set to sage-5.13.beta2
- Resolution set to fixed
- Status changed from positive_review to closed
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 interruptsage-CSI
. I'm not sure why; is the^\
somehow intercepted by GDB? Pressing^C
during these 10 seconds does generate a PythonKeyboardInterrupt
insage-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.