From: Bruno Haible Date: Tue, 14 Apr 2026 18:38:39 +0000 (+0200) Subject: sigaction: Fix test failure on native Windows. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e304c8478444ba785f58c6bfabfe7acfbc047a74;p=thirdparty%2Fgnulib.git sigaction: Fix test failure on native Windows. * lib/sigaction.c (sigaction): Hide the sigaction_handler from the caller. --- diff --git a/ChangeLog b/ChangeLog index 6d9af7ad40..9015a55ae8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2026-04-14 Bruno Haible + + sigaction: Fix test failure on native Windows. + * lib/sigaction.c (sigaction): Hide the sigaction_handler from the + caller. + 2026-04-13 Bruno Haible stdbit-h: Port to Intel icpx C++ compiler. diff --git a/lib/sigaction.c b/lib/sigaction.c index 07efa9ea17..edd12e1e53 100644 --- a/lib/sigaction.c +++ b/lib/sigaction.c @@ -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]; } }