Deallocate previously loaded SSL CONF module data
[openssl.git] / Configure
index e9e78665f85fad41b5ae2b0167ca3e1776f9b5a0..059271275d74e85bdf4e12ff7aa4cda540e8a2bd 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1034,11 +1034,12 @@ if ($d) {
        $target = $t;
     }
 }
+
+&usage if !$table{$target} || $table{$target}->{template};
+
 $config{target} = $target;
 my %target = resolve_config($target);
 
-&usage if (!%target || $target{template});
-
 foreach (keys %target_attr_translate) {
     $target{$target_attr_translate{$_}} = $target{$_}
         if $target{$_};
@@ -2722,15 +2723,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.
 
 _____
+
+    # Dying is terminal, so it's ok to reset the signal handler here.
+    $SIG{__DIE__} = $orig_death_handler;
+    die @message;
 }
 
 # Configuration file reading #########################################