message: Fix segmeng fault after pressing ctrl+c
diff: @@ -404,14 +404,20 @@ def traceback():
  def quit_app():
  quit_app_();
  +exit_by_signal_handler = False
  +
  def signal_handler(signal, frame):
  - quit_app()
  - sys.exit(0);
  + global exit_by_signal_handler
  + produce_block()
  + quit_app_()
  + exit_by_signal_handler = True
  + exit()
  def register_signal_handler():
  signal.signal(signal.SIGINT, signal_handler)
  def on_python_exit():
  + if not exit_by_signal_handler:
  produce_block()
  quit_app_()
  