Skip to content

feat: add signal handling for Ctrl+C and Ctrl+Z - #2

Merged
antiquark007 merged 1 commit into
antiquark007:mainfrom
Bharathsencha:feature/signal-handling
Oct 13, 2025
Merged

feat: add signal handling for Ctrl+C and Ctrl+Z#2
antiquark007 merged 1 commit into
antiquark007:mainfrom
Bharathsencha:feature/signal-handling

Conversation

@Bharathsencha

Copy link
Copy Markdown

This commit introduces signal handling for SIGINT (Ctrl+C) and SIGTSTP (Ctrl+Z) t

  • A new "sigint_handler" function is implemented to catch the SIGINT signal. Instead of terminating the shell now clears the current input line and displays a fresh prompt.
  • The SIGTSTP signal is now ignored, preventing the shell from being suspended with Ctrl+Z.
  • The signal handlers are registered at the start of the shell's execution.

This commit introduces signal handling for SIGINT (Ctrl+C) and SIGTSTP (Ctrl+Z) t

- A new "sigint_handler" function is implemented to catch the SIGINT signal. Instead of terminating the shell now clears the current input line and displays a fresh prompt.
- The SIGTSTP signal is now ignored, preventing the shell from being suspended with Ctrl+Z.
- The signal handlers are registered at the start of the shell's execution.
@antiquark007

Copy link
Copy Markdown
Owner

thanks @Bharathsencha

@antiquark007
antiquark007 merged commit f295719 into antiquark007:main Oct 13, 2025
1 check failed
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.

2 participants