Skip to content

Commit

Permalink
Configure death handler: instead of printing directly, amend the message
Browse files Browse the repository at this point in the history
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 #6776)

(cherry picked from commit eb807d5)
  • Loading branch information
levitte committed Jul 24, 2018
1 parent f65389a commit 36e732b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Configure
Expand Up @@ -2163,16 +2163,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 #########################################
Expand Down

0 comments on commit 36e732b

Please sign in to comment.