diff --git a/modules/database/src/tools/dbdToHtml.pl b/modules/database/src/tools/dbdToHtml.pl index 39c377cfb..d25801478 100644 --- a/modules/database/src/tools/dbdToHtml.pl +++ b/modules/database/src/tools/dbdToHtml.pl @@ -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 = diff --git a/src/tools/makeAPIheader.pl b/src/tools/makeAPIheader.pl index db043d8cb..4ebbeea9e 100644 --- a/src/tools/makeAPIheader.pl +++ b/src/tools/makeAPIheader.pl @@ -126,6 +126,12 @@ my $guard = "INC_${stem}API_H"; open my $o, '>', $outfile or die "makeAPIheader.pl: Can't create $outfile: $!\n"; +$SIG{__DIE__} = sub { + die @_ if $^S; # Ignore eval deaths + close $o; + unlink $outfile; +}; + print $o <<"__EOF__"; /* This is a generated file, do not edit! */ diff --git a/src/tools/podRemove.pl b/src/tools/podRemove.pl index 14fbf58f0..ae77f7b41 100644 --- a/src/tools/podRemove.pl +++ b/src/tools/podRemove.pl @@ -68,6 +68,12 @@ open my $inp, '<', $infile or open my $out, '>', $opt_o or die "podRemove.pl: Can't create $opt_o: $!\n"; +$SIG{__DIE__} = sub { + die @_ if $^S; # Ignore eval deaths + close $out; + unlink $opt_o; +}; + my $inPod = 0; while (<$inp>) { if (m/\A=[a-zA-Z]/) { diff --git a/src/tools/podToHtml.pl b/src/tools/podToHtml.pl index d1676781d..a6698dac4 100644 --- a/src/tools/podToHtml.pl +++ b/src/tools/podToHtml.pl @@ -93,6 +93,12 @@ my $root = '../' x scalar @inpath; 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 = EPICS::PodHtml->new(); $podHtml->html_css($root . 'style.css');