# HG changeset patch # User Tuomo Valkonen # Date 1517143310 0 # Node ID 4e7678dd7b42a972775f413ad02ab9bed369ec39 # Parent 7bcd715f19e37c92d551063746451be4c828dbf3 Enable Ctrl+C in MacOS UI mode. TODO: proper exit handler, which seems to require ditching/forking/extending rumps to extend the NSApp class diff -r 7bcd715f19e3 -r 4e7678dd7b42 borgend.py --- a/borgend.py Sun Jan 28 12:00:18 2018 +0000 +++ b/borgend.py Sun Jan 28 12:41:50 2018 +0000 @@ -83,6 +83,11 @@ # Wait for scheduler to finish scheduler.join() else: + # This is needed for Ctrl+C to work. + # TODO: proper exit handler, which seems to require + # ditching/forking/extending rumps to extend the NSApp class + from PyObjCTools.AppHelper import installMachInterrupt + installMachInterrupt() # Start UI, and let it handle exit control from borgend.ui import BorgendTray tray=BorgendTray(backups); @@ -94,6 +99,8 @@ logger.exception("Exception fell through: exiting") finally: + logger.debug("Exiting") + for b in backups: b.terminate()