GNU bug report logs -
#61670
[PATCH] Improve test for blocked signals
Previous Next
Reported by: Jacob Bachmeyer <jcb <at> gnu.org>
Date: Tue, 21 Feb 2023 05:42:03 UTC
Severity: normal
Tags: patch
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Wed, 29 Mar 2023 12:55:26 -0700
with message-id <e4b77997-d7a4-1930-0928-cf224925d68c <at> cs.ucla.edu>
and subject line [PATCH] Improve test for blocked signals
has caused the debbugs.gnu.org bug report #61670,
regarding [PATCH] Improve test for blocked signals
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
61670: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61670
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
This fixes ERRORs reported by:
* t/parallel-tests-interrupt.tap
* t/self-check-exit.tap
* t/self-check-is-blocked-signal.tap
* t/tap-signal.tap
* t/ax/am-test-lib.sh (is_blocked_signal): Revise Perl code
to more closely follow documented interfaces where
available. This also works around bugs and limitations
of the POSIX module in Perl 5.6.
---
t/ax/am-test-lib.sh | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/t/ax/am-test-lib.sh b/t/ax/am-test-lib.sh
index bdf699889..bfa1d84b2 100644
--- a/t/ax/am-test-lib.sh
+++ b/t/ax/am-test-lib.sh
@@ -103,13 +103,14 @@ is_blocked_signal ()
# Use perl, since trying to do this portably in the shell can be
# very tricky, if not downright impossible. For reference, see:
# <https://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00004.html>
- if $PERL -w -e '
- use strict;
- use warnings FATAL => "all";
- use POSIX;
- my %oldsigaction = ();
- sigaction('"$1"', 0, \%oldsigaction);
- exit ($oldsigaction{"HANDLER"} eq "IGNORE" ? 0 : 77);
+ if $PERL -Mstrict -Mwarnings=FATAL,all -MPOSIX -Mconstant=SN,"$1" -e '
+ my $new = POSIX::SigAction->new(sub {});
+ my $old = POSIX::SigAction->new();
+ { no warnings q[uninitialized]; sigaction(SN, $new, $old) }
+ my $oldhandler;
+ if ($old->can(q[handler])) { $oldhandler = $old->handler }
+ else { $oldhandler = $old->{HANDLER} }
+ exit ($oldhandler eq "IGNORE" ? 0 : 77);
'; then
return 0
elif test $? -eq 77; then
--
2.17.1
[Message part 3 (message/rfc822, inline)]
Thanks, I installed that patch into Automake.
This bug report was last modified 2 years and 110 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.