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

Handle CTRL+C properly #94

Open
mzfr opened this issue Jun 15, 2019 · 3 comments
Open

Handle CTRL+C properly #94

mzfr opened this issue Jun 15, 2019 · 3 comments
Labels
good first issue Good for newcomers kwoc

Comments

@mzfr
Copy link
Collaborator

mzfr commented Jun 15, 2019

Currently pressing ctrl+c while scans are going on we get a big traceback.
It would be nice if we can handle that traceback and print something nice like Canceled by the user or something similar.

Read this to understand how to do it properly.

@mzfr mzfr added the good first issue Good for newcomers label Jun 15, 2019
@4lovi4
Copy link

4lovi4 commented Jun 17, 2019

Tried to implement here #98. But the solution is not so obvious. Can't find the way to gracefully stop running scanning thread. So need to press Ctrl-C two times in a row.

@mzfr mzfr added the kwoc label Dec 3, 2019
@RC-Rajat RC-Rajat mentioned this issue Dec 5, 2019
@RC-Rajat
Copy link

RC-Rajat commented Dec 5, 2019

Tried to solve #94 by putting the entire body of code within a try...except block.On keyboard interrupt, The except block displays 'Process Stopped by user'. However,it also gives an Exception and a traceback.To stop that, I redirected stderr to a file 'err.txt'. This makes it such that the user gets a clean response on pressing Ctrl + C.My implementation is Here #99.

@darkLucifer321
Copy link

I would like to work on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers kwoc
Projects
None yet
Development

No branches or pull requests

4 participants