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

Add KeyboardInterrupt handler to fix missing exit behavior #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

omranisecurity
Copy link

This pull request adds a KeyboardInterrupt handler to the project, which handles user interruptions (Ctrl + C) gracefully. Prior to this change, the program would throw errors when interrupted because no exit handler was defined.

Key changes:

  • Added a handler for KeyboardInterrupt to provide a friendly exit message.
  • Fixed errors that occurred due to the lack of an exit handler for keyboard interrupts.
  • Users are now prompted to press Ctrl + C to exit the program gracefully.

This update improves user experience and ensures the application exits cleanly when interrupted.

Before fix: Error on interrupt
image

After fix: Graceful exit message
image

Implemented a KeyboardInterrupt handler to display a message prompting the user to press Ctrl + C to exit the program.
This fixes errors caused by the absence of an exit handler for keyboard interrupts, ensuring the process exits gracefully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant