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

@ -72,6 +72,7 @@ extern void test_snapdiff(void);
extern void test_configcompare(void);
extern void test_rcfile(void);
extern void test_flagspec(void);
extern void test_xcetest_interrupt(void);
extern void test_drive_async_config(void);
extern void test_slowlane(void);
extern void test_commit_admission_pool(void);
@ -253,6 +254,7 @@ int main(int argc, char* argv[])
TEST(test_configcompare);
TEST(test_rcfile);
TEST(test_flagspec);
TEST(test_xcetest_interrupt);
TEST(test_drive_async_config);
TEST(test_slowlane);
TEST(test_commit_admission_pool);