Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch KeyboardInterrupt once and for all #80

Open
tushar-rishav opened this issue Jun 23, 2016 · 2 comments
Open

Catch KeyboardInterrupt once and for all #80

tushar-rishav opened this issue Jun 23, 2016 · 2 comments

Comments

@tushar-rishav
Copy link
Member

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.

@gitmate-bot
Copy link

Thanks for reporting this issue!

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

@Redridge
Copy link
Member

Redridge commented Jun 29, 2016

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants