Skip to content
Snippets Groups Projects
Commit e80f435a authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

_scheduler/scheduler.py: Ignore interrupt events while terminating.

For some reason, we now receive a SIGINT from the main loop even
when the SIGINT occurred with the handler disconnected in an interactive
prompt. This patch simply ignores any received SIGINT events from the
main loop in the case that we are already in the process of terminating.

This fixes issue #693
parent a33fd160
No related branches found
No related tags found
1 merge request!853_scheduler/scheduler.py: Ignore interrupt events while terminating.
Pipeline #31885607 passed
......@@ -387,6 +387,15 @@ class Scheduler():
# A loop registered event callback for keyboard interrupts
#
def _interrupt_event(self):
# FIXME: This should not be needed, but for some reason we receive an
# additional SIGINT event when the user hits ^C a second time
# to inform us that they really intend to terminate; even though
# we have disconnected our handlers at this time.
#
if self.terminated:
return
# Leave this to the frontend to decide, if no
# interrrupt callback was specified, then just terminate.
if self._interrupt_callback:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment