feat(xce-test-cli-ux): fix SIGINT install to guarantee EINTR, add accessor

Replaces the bare signal(SIGINT, sigbreak) install with sigaction() and
SA_RESTART cleared, so a blocking read reliably returns EINTR instead of
being silently restarted by glibc's BSD signal() semantics. Adds
xcetest_interrupted() as a read-only accessor over the existing break_out
flag for the interruptible-call adapter (tasks 1.4/1.5) to consume.
Proven by a real fork+SIGINT+blocked-read test that first demonstrates
the old bug, then the fix. 1280/1280 controller suite passing (+2).

Task 1.3 of .kiro/specs/xce-test-cli-ux/tasks.md.
Requirements: 9.9

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019jaMf9QEwpugH2W9KAuc7f
This commit is contained in:
Rongsong Shen 2026-09-09 08:03:30 +00:00
parent 89af46af3e
commit b4f5a460fc
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2
6 changed files with 259 additions and 2 deletions

View file

@ -170,6 +170,7 @@ controller_unit_test_src = [
'testsuite/rcfile.c',
'testsuite/test_flagspec.c',
'testsuite/flagspec.c',
'testsuite/test_xcetest_interrupt.c',
'testsuite/test_persist_snapshot_entities.c',
'testsuite/test_apply_seam.c',
'testsuite/test_apply_committed_entry.c',