Perl: Close and delete output files when dying
This commit is contained in:
@@ -108,6 +108,12 @@ if ($opt_D) { # Output dependencies only
|
||||
open my $out, '>', $opt_o or
|
||||
die "Can't create $opt_o: $!\n";
|
||||
|
||||
$SIG{__DIE__} = sub {
|
||||
die @_ if $^S; # Ignore eval deaths
|
||||
close $out;
|
||||
unlink $opt_o;
|
||||
};
|
||||
|
||||
my $podHtml;
|
||||
my $idify;
|
||||
my $contentType =
|
||||
|
||||
Reference in New Issue
Block a user