Handle Unix signals correctly for a robust interactive shell.
Behavior:
SIGINT (Ctrl+C): forward to foreground process group, don't kill the shell
SIGTSTP (Ctrl+Z): suspend foreground process, return control to shell
SIGCHLD: reap completed background jobs
- Provide clear feedback (e.g., print newline after Ctrl+C, don't leave prompt broken)
Per ferrish's explicit over implicit principle, signal behavior should be predictable and visible.
Platform note: This is primarily Unix/macOS. On Windows, consider graceful no-ops or platform-specific alternatives.
Acceptance criteria:
Handle Unix signals correctly for a robust interactive shell.
Behavior:
SIGINT(Ctrl+C): forward to foreground process group, don't kill the shellSIGTSTP(Ctrl+Z): suspend foreground process, return control to shellSIGCHLD: reap completed background jobsPer ferrish's explicit over implicit principle, signal behavior should be predictable and visible.
Platform note: This is primarily Unix/macOS. On Windows, consider graceful no-ops or platform-specific alternatives.
Acceptance criteria: