From: Ralf Wildenhues Date: Sun, 18 Nov 2007 14:30:01 +0000 (+0100) Subject: Fix signal handling in aclocal. X-Git-Tag: v1.10b~217 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37a90f4282695a847a0ad1fbc03db906b2e21d5a;p=thirdparty%2Fautomake.git Fix signal handling in aclocal. * aclocal.in (unlink_tmp): If invoked by a signal, note so in verbose mode. Reinstall default signal handler and reraise, to transport the interrupt information. --- diff --git a/ChangeLog b/ChangeLog index c80196c04..c4ef88d24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-11-18 Ralf Wildenhues + + Fix signal handling in aclocal. + * aclocal.in (unlink_tmp): If invoked by a signal, note so + in verbose mode. Reinstall default signal handler and reraise, + to transport the interrupt information. + 2007-11-13 Bob Proulx Fix color test failure on dumb (and other) terminals. diff --git a/aclocal.in b/aclocal.in index eac545feb..195ef818c 100644 --- a/aclocal.in +++ b/aclocal.in @@ -150,14 +150,27 @@ my $erase_me; ################################################################ -# Erase temporary file ERASE_ME. +# Erase temporary file ERASE_ME. Handle signals. sub unlink_tmp { + my ($sig) = @_; + + if ($sig) + { + verb "caught SIG$sig, bailing out"; + } if (defined $erase_me && -e $erase_me && !unlink ($erase_me)) { fatal "could not remove `$erase_me': $!"; } undef $erase_me; + + # reraise default handler. + if ($sig) + { + $SIG{$sig} = 'DEFAULT'; + kill $sig => $$; + } } $SIG{'INT'} = $SIG{'TERM'} = $SIG{'QUIT'} = $SIG{'HUP'} = 'unlink_tmp';