From: Bruno Haible Date: Wed, 15 Apr 2026 22:28:43 +0000 (+0200) Subject: pthread_sigmask tests: Fix test failure on Solaris, AIX (regr. today). X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a297266a67ff97a2c52907c7bf59f408143e8feb;p=thirdparty%2Fgnulib.git pthread_sigmask tests: Fix test failure on Solaris, AIX (regr. today). Reported by Pádraig Brady. * tests/test-pthread_sigmask2.c (main): Reestablish the signal handler after SIGINT arrived. * tests/test-sigdelay2.c (main): Likewise. --- diff --git a/ChangeLog b/ChangeLog index e3a2961cd1..bb0ca04e84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2026-04-15 Bruno Haible + + pthread_sigmask tests: Fix test failure on Solaris, AIX (regr. today). + Reported by Pádraig Brady. + * tests/test-pthread_sigmask2.c (main): Reestablish the signal handler + after SIGINT arrived. + * tests/test-sigdelay2.c (main): Likewise. + 2026-04-15 Paul Eggert doc: doc FTS_NOSTAT similarity to FTS_DEFER_STAT diff --git a/tests/test-pthread_sigmask2.c b/tests/test-pthread_sigmask2.c index 31a880a840..ed2629238b 100644 --- a/tests/test-pthread_sigmask2.c +++ b/tests/test-pthread_sigmask2.c @@ -107,6 +107,11 @@ main () before the call to pthread_sigmask() returns." */ ASSERT (sigint_occurred == 1); + /* On SystemV derivatives, we need to reestablish the signal handler. */ +#if defined __sun || defined _AIX /* Solaris, AIX */ + signal (SIGINT, sigint_handler); +#endif + /* Request a SIGINT signal from another thread. */ ASSERT (pthread_create (&killer_thread2, NULL, killer_thread2_func, NULL) == 0); diff --git a/tests/test-sigdelay2.c b/tests/test-sigdelay2.c index 7d15d6de5b..8ab36cce8d 100644 --- a/tests/test-sigdelay2.c +++ b/tests/test-sigdelay2.c @@ -104,6 +104,11 @@ main () /* The signal should have arrived now. */ ASSERT (sigint_occurred == 1); + /* On SystemV derivatives, we need to reestablish the signal handler. */ +#if defined __sun || defined _AIX /* Solaris, AIX */ + signal (SIGINT, sigint_handler); +#endif + /* Request a SIGINT signal from another thread. */ ASSERT (pthread_create (&killer_thread2, NULL, killer_thread2_func, NULL) == 0);