Skip to content

Control + C Fails to cleanly stop sherlock #2756#2914

Open
MeriemBchini wants to merge 3 commits into
sherlock-project:masterfrom
MeriemBchini:cntrlC-clean-exit
Open

Control + C Fails to cleanly stop sherlock #2756#2914
MeriemBchini wants to merge 3 commits into
sherlock-project:masterfrom
MeriemBchini:cntrlC-clean-exit

Conversation

@MeriemBchini
Copy link
Copy Markdown

Fix: Clean Ctrl+C handling and immediate exit

Problem

Sherlock did not handle Ctrl+C (SIGINT) cleanly in all cases.
Interrupting execution could leave the program in an inconsistent state or delay termination due to ongoing requests.

Solution

  • Implemented a proper signal handler for SIGINT
  • Ensured the program exits immediately and gracefully when Ctrl+C is triggered
  • Prevented unnecessary stack traces or hanging behavior during interruption

Changes

  • Added/updated handler() for clean exit
  • Integrated signal handling into the main execution flow
  • Improved user experience during long-running scans

Result

  • Immediate and clean termination on Ctrl+C
  • No unexpected errors or delays when stopping execution
  • Improved CLI usability

Notes

  • No impact on existing features or output formats
  • Backward compatible with current behavior

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