diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2018-10-03 13:42:20 +0000 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2018-10-03 13:42:20 +0000 |
commit | 0a1f8e3c41c0decc97a994b2b7da857a03585121 (patch) | |
tree | 4e6c22f5ef58453612ed1005d1b66107d4d5e10f | |
parent | e49698076529da604ecdadb91c10d9d4a2a2a736 (diff) | |
parent | a08143999be80a85875c9ea01380e573a9a787f4 (diff) | |
download | buildstream-0a1f8e3c41c0decc97a994b2b7da857a03585121.tar.gz |
Merge branch 'tristan/fix-double-terminate-prompt' into 'master'
_scheduler/scheduler.py: Ignore interrupt events while terminating.
Closes #693
See merge request BuildStream/buildstream!852
-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 090d490ba..b76c7308e 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: |