coala-html icon indicating copy to clipboard operation
coala-html copied to clipboard

Catch KeyboardInterrupt once and for all

Open tushar-rishav opened this issue 8 years ago • 2 comments

Look https://asciinema.org/a/3x8x364ufuanlhghc6p6fby0k It'd be nice to catch the exceptions that arise and are caught by webbrowser. Not sure how to do this.

tushar-rishav avatar Jun 23 '16 13:06 tushar-rishav

Thanks for reporting this issue!

@coala-analyzer/coala-contributors, your aid is required, fellow coalaian. Help us triage and solving this issue!

gitmate-bot avatar Jun 23 '16 13:06 gitmate-bot

Basically the port remains suspended? I have used something like this in a previous project, maybe it helps. Though it is not platform independent :(

import signal, sys

def signal_handler(signum, frame):
  print ("Exiting...")
  sys.exit(0)

# main somewhere here
signal.signal(signal.SIGINT, signal_handler)

Redridge avatar Jun 29 '16 07:06 Redridge