fix(ncp): exit quietly on Ctrl+C instead of dumping a traceback

Ctrl+C is how you quit 'ncp web', which blocks on the UI window. It printed a
six-frame traceback ending in WaitForSingleObject, reading as a crash. Exits 130
instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
jon
2026-07-22 15:30:07 -05:00
co-authored by Claude Opus 4.8
parent 4cc0481ffd
commit cace36f122
+9 -1
View File
@@ -727,4 +727,12 @@ def main(argv) -> int:
if __name__ == "__main__":
sys.exit(main(sys.argv[1:]))
try:
sys.exit(main(sys.argv[1:]))
except KeyboardInterrupt:
# Ctrl+C is how you quit `ncp web` - it waits on the UI window. Without
# this it printed a six-frame traceback ending in WaitForSingleObject,
# which reads as a crash rather than "you pressed Ctrl+C". 130 is the
# conventional exit status for SIGINT.
print()
sys.exit(130)