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 gracefully upon SIGHUP #13908
Comments
This comment has been minimized.
This comment has been minimized.
Author: Jeroen Demeyer |
comment:6
Sounds good to me. |
Reviewer: Volker Braun |
comment:8
See sage-devel. |
comment:9
Since the main motivation is to have some way of gracefully terminating Sage, I'm handling only |
This comment has been minimized.
This comment has been minimized.
Attachment: 13908_no_SIGTERM.patch.gz |
comment:11
Attachment: 13908_terminate.patch.gz |
This comment has been minimized.
This comment has been minimized.
comment:13
Hmm I didn't see any discussion on sage-devel about SIGTERM but getting started with just catching SIGHUP is fine, too. |
comment:14
For the SIGTERM problem, see https://groups.google.com/forum/?fromgroups#!search/sage-devel$2013908/sage-devel/5BfDSSdN5qw/AcWANg5v2KwJ |
Merged: sage-5.7.beta2 |
comment:16
I was running a moinmoin wiki with sage. With this patch applied, that doesn't work anymore because of the new interruption handling in When running the wiki using
and importing
The issue seems to be solved when I comment out the signal in Question: Is there a (reasonable and finite) way to fix this issue properly? Can something serious go wrong if I comment these lines out? Thanks, Christian |
comment:17
Replying to @stumpc5:
Not very serious. Interrupt handling might be a bit messed up, in particular some interrupts (CTRL-C) might be seen twice: once by the default Python handler ( The line
is mainly used to ensure that only the Sage signal handler is used. But this will certainly have no consequences beyond interrupt handling. |
Change the signal handling code to allow a graceful forced exit of Sage. "graceful" meaning that code is interrupted and the normal exit handlers are run. This graceful exit is not guaranteed to work, code which is currently not interruptible would not be exited.
This might be used by the doctesting framework to handle timeouts.
This patch also improves interrupt debugging:
Apply: attachment: 13908_terminate.patch
Depends on #13748
Depends on #13946
Component: c_lib
Author: Jeroen Demeyer
Reviewer: Volker Braun
Merged: sage-5.7.beta2
Issue created by migration from https://trac.sagemath.org/ticket/13908
The text was updated successfully, but these errors were encountered: