]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
pthread_sigmask tests: Fix test failure on Solaris, AIX (regr. today).
authorBruno Haible <bruno@clisp.org>
Wed, 15 Apr 2026 22:28:43 +0000 (00:28 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Apr 2026 22:29:42 +0000 (00:29 +0200)
Reported by Pádraig Brady.

* tests/test-pthread_sigmask2.c (main): Reestablish the signal handler
after SIGINT arrived.
* tests/test-sigdelay2.c (main): Likewise.

ChangeLog
tests/test-pthread_sigmask2.c
tests/test-sigdelay2.c

index e3a2961cd197a797cb83d3fb2ab1a95e7f2ff83e..bb0ca04e84db4b49aab97ecf311a73e0980ad51f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-04-15  Bruno Haible  <bruno@clisp.org>
+
+       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  <eggert@cs.ucla.edu>
 
        doc: doc FTS_NOSTAT similarity to FTS_DEFER_STAT
index 31a880a840073afbf067f1d3372b32bc6ec33409..ed2629238bb2b40770931fccc4b39cb05b9796f6 100644 (file)
@@ -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);
index 7d15d6de5bf5d7173940a2e1359706b880678018..8ab36cce8db824104bf7d563fffd83dd6ec17d9e 100644 (file)
@@ -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);