chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dgit: Do not execute END blocks in children.
[dgit.git]
/
dgit
diff --git
a/dgit
b/dgit
index a18d0181542cdb9a0485ad239973a53f87cdcf43..afdf2c58ec8d13c7dc54e2444f6abd1b5412b147 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-156,6
+156,7
@@
our $split_brain = 0;
END {
local ($@, $?);
END {
local ($@, $?);
+ return unless forkcheck_mainprocess();
print STDERR "! $_\n" foreach $supplementary_message =~ m/^.+$/mg;
}
print STDERR "! $_\n" foreach $supplementary_message =~ m/^.+$/mg;
}
@@
-220,6
+221,7
@@
initdebug('');
our @end;
END {
local ($?);
our @end;
END {
local ($?);
+ return unless forkcheck_mainprocess();
foreach my $f (@end) {
eval { $f->(); };
print STDERR "$us: cleanup: $@" if length $@;
foreach my $f (@end) {
eval { $f->(); };
print STDERR "$us: cleanup: $@" if length $@;
@@
-3321,6
+3323,7
@@
sub multisuite_suite_child ($$$) {
my $canonsuitefh = IO::File::new_tmpfile;
my $pid = fork // die $!;
if (!$pid) {
my $canonsuitefh = IO::File::new_tmpfile;
my $pid = fork // die $!;
if (!$pid) {
+ forkcheck_setup();
$isuite = $tsuite;
$us .= " [$isuite]";
$debugprefix .= " ";
$isuite = $tsuite;
$us .= " [$isuite]";
$debugprefix .= " ";
@@
-4472,7
+4475,10
@@
sub i_cleanup {
}
}
}
}
-END { i_cleanup(); }
+END {
+ return unless forkcheck_mainprocess();
+ i_cleanup();
+}
sub i_method {
my ($base,$selector,@args) = @_;
sub i_method {
my ($base,$selector,@args) = @_;