]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
sigaction: Fix test failure on native Windows.
authorBruno Haible <bruno@clisp.org>
Tue, 14 Apr 2026 18:38:39 +0000 (20:38 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 14 Apr 2026 18:38:58 +0000 (20:38 +0200)
* lib/sigaction.c (sigaction): Hide the sigaction_handler from the
caller.

ChangeLog
lib/sigaction.c

index 6d9af7ad40e9742e7b5997f608ac4e9891e61109..9015a55ae8ab8f560fac47e698b07144b600d581 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-04-14  Bruno Haible  <bruno@clisp.org>
+
+       sigaction: Fix test failure on native Windows.
+       * lib/sigaction.c (sigaction): Hide the sigaction_handler from the
+       caller.
+
 2026-04-13  Bruno Haible  <bruno@clisp.org>
 
        stdbit-h: Port to Intel icpx C++ compiler.
index 07efa9ea17b38e2dfca5e69ced0d1af193fe7b96..edd12e1e53a9b46287215a88799384674efd1511 100644 (file)
@@ -171,6 +171,10 @@ sigaction (int sig, const struct sigaction *restrict act,
           signal (sig, oact->sa_handler);
           oact->sa_flags = SA_RESETHAND | SA_NODEFER;
           sigemptyset (&oact->sa_mask);
+          /* The sigaction_handler is an internal detail.  It must not be
+             visible to the caller.  */
+          if (oact->sa_handler == sigaction_handler)
+            *oact = action_array[sig];
         }
     }