code: def safe_start(self):
          
          try:
              self.start()
          except (KeyboardInterrupt, IOError):
              # The time.sleep call might raise
              # "IOError: [Errno 4] Interrupted function call" on KBInt.
              self.error_log('Keyboard Interrupt: shutting down')
              self.stop()
              raise
          except SystemExit:
              self.error_log('SystemExit raised: shutting down')
              self.stop()
              raise
docs: Run the server forever, and stop it cleanly on exit.