summaryrefslogtreecommitdiffstats
path: root/Configure
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-07-24 21:46:55 +0200
committerRichard Levitte <levitte@openssl.org>2018-07-24 21:46:55 +0200
commiteb807d5383fd228a5c4cf9afc2fec487e0d22cee (patch)
treede8f203d8cef0c2b6da5b3572a26692a376bfa3e /Configure
parent88accfe6dccf904fec5a17db4a59cd2c4c480382 (diff)
Configure death handler: instead of printing directly, amend the message
This is done by calling die again, just make sure to reset the __DIE__ handler first. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6776)
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure9
1 files changed, 6 insertions, 3 deletions
diff --git a/Configure b/Configure
index 8e99f60b97..9f728b9242 100755
--- a/Configure
+++ b/Configure
@@ -2722,16 +2722,19 @@ exit(0);
# Death handler, to print a helpful message in case of failure #######
#
sub death_handler {
- die @_ if $^S;
+ die @_ if $^S; # To prevent the added message in eval blocks
my $build_file = $target{build_file} // "build file";
- print STDERR <<"_____";
+ my @message = ( <<"_____", @_ );
Failure! $build_file wasn't produced.
Please read INSTALL and associated NOTES files. You may also have to look over
your available compiler tool chain or change your configuration.
_____
- $orig_death_handler->(@_) if defined $orig_death_handler;
+
+ # Dying is terminal, so it's ok to reset the signal handler here.
+ $SIG{__DIE__} = $orig_death_handler;
+ die @message;
}
# Configuration file reading #########################################