Fix SIGINT shutdown during active inference by JPPhoto · Pull Request #8993 · invoke-ai/InvokeAI
Summary
Fix for the remaining double-^C shutdown case during active generation/inference.
PR 8936 already fixed most single-^C shutdown hangs in the main app shutdown path, but one case remained: if Ctrl+C happened while a node was actively running, DefaultSessionRunner.run_node() caught and swallowed KeyboardInterrupt. That prevented the interrupt from reaching the main shutdown handler, so a second Ctrl+C was needed to exit.
This change removes that local KeyboardInterrupt swallow so the interrupt propagates normally to the main shutdown path. It also adds focused regression tests covering both direct KeyboardInterrupt propagation and a subprocess SIGINT case.
Related Issues / Discussions
Closes #7890.
QA Instructions
pytest -q tests/app/services/test_session_processor_shutdown.py
pytest -q tests/test_asyncio_shutdown.py
Merge Plan
Checklist
- The PR has a short but descriptive title, suitable for a changelog
- Tests added / updated (if applicable)
- ❗Changes to a redux slice have a corresponding migration
- Documentation added / updated (if applicable)
- Updated
What's Newcopy (if doing a release after this PR)