diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2018-10-03 12:37:24 +0000 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2018-10-03 12:37:24 +0000 |
commit | 013a8ad47f612b799e51e24181b122f04faf22ff (patch) | |
tree | 87a58f58f4d490c5f9e1506235f72db77285e8f8 | |
parent | a33fd160ab68e79e60c7a4981d102a63baea8f94 (diff) | |
parent | e80f435abe1655e7c9fa1e3ae5756d63d262cc35 (diff) | |
download | buildstream-013a8ad47f612b799e51e24181b122f04faf22ff.tar.gz |
Merge branch 'tristan/fix-double-terminate-prompt-1.2' into 'bst-1.2'
_scheduler/scheduler.py: Ignore interrupt events while terminating.
See merge request BuildStream/buildstream!853
-rw-r--r-- | buildstream/_scheduler/scheduler.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/buildstream/_scheduler/scheduler.py b/buildstream/_scheduler/scheduler.py index 09af63de5..2975f9758 100644 --- a/buildstream/_scheduler/scheduler.py +++ b/buildstream/_scheduler/scheduler.py @@ -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: |