diff --git a/AGENTS.md b/AGENTS.md index 82d5996..2f0264f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -86,6 +86,7 @@ See the "AI Coding Assistants" section in CONTRIBUTING.md. Key rules: - **Do not** add `Signed-off-by` tags — only humans can certify the DCO - Use `Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]` for attribution in commit messages - The human submitter is responsible for reviewing all AI-generated code and ensuring license compliance +- Do not add `Co-authored-by` tags. ## Tagging a New Release diff --git a/tests/testutils.c b/tests/testutils.c index 5ab4324..6d69e87 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -42,24 +42,21 @@ static inline void VALGRIND_MAKE_MEM_DEFINED(void *p, size_t len) int verbose_test = 1; char *test_name; -static void sigint_handler(int signum, siginfo_t *si, void *uc) +static void sigint_handler(int signum) { - fprintf(stderr, "%s: %s (pid=%d)\n", test_name, - strsignal(signum), getpid()); + fprintf(stderr, "%s: signal %d (pid=%d)\n", test_name, + signum, getpid()); exit(RC_BUG); } void test_init(int argc, char *argv[]) { - int err; - struct sigaction sa_int = { - .sa_sigaction = sigint_handler, - }; - test_name = argv[0]; - err = sigaction(SIGINT, &sa_int, NULL); - if (err) + /* Use signal(), not sigaction() because it also works on the Windows / + * mingw environments we support. + */ + if (signal(SIGINT, sigint_handler) == SIG_ERR) FAIL("Can't install SIGINT handler"); if (getenv("QUIET_TEST"))