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

ctrl-c doesn't cancel #1

Open
kousu opened this issue Mar 8, 2018 · 1 comment
Open

ctrl-c doesn't cancel #1

kousu opened this issue Mar 8, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@kousu
Copy link
Contributor

kousu commented Mar 8, 2018

The

except Exception, e:
  ...

section catches KeyboardInterrupt too, which means you can't break out of scanning cleanly; you have to hold Ctrl-C for a while until you get lucky and get in between the runs.

I think the way to handle this is to add KeyboardInterrupt as a special case, and just raise it. You can probably also sys.stdin.close() in any subprocesses (after fork() but before exec(), which is something you can configure with like, making sure to set stdin=None) that shouldn't be handling input.

@kousu kousu changed the title ctrl-c doesn't canc ctrl-c doesn't cancel Mar 8, 2018
@johnsaigle johnsaigle added the bug Something isn't working label Mar 8, 2018
@kousu
Copy link
Contributor Author

kousu commented Mar 15, 2018

btw, using multiprocessing probably makes this worse, because it could leave orphan testssl processes running; you need the code that catches KeyboardInterrupt to kill off its children.

@johnsaigle johnsaigle added this to To do in Stuff to build via automation Mar 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Stuff to build
  
To do
Development

No branches or pull requests

2 participants